Commit graph

12601 commits

Author SHA1 Message Date
alexey.lysiuk
c8eabe57ff Fixed compilation warning reported by GCC/Clang
src/v_draw.cpp:503:25: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare]
2017-03-26 22:10:05 +03:00
alexey.lysiuk
e5d4d9a36a Fixed compilation with GCC/Clang
src/swrenderer/line/r_walldraw.cpp:102:13: error: expected unqualified-id before ‘(’ token
2017-03-26 22:10:05 +03:00
Magnus Norddahl
84e94f2a32 - change softpoly psprite drawing to do exactly what the software renderer does 2017-03-26 18:55:23 +02:00
Christoph Oelckers
0cbbd8d4b1 Merge branch 'master' of https://github.com/coelckers/gzdoom 2017-03-26 18:41:44 +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
Magnus Norddahl
a12f0862c9 - remove softpoly intersection math class 2017-03-26 17:12:20 +02:00
alexey.lysiuk
28be42675d Fixed build of SDL backend on macOS 2017-03-26 11:49:23 +03:00
Magnus Norddahl
ffc90f16ab - Simplify the PolyDrawArgs interface 2017-03-26 10:10:55 +02:00
Magnus Norddahl
7b58eab332 - fix softpoly light visibility bug 2017-03-26 05:28:27 +02:00
Christoph Oelckers
1c71d038dd - Doom keybar is working.
I did not implement an equivalent to SBARINFO's DrawKeyBar. This is too limiting because it needs to consider any possibility. It really is easier to let a mod implement this itself and custom adjust it to its needs.

- fixed some stuff, in particular use DrawInventoryIcon to get smarter icon lookup.
2017-03-25 23:43:19 +01:00
Christoph Oelckers
488fface50 - started port of Doom status bar to ZScript.
Fullscreen HUD done with the exception of key and inventory bar. I also used the opportunity to make it a bit more resistant against badly designed inventory icons.
2017-03-25 21:40:17 +01: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
alexey.lysiuk
093a05b588 Reset OpenGL 2D drawer state fully on each frame
https://mantis.zdoom.org/view.php?id=469
2017-03-25 11:32:39 +02:00
alexey.lysiuk
80f3c1ed81 Mouse input can now be disabled completely in Cocoa backend 2017-03-25 11:04:06 +02:00
Magnus Norddahl
04057b8b91 - implement the blending modes for palette mode in softpoly 2017-03-25 08:38:27 +01:00
Rachael Alexanderson
c5805ddd6e - removed another vestigial #define NO_SSE 2017-03-25 01:46:41 -04:00
Rachael Alexanderson
2c3d867946 - fixed invalid variable reference on ARM 2017-03-25 01:40:13 -04:00
Rachael Alexanderson
f1ce0f1136 - Removed redundant #ifdef __arm__ #define NO_SSE from 2.5D drawers 2017-03-25 01:39:09 -04:00
Rachael Alexanderson
2d035a39b4 - fixed: Pushed -DNO_SSE for ARM processors unconditionally. We don't support SSE whatsoever on ARM so all code should always be aware of it. 2017-03-25 01:15:24 -04:00
Magnus Norddahl
af5355c69d - fix SSE intrinsics being used on arm 2017-03-25 06:14:19 +01:00
Christoph Oelckers
bdb9275f8c - made the mugshot accessible to ZScript.
Note that there is no direct access, all this exposes is a single function to get the current face's texture which then can be drawn using the existing functions.
2017-03-25 01:22:42 +01:00
Christoph Oelckers
2d17594f6f - converted the Strife status bar to use the new HUD specific draw functions so that it also can benefit from coming changes.
Note that the pop screens are special because they are not subject to scaling - they will always be drawn with the current resolutions clean scale. As a result they cannot use the HUD drawers but instead continue to use the low level draw functions directly.
2017-03-25 00:35:19 +01: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
Magnus Norddahl
321e2da979 - initialize clipper with the view frustum for better performance
- change translucent objects to be pointers for faster sorting
2017-03-24 22:04:07 +01:00
Christoph Oelckers
6760e01a0d - implemented the status bar's DrawString function and ported the fullscreen HUD part of the Strife status bar to use the new functionality. 2017-03-24 20:09:50 +01:00
Magnus Norddahl
ac518e23bf - improve triangle setup performance a little bit 2017-03-24 20:00:53 +01:00
Magnus Norddahl
bc8a4474d5 - optimize PolyTriangleDrawer::clipedge
- remove slow calls to roundf in the triangle setup functions
2017-03-24 13:04:02 +01:00
alexey.lysiuk
c1e425920e Fixed compilation with GCC and Clang 2017-03-24 13:02:00 +02:00
Magnus Norddahl
f178646e1a - improve sector portals rendering in softpoly
- fix a softpoly memory leak and change vertex list to be allocated using the frame allocator
2017-03-24 07:28:28 +01:00
Christoph Oelckers
b5720ee1e7 - initial work on DrawString method. 2017-03-24 02:38:44 +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
Magnus Norddahl
c21037fb03 - fix sky sector portals 2017-03-24 02:11:24 +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
74a2d58a52 - made the coordinate check fatal. If this happens the loaded map will be broken, there is no point trying to recover. 2017-03-23 10:19:07 +01:00
Christoph Oelckers
f31fb64750 - added range checks to UDMF coordinate fields. 2017-03-23 10:09:54 +01:00
Magnus Norddahl
e12f48699e - fix the culling bugs in softpoly by switching to a pseudo-angle clipper 2017-03-23 03:41:44 +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
3744c2eee7 - this was missing. 2017-03-22 20:33:40 +01:00
Christoph Oelckers
9bd75bcac5 - some conceptual work on statusbar stuff. This looks like a viable approach to build something that can replace SBARINFO. 2017-03-22 19:56:21 +01:00
Christoph Oelckers
f0e4f54c80 - one more bit of scriptification. 2017-03-22 18:38:09 +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
04c2565d7f - added Get/SetValue functions to PBool. 2017-03-22 15:44:54 +01:00
Christoph Oelckers
62fbb00bc9 Merge branch 'master' of https://github.com/coelckers/gzdoom 2017-03-22 14:59:35 +01:00
Christoph Oelckers
4c51a4fc59 - reimplemented the health bar for Strife's status bar. 2017-03-22 14:59:12 +01:00
Rachael Alexanderson
09c3060728 - fixed: skybug on ARM was caused by undefined conversion from float to unsigned int. adding intermediary signed int cast fixes this problem. 2017-03-22 05:51:12 -04:00
Magnus Norddahl
b2e61412da - add missing sprite blends to the soft poly drawer 2017-03-22 09:11:21 +01:00
Christoph Oelckers
4417afd548 - changed VMValue to handle strings by reference.
This makes VMValue a real POD type with no hacky overloads and eliminates a lot of destructor code in all places that call a VM function. Due to the way this had to be handled, none of these destructors could be skipped because any value could have been a string.
This required some minor changes in functions that passed a temporary FString into the VM to ensure that the temporary object lives long enough to be handled. The code generator had already been changed to deal with this in a previous commit.
This is easily offset by the code savings and reduced maintenance needs elsewhere.
2017-03-22 01:44:56 +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
Rachael Alexanderson
4110f34139 - fixed: non-SSE2 drawers still had SSE2 intrinsics for light calculations, preventing successful compilation on ARM. 2017-03-21 17:51:09 -04:00
Magnus Norddahl
fc3cb01029 - only ray test sprites on lights that are shadowmapped 2017-03-21 14:32:48 +01:00