Commit graph

1140 commits

Author SHA1 Message Date
Christoph Oelckers
2541bd93fc - made DHUDMessageBase non-abstract. 2018-03-03 09:52:34 +01:00
Christoph Oelckers
b327aa737a Merge remote-tracking branch 'remotes/origin/materials' 2018-03-03 08:54:04 +01:00
Christoph Oelckers
bb16e34bf4 - exposed the HUD message interface to ZScript.
Note that this is just the bare abstract interface. It is up to content makers to define usable HUD message classes and optionally contribute them to the engine.
2018-03-01 11:45:19 +01:00
Christoph Oelckers
dd893b6a0c - split off the interface part of DHUDMessage into an abstract base class.
The purpose is to allow creating custom message types in ZScript.
2018-03-01 10:33:03 +01:00
Magnus Norddahl
c7ec489846 Merge remote-tracking branch 'origin/master' into materials 2018-01-23 20:16:32 +01:00
Magnus Norddahl
f3c55c01c8 Add material definition to GLDEFS 2018-01-20 16:28:24 +01:00
Magnus Norddahl
5f36b86013 - Add dynamic spot lights 2018-01-04 17:58:11 +01:00
alexey.lysiuk
8f7ca00d19 Added optional angles to player's coordinates display
Set hud_showangles CVAR to display pitch, yaw, roll below player's coordinates
2017-12-30 12:10:39 +02:00
Major Cooke
10465c1d27 - Fade cancelling should only always be active for A_SetBlend fades, not always for everything else (such as ACS fades). 2017-12-27 23:34:44 -05:00
Major Cooke
fa0082aef6 Added ability to perform reverse fades with A_SetBlend 2017-12-27 20:51:13 -05:00
Christoph Oelckers
f0dc619b5b - fixed bad use of FScanner::GetNumber and GetFloat in code inherited from ZDoomGL.
This could lead to bad error messages if some malformed definitions were used.
2017-11-19 15:30:45 +01:00
alexey.lysiuk
2e33165edf Moved freeing of data stored in HUD message objects to OnDestroy() function
https://forum.zdoom.org/viewtopic.php?t=57163
2017-07-10 10:41:50 +03:00
Christoph Oelckers
3b024c347b - use a dedicated flag word for the dynamic light flags instead of piggybacking on some flags4 bits. 2017-06-18 10:15:31 +02:00
Christoph Oelckers
afa2888acb - fixed size clamping of sector lights to use 1024 as maximum, not 255 as inherited from ZDoomGL. 2017-05-31 10:41:43 +02:00
alexey.lysiuk
43fc5633af Fixed player falling through narrow notch upon unmorphing
https://forum.zdoom.org/viewtopic.php?t=56230
2017-05-02 17:22:50 +03:00
Rachael Alexanderson
8c992647de - fixed: "vid_renderer" should NEVER be referenced outside of the hardware code. This may fix a crash when changing modes with vid_renderer not matching actual renderer 2017-04-30 16:11:34 -04:00
Christoph Oelckers
3ccd4aa0d1 - fixed: The powerup icons did not blink when expiring. 2017-04-21 18:08:30 +02:00
Christoph Oelckers
57d703236b - changed Doom source license to GPL in all subdirectories and fixed missing licenses in a few other files. 2017-04-17 12:27:19 +02:00
Christoph Oelckers
4f67dc4f01 - fixed: DCorpsePointer's constructor was doing nasty stuff while the object wasn't fully set up yet. 2017-04-15 19:07:13 +02:00
Major Cooke
259e3127fe - Fixed crash with corpse queueing. 2017-04-15 16:43:40 +02:00
Christoph Oelckers
329c168cc2 - added a distance parameter to A_SprayDecal. 2017-04-14 16:28:54 +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
522ce59be2 - use in-class initialization for FLightDefaults to avoid uninitialized variables in the future. 2017-04-13 12:50:43 +02:00
alexey.lysiuk
cced9e014b Fixed issue with actors occasionally unaffected by dynamic lights
https://mantis.zdoom.org/view.php?id=536
2017-04-13 13:14:33 +03: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
80801d11b1 - removed some redundant static_casts. 2017-04-12 10:29:04 +02:00
Christoph Oelckers
0e0eca0e0f - replaced some dyn_casts with calls to FindActor.
- fixed type checks in A_Morph.
2017-04-12 01:29:51 +02:00
Christoph Oelckers
311ce2362a - started moving stuff out of PClassActor into meta data.
This reinstates the old FActorInfo as part of the meta data a class can have so that the class descriptor itself can be freed from any data not directly relevant for managing the class's type information.
2017-04-11 19:37:56 +02:00
alexey.lysiuk
175e784b67 Fixed applying of powerup effects after (un)morph
https://mantis.zdoom.org/view.php?id=556
2017-04-10 15:46:30 +03:00
Christoph Oelckers
f95c29ad28 cleaned up the scaling options.
- all 5 settings affected by uiscale have been changed to have the exact same semantics: -1, if supported means special scaling, this is available for HUD and status bar, 0 means to use uiscale, any larger value is a direct scaling factor.
- scaling is cut off when the factor is larger than screenwidth/320 or screenheight/200 because anything larger will definitely not fit.
- a lot of code has been cleaned up and consolidated. Especially the message code had an incredible amount of redundancy.
- all scaling options have been moved into a submenu. This menu is not complete, though - it still requires a special menu widget to convey the intended information without confusing the user.
2017-03-30 02:16:23 +02:00
nashmuhandes
99d1581c27 Added "DontLightActors" flag for dynamic lights. Actors will not be illuminated by lights that are given this flag. 2017-03-28 21:33:16 +02:00
Christoph Oelckers
a112b29c43 - implemented the inventory bar. This object is a bit special because it requires a lot of parameters, most of which are easily set to defaults. To make handling easier, most are passed through a container object which does some processing up front.
- finished work on the Doom status bar. I also took the opportunity to fix the layout of the inventory bar which is a bit broken in SBARINFO.
- tuned the selection rules for deciding what creates the status bar, so that the most recent definition that can be found is chosen.
2017-03-27 01:02:10 +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
a3ee3c287e - major progress on the status bar code: SBARINFO's DrawGraphic has been ported into a generic function of the base statusbar class and put to use for a few items on the Strife status bar.
- decided to ditch the widget system I had started to lay out. As it turns out that would make things far more complicated and slower than they need to be.
2017-03-24 00:47:08 +01:00
Christoph Oelckers
1031481167 - added some checks to exclude dynamic lights from being subjected to shadowmapping if they do not touch any one-sided lines from the back side. This condition is a requirement for a 1D shadowmap to even have an effect. 2017-03-20 00:34:19 +01:00
Christoph Oelckers
c9296ead57 - moved the skybox texture files to the main textures directory. 2017-03-17 21:12:09 +01:00
Christoph Oelckers
d506b2e6a1 - fixed code generation bug with bad class names in DECORATE.
- print attenuation info with 'listlights' CCMD.
2017-03-17 16:00:04 +01:00
Christoph Oelckers
f201dab534 - moved the subsectors into FLevelLocals. 2017-03-17 00:22:52 +01:00
Christoph Oelckers
2b2c986bd0 - cleanup of GL renderer interface and improper header use in software renderer. 2017-03-16 21:34:03 +01:00
Christoph Oelckers
b529b1e3a7 - removed several unneeded GL headers from the software renderer's sources.
- consolidated the code to calculate a sprite's display angle for all 3 renderers.

As it turned out, they all differed in their feature support because they had always been updated independently by different people.
2017-03-16 13:49:34 +01:00
Christoph Oelckers
b52d1c3d50 - some cleanup. 2017-03-12 20:04:46 +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
Magnus Norddahl
0c9014b984 - move r_utility globals into r_viewpoint and r_viewwindow
- change r_utility functions to only work on FRenderViewpoint and FViewWindow
2017-03-11 23:28:07 +01:00
Christoph Oelckers
6dee9ff566 - replaced another large batch of homegrown type use. 2017-03-08 18:55:53 +01:00
Christoph Oelckers
b8f7e305db - changed TObjPtr to take a pointer as its template argument and not the class it points to.
This addresses the main issue with TObjPtr, namely that using it required pulling in the entire class hierarchy in basic headers like r_defs which polluted nearly every single source file in the project.
2017-03-08 13:35:21 +01:00
Christoph Oelckers
f6dd99d3aa - added A_Morph function. 2017-02-26 21:20:47 +01:00
Christoph Oelckers
5fe04dfd20 - added A_SprayDecal function. 2017-02-26 18:37:12 +01:00
Christoph Oelckers
f31ddbc57c - allow specifying specials in ZSDF by name.
- allow specifying a decal ID by name in UDMF.
2017-02-26 17:05:04 +01:00
Christoph Oelckers
35552ce0cb - added a Death.Sky state for missiles that gets used when they hit a sky plane.
- fixed: The Alt HUD did not draw the crosshair in HUD off mode.
2017-02-25 20:45:28 +01:00
Christoph Oelckers
498da825a5 - made the Skins array scripting friendly and exported it. 2017-02-17 21:51:23 +01:00