Christoph Oelckers
cf18dbdfa7
- use a TArray to pass the screenshot buffer
...
This also removes a few other explicit buffer allocations.
2018-12-21 12:40:05 +01:00
alexey.lysiuk
b3d6dfb55f
- fixed lost settings controller state upon new game
...
https://forum.zdoom.org/viewtopic.php?t=62959
2018-12-21 13:14:21 +02:00
alexey.lysiuk
73d9751bb4
- cleaned up player reinitialization upon new game
2018-12-21 13:14:21 +02:00
Magnus Norddahl
b64dfb54a5
- fix decals looking blackened due to low lookup table precision when alpha is zero
2018-12-21 10:15:09 +01:00
Cacodemon345
789941f24d
Export P_GetOffsetPosition and ADynamicLight::SetOffset to ZScript
2018-12-20 22:54:45 +01:00
Christoph Oelckers
66a2cdb6e9
- added missing null pointer checks to cheat code.
2018-12-20 22:09:41 +01:00
Christoph Oelckers
e279214f5b
- removed the hasglnodes variables.
...
Since the software renderer also requires GL nodes now this was always true.
2018-12-20 18:40:19 +01:00
Christoph Oelckers
d140d767a4
- changed last commit to let the replacement take the original's place and add the old texture at the end with its name cleared.
...
This is to ensure that this won't break ranged animations but aside from that should produce the same end result.
2018-12-20 18:20:25 +01:00
Christoph Oelckers
120b950291
- changed FTextureManager::ReplaceTexture to only append the new texture instead of replacing the old one.
...
This should ensure that other references to the original will remain valid.
2018-12-20 18:10:06 +01:00
Christoph Oelckers
e05cedfc0d
removed the unused DefaultExtension variant taking a char *.
2018-12-20 12:40:38 +01:00
Magnus Norddahl
b0d8a813f9
- fix missing line number for the function throwing the exception and remove the duplicate call stack line
2018-12-20 04:50:45 +01:00
Magnus Norddahl
8c52f20373
- fix MemcpyCommand not using the same lines for the threads as softpoly (visible as a race condition when screenblocks didn't start at top of screen)
2018-12-20 04:27:30 +01:00
Christoph Oelckers
0faa9111b9
- moved P_OpenMapData and related content out of p_setup.cpp.
2018-12-19 18:41:53 +01:00
Christoph Oelckers
0160841dde
- reverse the order of the texture list before resolving it.
...
Since this deletes the resolved elements one by one and needs to start at the front to ensure consistency, it is better to reverse the order so that the deletions take place at the end of the list which requires a lot less data movement.
On Total Chaos this slowed down texture setup to the point where the mod was basically unlaunchable.
2018-12-19 18:17:59 +01:00
Christoph Oelckers
1a3df8dfba
- moved all shutdown handling for sound related resources to I_ShutdownSound instead of registering separate atterm handlers.
2018-12-19 09:39:06 +01:00
Christoph Oelckers
bcff04e76f
- fixed: The Heretic sky height hack needs to be stored in the already created texture object as well.
2018-12-19 09:12:58 +01:00
Christoph Oelckers
c471be4409
- added an option to GAMEINFO to either force or disable loading of the default lights and brightmaps.
...
The mod which prompted me to add this is "The Chosen" which is a Dehacked-based TC and repurposes many original actors for something entirely different.
The stock lights are not usable for this and would make it impossible to add a GAMEINFO lump to it because then there is no way to disable loading of lights in the startup screen.
2018-12-19 01:37:48 +01:00
Magnus Norddahl
ebfa61514e
- remove InitSoftwareSky
2018-12-19 04:44:25 +01:00
Magnus Norddahl
db295fae3a
- fix sky drawer issues when not using max screenblocks
2018-12-19 04:27:41 +01:00
Magnus Norddahl
e296d2819b
- avoid creating labels when they are not used
...
- remove variable from class as it is only used locally
- set default values in the class
- remove unused field
2018-12-19 01:12:57 +01:00
Magnus Norddahl
650e6a9c1b
- removed marked code for how to create GDB/LLDB debug info as it will probably never be implemented
2018-12-19 00:49:43 +01:00
Magnus Norddahl
34007a8d27
- add missing parameter on unix
2018-12-19 00:47:36 +01:00
Chronos Ouroboros
bad8c18c58
Add line numbers to JIT stack traces. ( #667 )
2018-12-19 00:45:40 +01:00
Magnus Norddahl
9a2b3792ef
- don't include the native frames per default
2018-12-19 00:43:50 +01:00
Magnus Norddahl
7785dd1b56
- fix linking and some linux things
2018-12-19 00:23:38 +01:00
Christoph Oelckers
c6a3a6a3fb
- fixed misnamed macros.
2018-12-19 00:09:36 +01:00
drfrag
39564d8933
- Fixed linking with MinGW-w64.
2018-12-18 16:43:52 -05:00
Chronos Ouroboros
bb8fcd63c4
Added a function for triggering use/push specials for usage in custom monster AI.
2018-12-18 21:09:13 +01:00
Chronos Ouroboros
e7118804ba
Exported P_CheckFor3DFloorHit and P_CheckFor3DCeilingHit to ZScript.
2018-12-18 21:09:13 +01:00
Christoph Oelckers
462fe891bd
- fixed: A powered up weapon which shares its ready state with the parent but is currently in a firing sequence may not force-switch the weapon, because that will cause the sequence to run in the wrong weapon's context.
2018-12-18 20:38:25 +01:00
Christoph Oelckers
6342e85c26
- fixed: The texture scale wasn't copied to image based font characters.
2018-12-18 19:52:56 +01:00
Christoph Oelckers
c597b16f30
- fixed: 'frame' in GLDEFS light definitions was case sensitive.
2018-12-18 19:36:50 +01:00
alexey.lysiuk
8815379e15
- fixed compilation of POSIX targets
...
Making callstack resolving operational will require a little bit more effort
src/scripting/vm/jit_runtime.cpp:900:31: error: use of undeclared identifier 'frames'
src/scripting/vm/jit_runtime.cpp:903:23: error: use of undeclared identifier 'cnt'
2018-12-18 18:42:37 +02:00
drfrag
1ef5becd4f
- Fixed compilation with MinGW-w64 64 bit.
2018-12-18 09:01:56 -05:00
Magnus Norddahl
585058c65e
- add support for writing the native call stack
2018-12-18 14:49:41 +01:00
Magnus Norddahl
27ecae265d
- improve the stack trace when the jit is active
2018-12-18 11:44:51 +01:00
Magnus Norddahl
64bfb1b905
- fix r_multithreaded 0 not working
2018-12-18 00:41:46 +01:00
Magnus Norddahl
efb8e39aa9
- move more of the light calculation code to the drawerargs
2018-12-18 00:37:50 +01:00
Christoph Oelckers
a73c065811
- replaced several explicit allocations with TArrays.
2018-12-17 18:28:04 +01:00
Christoph Oelckers
d68cd3aa80
- fixed: Alpha textures need to use a color's grayscale value, not their red channel.
2018-12-17 17:44:22 +01:00
alexey.lysiuk
fb71563311
- fixed inconsistent dymanic lights setup with UBO
...
https://forum.zdoom.org/viewtopic.php?t=62585
2018-12-17 12:27:35 +02:00
Magnus Norddahl
2ce91ea62f
- delay converting sprite lightlevels to a shade until we hit ColormapLight
2018-12-17 07:54:46 +01:00
Magnus Norddahl
66b5e6e2ee
- delay converting wall lightlevels to a shade until we hit the drawer
2018-12-17 06:47:26 +01:00
Magnus Norddahl
946f657a37
- fix heretic light torch in software renderer and remove some code duplication
2018-12-17 06:13:00 +01:00
Magnus Norddahl
f35aeec6c3
- move visibility calculation to LightVisibility
2018-12-17 05:10:26 +01:00
Magnus Norddahl
9787e32d28
Merge branch 'SoftwareScaling'
2018-12-17 01:33:22 +01:00
Magnus Norddahl
c3477e9197
- softpoly decals were upside down
2018-12-17 01:32:46 +01:00
Magnus Norddahl
9e15f26923
- fix decal upscaling
2018-12-17 01:32:15 +01:00
Christoph Oelckers
4cd745db48
- fixed: Patch rotations were not applied during true color texture composition.
2018-12-17 00:03:36 +01:00
Christoph Oelckers
87953020ba
- fixed: FImageSource::GetCachedBitmap did not pass the translucency information along to the caller.
2018-12-16 19:17:53 +01:00
Christoph Oelckers
cce82e99d6
- fixed: The texture compositor did not use a patch's translation.
2018-12-16 19:03:04 +01:00
Magnus Norddahl
15d599813b
- add support for scaled textures in softpoly
2018-12-16 15:12:45 +01:00
Magnus Norddahl
eaf1c4f1e2
- implement the physical texture scaling at the drawer transition level as the frontend of the software renderers do not even need to know the textures are scaled
2018-12-16 14:34:44 +01:00
Christoph Oelckers
e776dbce55
- use TArrays for MD3 storage.
2018-12-16 13:33:42 +01:00
Magnus Norddahl
57525f1505
Merge remote-tracking branch 'origin/master' into SoftwareScaling
2018-12-16 12:10:53 +01:00
Christoph Oelckers
cc52f89372
- fixed: For non-persistent buffers, sprite vertices need to be recalculated in the splitter code of the translucent sorter.
2018-12-16 12:06:17 +01:00
Magnus Norddahl
6648f4e47f
Merge branch 'master' of https://github.com/coelckers/gzdoom
2018-12-16 11:31:18 +01:00
Magnus Norddahl
88751a320c
- fix sky drawers not staying within their numa node
2018-12-16 11:31:05 +01:00
Christoph Oelckers
881fc89fe8
- removed redundant std::move.
2018-12-16 11:29:22 +01:00
Christoph Oelckers
1422a95aa8
Merge branch 'Texture_Cleanup'
...
# Conflicts:
# src/textures/formats/multipatchtexture.cpp
2018-12-16 10:19:58 +01:00
Christoph Oelckers
a38e75db00
- improved error reporting for badly defined translations.
...
This needs to be handled by the caller for all use cases because the translation parser lacks the context to do a proper error report.
2018-12-16 09:56:53 +01:00
Christoph Oelckers
a96b86b13b
- fixed: sidedef-less GLWalls may not apply per-sidedef render properties.
...
These always come from open-sector render hacks where the renderer tries to fill in some gaps
2018-12-16 09:38:22 +01:00
Christoph Oelckers
d0ce021805
- fixed: Both main and worker thread were modifying the portal state.
...
The parts in the main thread have been offloaded to a new worker job to avoid having to use a mutex to protect the portal state.
2018-12-16 09:05:02 +01:00
Christoph Oelckers
51f03c8215
- a few more fixes.
2018-12-16 00:37:34 +01:00
Christoph Oelckers
87b0567cd7
- the font character substitution logic needed more fixes.
...
The ZScript DrawChar function was incomplete and FFont::GetChar did not always return the proper texture.
To make things clearer the OriginalPic is now only used in the few cases where substitution takes place and nothing else.
2018-12-15 23:32:49 +01:00
Christoph Oelckers
c92e6b03ac
- why wasn't this saved?
2018-12-15 21:39:00 +01:00
Christoph Oelckers
39f6489ac5
- two more places where explicit allocations could be replaced.
2018-12-15 20:41:21 +01:00
Christoph Oelckers
091f73b833
- fixed: no sprites were drawn in a sector if it only had ones in its sectorportal_thinglist.
2018-12-15 20:22:42 +01:00
Christoph Oelckers
8e24a50b36
- let FxNop have a value type, even if it's just TypeError.
2018-12-15 20:08:05 +01:00
Christoph Oelckers
e6e4f0f305
- disabled redirection to the original patch for FSpecialFont.
...
Using the same code as for the standard font does not work as intended, the reason still needs to be investigated.
2018-12-15 19:15:05 +01:00
Christoph Oelckers
d1ca2a91f3
- fixed: ThePatchRemap table was only initialized in one of FFont's constructors.
2018-12-15 17:49:12 +01:00
Christoph Oelckers
c105a1f670
- fixed two broken ScriptUtil calls in FraggleScript.
2018-12-15 16:57:20 +01:00
Rachael Alexanderson
14e9e3ac56
- use software mipmaps for truecolor for scaled textures
2018-12-15 10:50:59 -05:00
Christoph Oelckers
74ea9143ee
- added a 'forceworldpanning' map flag.
...
Since unfortunately this cannot be set as a general default, let's at least make it as easy as possible to disable that panning+scaling madness without having to edit the texture data.
2018-12-15 16:29:37 +01:00
Rachael Alexanderson
3fc9dd4144
Merge remote-tracking branch 'origin/Texture_Cleanup' into softwarescaling
2018-12-15 10:18:39 -05:00
Rachael Alexanderson
2e927c7026
- port texture upscaler code to truecolour
2018-12-15 10:13:28 -05:00
Christoph Oelckers
dc9c7afa24
- reimplemented the GetRawTexture redirect.
2018-12-15 16:05:48 +01:00
Rachael Alexanderson
aaabefbfab
Merge branch 'master' into softwarescaling
2018-12-15 09:51:50 -05:00
Christoph Oelckers
1aba33122b
- fixed: The light defaults were not fully deleted on an engine restart.
2018-12-15 15:36:43 +01:00
Christoph Oelckers
faa4bb45c9
- store UnchangedSpriteNames in Dehacked in a less hacky manner.
2018-12-15 15:36:33 +01:00
Christoph Oelckers
d937c50726
- use a TArray in PPUniforms.
...
This makes the vast majority of code in that class just go away
2018-12-15 14:59:49 +01:00
Christoph Oelckers
056b2c3a80
- handle CR_UNTRANSLATED so that it doesn't force CR_UNTRANSLATED to the palette.
...
Since the entire font setup is very much incapable of handling this during rendering, short of a complete rewrite, it was necessary to put the relevant code into the places which process the characters for drawing so that it can disable the translation table (which needs to be passed as raw data to the draw functions) and keep track of both the translatable and the original variant of the character graphics.
2018-12-15 14:51:03 +01:00
Christoph Oelckers
48d87e3dcf
- use TArrays for most buffers being used in the font class.
2018-12-15 11:55:21 +01:00
Christoph Oelckers
cd25b4be4f
- use a TArray to store the particles and remove all 16 bit global variables.
...
This means one less exit function to deal with - and these days 16 bit variables are a pointless attempt at saving space.
2018-12-15 10:04:49 +01:00
Christoph Oelckers
3d0fb6cf90
Merge branch 'master' into Texture_Cleanup
2018-12-15 09:45:26 +01:00
Christoph Oelckers
1187906a61
- use symbolic constants for the light modes.
2018-12-15 09:40:39 +01:00
Christoph Oelckers
15949102da
Merge branch 'master' of https://github.com/coelckers/gzdoom
2018-12-15 08:27:32 +01:00
Magnus Norddahl
3af6ae4b37
- add vanilla lightmode that behaves exactly as Doom's original light did
2018-12-15 07:11:28 +01:00
Christoph Oelckers
4d8e8e7741
- enable the texture scalers in software mode.
...
Currently only implemented for 8 bit in the classic renderer.
2018-12-15 00:38:27 +01:00
Christoph Oelckers
656dbc9647
Merge branch 'master' into Texture_Cleanup
...
# Conflicts:
# src/textures/texture.cpp
2018-12-14 22:36:26 +01:00
Christoph Oelckers
013d3e2368
- code simplification.
2018-12-14 22:34:28 +01:00
Christoph Oelckers
f373752b4f
- fixed incorrect alignment of scaled world panned textures combined with per-sidedef scaling in the hardware renderer
...
This particular case incorrectly factored in the sidedef's scaling factor for how to calculate the offset.
Fortunately this is a very rare case - a quick check yielded no maps depending on it.
Should any map surface that depends on this bug a compatibility option may be needed but it doesn't seem likely that this may be the case.
2018-12-14 20:00:44 +01:00
Christoph Oelckers
a19f297ae0
- fixed incorrect alignment of scaled world panned textures combined with per-sidedef scaling in the hardware renderer
...
This particular case incorrectly factored in the sidedef's scaling factor for how to calculate the offset.
Fortunately this is a very rare case - a quick check yielded no maps depending on it.
Should any map surface that depends on this bug a compatibility option may be needed but it doesn't seem likely that this may be the case.
2018-12-14 19:59:19 +01:00
alexey.lysiuk
4a83f4d251
- disable music playback if WinMM stream cannot be opened
...
https://forum.zdoom.org/viewtopic.php?t=62888
2018-12-14 15:58:08 +02:00
Christoph Oelckers
e157e36b43
- the texture still needs to be added to the texture manager.
2018-12-14 01:48:53 +01:00
Christoph Oelckers
bd6ba47d63
- fixed: The multipatch texture builder may not store the texture IDs on assignment.
...
Between creation and resolving the texture manager will resort the textures and after that the old ids are no longer valid. The textures themselves have the correct one, so that should be used.
2018-12-14 01:47:39 +01:00
Christoph Oelckers
1e844336b9
- fixed memory leak with texture creation.
2018-12-14 01:46:26 +01:00
Christoph Oelckers
fc5dd17d77
- fixed 3D floor texture setup.
...
This code really makes zero sense, it looks like the cases for upper and lower texture should never be entered ever.
2018-12-14 01:31:40 +01:00
Christoph Oelckers
7ffc2f1275
- fixed invalid texture accesses in the software renderer.
2018-12-13 23:25:55 +01:00
Christoph Oelckers
134460bae6
- one final fix.
2018-12-12 20:16:02 +01:00
Christoph Oelckers
01e05c9b70
- now it's correct.
2018-12-12 20:11:09 +01:00
Christoph Oelckers
7ea1e8acee
- fixed layer creation.
2018-12-12 20:08:12 +01:00
Christoph Oelckers
173b8beb33
- cleaned out the FHardwareTexture class, now that the translations are finally handled on a higher level.
2018-12-12 18:55:55 +01:00
Christoph Oelckers
c5447f0cdd
- continued work on texture management.
2018-12-12 18:39:38 +01:00
alexey.lysiuk
14094ebeb9
- fixed crash on invoking vid_setsize CCMD with one argument
2018-12-12 10:15:53 +02:00
Christoph Oelckers
fb6ee5046c
- add the hardware texture container to FTexture.
...
Currently it does not use the translated entries yet.
# Conflicts:
# src/hwrenderer/textures/hw_material.cpp
2018-12-12 02:55:11 +01:00
Christoph Oelckers
e6b4c63b99
- More adjustments
2018-12-12 02:52:27 +01:00
Christoph Oelckers
245a8243b0
- separated the savepic texture handler from the regular PNG texture
...
This was leaking memory with being handled like a regular image texture and also would prevent further changes to the in-game texture handling because the savegame picture was imposing some limitations on FPNGTexture's implementation
2018-12-12 02:03:54 +01:00
Christoph Oelckers
2cf6d213e2
- fixed compile bugs
2018-12-12 01:27:04 +01:00
Christoph Oelckers
8fcc170e8f
- add font characters to the texture manager for easier management
...
These were the only non-transient textures not being handled by the texture manager which complicarted operations that require itrer
2018-12-12 01:25:25 +01:00
Christoph Oelckers
368c788789
- added a 'check only' option to CreateTexBuffer.
...
This is meant to calculate the content ID without constructing the texture buffer.
2018-12-12 00:46:58 +01:00
Christoph Oelckers
200188b3a4
- FHardwareTextureContainer.
...
This is essentially a stripped down version of FHardwareTexture, which can exist on the API independent size, and which stores pointers to hardware textures instead of OpenGL texture handles.
2018-12-12 00:34:37 +01:00
Christoph Oelckers
07f87e2542
- changed CreateTexBuffer to return its info in a structure and not as a naked pointer.
2018-12-11 21:06:34 +01:00
Christoph Oelckers
ab624c8c5a
Merge branch 'master' into Texture_Cleanup
...
# Conflicts:
# src/textures/hires/hqresize.cpp
2018-12-11 20:27:24 +01:00
Christoph Oelckers
f01d1ec072
- must merge before continuing...
2018-12-11 20:26:33 +01:00
Christoph Oelckers
86d851bc5c
- minor cleanup and allow FHardwareTexture to restore the old bindings after creating a texture.
2018-12-11 19:56:23 +01:00
alexey.lysiuk
8b46be7686
- print VM stack trace on startup abort exception
...
https://forum.zdoom.org/viewtopic.php?t=62650
2018-12-11 10:46:56 +02:00
Christoph Oelckers
abd6729d39
- fixed deprecation warnings for member functions not checking the version.
2018-12-11 00:35:22 +01:00
Christoph Oelckers
ad8f484836
- fixed: The JIT compiler crashed on missing ArgFlags.
...
For ad-hoc Dehacked state functions no ArgFlags are created, in this case they can just be assumed to not be relevant here, because none of these function produces reference arguments.
2018-12-11 00:22:54 +01:00
Christoph Oelckers
5666e4c805
- made camera textures operational again.
...
Now with proper separation of software rendering logic from the main part of the class.
2018-12-11 00:01:45 +01:00
Rachael Alexanderson
28516c2def
- split gl_texture_hqresize into two variables - one for mode, one for multiplier.
2018-12-10 14:25:29 -05:00
Christoph Oelckers
91a8f5cd04
Merge remote-tracking branch 'remotes/origin/master' into Texture_Cleanup
...
# Conflicts:
# src/polyrenderer/poly_renderthread.cpp
# src/swrenderer/r_renderthread.cpp
2018-12-10 18:47:21 +01:00
drfrag666
cbb5f8a0dc
- Fixed: the vid_rendermode CVAR could get wrong values.
2018-12-10 07:08:48 -05:00
alexey.lysiuk
6362415054
- fixed return value of native call to dynamic array's Reserve()
...
https://forum.zdoom.org/viewtopic.php?t=62841
2018-12-10 11:26:46 +02:00
alexey.lysiuk
8a4b8cc2ca
- server CVARs can be changed only by settings controller
...
Initially, settings controller flag was false by default
It was not touched during construction and destruction of player_t instances though
Now, with all members initialized in class definition, this flag must be saved and restored manually
https://forum.zdoom.org/viewtopic.php?t=62830
2018-12-10 10:36:40 +02:00
Christoph Oelckers
91bb7c0641
Let FSkyboxTexture map to the last defined regular texture of the same name instead of its first face
...
This is normally a better fallback for the software renderer.
2018-12-10 02:56:49 +01:00
Christoph Oelckers
0d07fb2550
Use FImageTexture for thre null texture
...
FDummyTexture had a big problem: Whenever it was accessed by accident it crashed the app because it wasn't fully implemented.
What it should do is return empty pixels of the given size, and an unextended FImageTexture is doing just that.
2018-12-10 02:50:22 +01:00
Christoph Oelckers
b32aa60760
Made SWPaletteTexture an ImageSource and let it be managed by the texture manager.
...
This is a lot easier to manage because the palette is just static data that can easily mimic an image.
2018-12-10 02:43:37 +01:00
Christoph Oelckers
4cd60fbe99
- added caching for true color images as well
2018-12-10 02:35:10 +01:00
Christoph Oelckers
2e7bcf9e41
- implemented a proper texture composition cache.
...
This will mostly ensure that each patch used for composition is only loaded once and automatically unloaded once no longer needed.
So far only for paletted rendering, but the same logic can be used for true color as well.
2018-12-10 01:17:39 +01:00
Christoph Oelckers
796c0fe931
- fixed precaching to consider animations and switches
2018-12-10 01:13:44 +01:00
Magnus Norddahl
f0ce453d47
- workaround pointer truncation bug in asmjit
2018-12-09 17:36:43 +01:00
Christoph Oelckers
5448874c6e
- moved image format detection logic from FTexture to FImageSource.
2018-12-09 17:10:51 +01:00
Christoph Oelckers
34884e2756
- base FFontChar1 and FFontChar2 on FImageSource as well.
...
Now the only textures not being backed by an image source that are actually getting used during normal rendering are the canvas textures.
2018-12-09 16:00:27 +01:00
Christoph Oelckers
9e25025315
- missed this new file.
2018-12-09 15:41:02 +01:00
Christoph Oelckers
4cedbf6cc2
- split between textures and images is complete now.
...
* split up FMultiPatchTexture into a builder class and the actual image source.
* since images can now be referenced by multiple textures the old redirection mechanism has been removed. It can be done better and less intrusive now. Simple single patch textures already directly reference the underlying patch image now.
* allocate all image source related data from a memory arena. Since this is all static this makes it a lot easier to free this in bulk.
2018-12-09 15:25:56 +01:00
alexey.lysiuk
40f77e5dac
- removed erroneous assertion
...
https://forum.zdoom.org/viewtopic.php?t=62815
2018-12-09 13:00:36 +02:00
alexey.lysiuk
f6bb33787b
- fixed Actor.A_StopSound() native call
...
Wrong function overload was selected by compiler
https://forum.zdoom.org/viewtopic.php?t=62820
2018-12-09 10:13:43 +02:00
Christoph Oelckers
91f7121452
- made some changes to the FImageSource interface that allows forwarding the bRemap0 flag, but do it so that it doesn't permanently alter how the image looks.
...
In ZDoom this would affect everything using a patch that got used in a front sky layer, even if the texture was totally unrelated. It is only owed to the low usability of such patches for other purposes that this hasn't caused problems.
2018-12-09 08:15:05 +01:00
Christoph Oelckers
583a740441
- separated the image converters from the texture offsets.
...
Mostly done, except for FMultiPatchTexture and FFontChar1 + 2.
Note that this commit leaks those image objects!
2018-12-09 07:39:05 +01:00
Magnus Norddahl
670d975a33
- moved argsCache out of JitCompiler::CreateFuncSignature
2018-12-08 23:31:55 +01:00
Christoph Oelckers
5eab944157
- started separating the texture class from the image format handlers.
2018-12-08 23:28:35 +01:00
Christoph Oelckers
e35d88e039
- moved some utility code out of FTexture.
2018-12-08 20:44:28 +01:00
Christoph Oelckers
03626107eb
- changed multipatch texture composition to always composite off full source images and not do it recursively.
...
Previously it tried to copy all patches of composite sub-images directly onto the main image.
This caused massive complications throughout the entire true color texture code and made any attempt of caching the source data for composition next to impossible because the entire composition process operated on the raw data read from the texture and not some cacheable image. While this may cause more pixel data to be processed, this will be easily offset by being able to reuse patches for multiple textures, once a caching system is in place, which even for the IWADs happens quite frequently.
Removing the now unneeded arguments from the implementation also makes things a lot easier to handle.
2018-12-08 17:23:15 +01:00
Christoph Oelckers
1e070d27bd
- replaced FTexture::FillBuffer
2018-12-08 14:06:16 +01:00
Christoph Oelckers
82bd742ea3
- reworked how the software renderer manages its textures.
...
* it's no longer the main texture objects managing the pixel buffer but FSoftwareTexture.
* create proper spans for true color textures. The paletted spans only match if the image does not have any translucent pixels.
* create proper warp textures instead of working off the paletted variants.
As a side effect, caching of pixel buffers for texture composition is temporarily disabled, as it management of texture redirections. These things will be reimplemented once things progress further. The existing methods here had their share of serious issues that should be fixed.
2018-12-08 12:42:35 +01:00
Christoph Oelckers
92b722e0ee
- don't put mutexes into static local variables.
...
Their initialization semantics are not safe for synchronization objects.
2018-12-08 11:56:31 +01:00
Christoph Oelckers
e70138a266
- fixed crash with FraggleScript in Nimrod MAP02.
2018-12-07 20:15:02 +01:00
alexey.lysiuk
0dfb0d8427
- fixed broken Z coordinate in Actor.Vec3Angle() native call
2018-12-07 10:20:18 +02:00
Christoph Oelckers
69cc1f831c
Renamed FTexture::GetPixels
...
This was needed to allow refactoring without letting all the other GetPixels get in the way.
2018-12-07 03:35:10 +01:00
Christoph Oelckers
9409843931
- replaced the last access operator, too
...
Now everything uses a function.
This really wasn't what operators are supposef to be used for.
2018-12-07 03:01:40 +01:00
Christoph Oelckers
42b18e6dfb
- Disable PALVERS substitution when true color rendering is active.
2018-12-07 02:53:50 +01:00
Christoph Oelckers
79a0f76801
- replaced TexMan.operator() with two functions.
...
This was done to make reviewing easier, again because it is virtually impossible to search for the operators in the code.
Going through this revealed quite a few places where texture animations were on but shouldn't and even more places that did not check PASLVERS, although they were preparing some paletted rendering.
2018-12-07 02:53:18 +01:00
Christoph Oelckers
3dc9eab743
Renamed the operator() and [] methods in FTextureManager which take a name
...
The operators cannot be easily searched for so this makes it hard to do any evaluations on the use of this method.
2018-12-07 02:43:27 +01:00
Christoph Oelckers
9fedecbe60
Renamed FTextureManager::GetTexture to GetTextureID
...
It doesn't return a texture after all and I want to repurpose the name for something else.
2018-12-07 02:31:30 +01:00
Christoph Oelckers
3491182ac3
- fixed compilation
2018-12-07 02:21:39 +01:00
Christoph Oelckers
bde3558dc2
- moved the bit size variables to FSoftwareTexture
...
They are only needed by the software rasterizer.
2018-12-07 02:13:11 +01:00
Christoph Oelckers
18c1a3abe5
- make the FWarpTexture class local to the software renderer.
...
This class has only meaning for software-based warping so it doesn't have to be a part of the FTexture hierarchy.
Making it a subclass of FSoftwareTexture is fully sufficient.
2018-12-07 00:58:37 +01:00
Christoph Oelckers
4c67785c40
- moved the span and swtruecolor creation code into FSoftwareTexture.
2018-12-07 00:04:39 +01:00
Christoph Oelckers
32e245f2b9
- moved the software rendering specific parts of the sky setup to r_skyplane.cpp.
2018-12-06 20:52:03 +01:00
Christoph Oelckers
a4d61e6fb1
- everything compiles again.
...
As a bonus this already fixes several bugs caused by the botched texture scaling implementation the original texture manager came with.
System cursors are currently disabled because they rely on functionality that needs to be moved to different classes.
2018-12-06 20:12:15 +01:00
alexey.lysiuk
f6561ca23b
- fixed native calls to LevelLocals.GetUDMF*() functions
...
https://forum.zdoom.org/viewtopic.php?t=62774
2018-12-06 17:04:41 +02:00
Rachael Alexanderson
9c023c78a4
- changing vid_scalefactor now always shows current scaling data unless it gets set to "1"
...
- vid_scaletoheight/width now works in all scaling modes, and can now also scale on custom resolutions directly
2018-12-06 09:20:01 -05:00
Magnus Norddahl
e83af15907
- remove some redundant variables
2018-12-06 04:34:19 +01:00
Magnus Norddahl
2aefeb6401
- Use static ifs (C++11 version of them, anyhow) for the triangle draw function
2018-12-06 03:10:14 +01:00
Christoph Oelckers
6eab4a882c
- narrowing down the public interface of the texture class
...
Cannot refactor if the entire class is this wide open to everything.
Not complete yet, doesn't fully compile!
2018-12-06 01:11:04 +01:00
Christoph Oelckers
e22e249287
- this "genuine hack" was totally redundant...
2018-12-06 00:34:17 +01:00
Christoph Oelckers
aef882c137
- more direct native stuff, this is a week old but was almost forgotten.
2018-12-06 00:28:05 +01:00
Christoph Oelckers
e01306d403
- missed one definition for adding a direct native call.
2018-12-06 00:17:07 +01:00
Christoph Oelckers
494a113920
- more direct native entry points.
...
- disallow bool as a return value for direct native calls because it only sets the lowest 8 bits of the return register.
- changed return type for several functions from bool to int where the return type was the only thing blocking use as direct native call.
2018-12-05 20:10:44 +01:00
Christoph Oelckers
2e7e6cba9d
- scriptified P_CheckMeleeRange2.
2018-12-05 18:58:15 +01:00
Christoph Oelckers
e4e86dd4f8
- fixed: Direct native functions for the JIT compiler may not return bool.
...
A bool will only set the al register on x64, but the entire eax needs to be set for the JIT code to deal with it.
2018-12-05 18:41:19 +01:00
Christoph Oelckers
de5ab0b4b6
- deprecated a few functions that depend on AAPTR_* to be useful.
2018-12-05 18:33:59 +01:00
alexey.lysiuk
b8c4a506a7
- fixed linking of optimized targets
...
CMakeFiles/zdoom.dir/r_utility.cpp.o: In function `R_SetupFrame(FRenderViewpoint&, FViewWindow&, AActor*)':
/home/travis/build/coelckers/gzdoom/src/r_utility.cpp:832: undefined reference to `AActor::GetCameraHeight() const'
CMakeFiles/zdoom.dir/g_shared/a_action.cpp.o: In function `A_Unblock(AActor*, bool)':
/home/travis/build/coelckers/gzdoom/src/g_shared/a_action.cpp:64: undefined reference to `AActor::GetDropItems() const'
2018-12-05 18:10:22 +02:00
Christoph Oelckers
148d75251f
- fix it
2018-12-05 17:41:25 +01:00
Christoph Oelckers
eb282c0d11
Merge branch 'master' of https://github.com/coelckers/gzdoom
...
# Conflicts:
# src/scripting/vmthunks_actors.cpp
2018-12-05 17:34:53 +01:00
Christoph Oelckers
6c9d0b166a
Added direct native entry points to a larger number of functions.
2018-12-05 17:34:11 +01:00
alexey.lysiuk
101ebe1731
- fixed linking of optimized POSIX targets
...
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Distance2DSquared(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x6ab): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Distance3DSquared(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x75f): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Vec3To(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x850): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Vec2To(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x930): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_DistanceBySpeed(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0xa00): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o:vmthunks_actors.cpp:(.text+0xad3): more undefined references to `AActor::PosRelative(AActor const*) const' follow
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_PosRelative(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x1200): undefined reference to `AActor::PosRelative(sector_t*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_ClearInterpolation(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x127d): undefined reference to `AActor::ClearInterpolation()'
vmthunks_actors.cpp:(.text+0x1298): undefined reference to `AActor::ClearInterpolation()'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_GetBobOffset(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x135a): undefined reference to `AActor::GetBobOffset(double) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Distance2D(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x222b): undefined reference to `AActor::PosRelative(AActor const*) const'
2018-12-05 10:25:07 +02:00
Christoph Oelckers
a846ed391e
- fixed: ST_FormatMapName did not clear the string it wrote to before appending text.
2018-12-05 08:29:39 +01:00
Christoph Oelckers
5e1fc45816
fixed missing include.
2018-12-05 08:22:24 +01:00
Christoph Oelckers
2f2ce8126b
- fixed definition of GetUDMFString export.
2018-12-05 08:18:07 +01:00
Rachael Alexanderson
0d891b6289
- Enforce CheckCheatmode() for cheat-enforced CVARs, allowing them to be changed in normal single player games
2018-12-05 00:21:39 +01:00
Christoph Oelckers
33db5792b4
- moved a large part of the VM thunks out of p_mobj.cpp.
2018-12-05 00:21:16 +01:00
Christoph Oelckers
a3265c2963
- more direct native entry points.
2018-12-04 23:12:16 +01:00
Christoph Oelckers
3b5ce4ecca
- fixed: SBar_SetClipRect had a superfluous argument resulting in incorrect behavior
2018-12-04 19:14:14 +01:00
Christoph Oelckers
e928b94ab2
- missed the header...
2018-12-04 18:53:12 +01:00
Christoph Oelckers
d0f037d14f
- the native APlayerPawn::PlayAttacking2 function is not needed anymore.
2018-12-04 18:51:03 +01:00
Christoph Oelckers
8025f02935
- fix bad return type.
2018-12-04 18:47:03 +01:00
Christoph Oelckers
d7da2d838f
- handle JIT errors in a more user-friendly fashion than aborting.
...
* use I_Error instead of I_FatalError to abort. I_FatalError is only for things that are not recoverable and should not be handled outside of error cleanup and rethrowing.
* only catch CRecoverableError in JitCompile. Everything else should fall through to the outermost catch block.
* Do not I_FatalError out after handling the exception locally. Just print an error and return null, indicating failure.
2018-12-04 18:45:07 +01:00
Christoph Oelckers
45d7e5a038
- scriptified ASpecialSpot.
...
This only had two simple native methods so the class is not fully scripted.
2018-12-04 18:21:48 +01:00
Christoph Oelckers
de9805d5c7
- treat REGT_STRING | REGT_ADDROF just like REGT_STRING for direct native functions.
...
Both pass a reference so there's no need to treat them differently.
2018-12-04 18:21:00 +01:00
Christoph Oelckers
062528e0e2
- more direct native function calls.
2018-12-04 18:16:01 +01:00
Christoph Oelckers
5e4b366724
Removed all native components from AInventory.
2018-12-04 18:06:09 +01:00
Christoph Oelckers
d66516ec82
- scriptified A_SpawnSingleItem, which was the last piece of native code still referencing AInventory
2018-12-04 17:55:45 +01:00
Christoph Oelckers
2459b27895
- scriptified A_SelectWeapon and inlined the last remaining use of APlayerPawn::SelectWeapon.
2018-12-04 17:41:55 +01:00
Christoph Oelckers
44e43c48b5
- scriptified A_SelectWeapon
2018-12-04 17:31:25 +01:00
Christoph Oelckers
9348baeeb1
Removed all remaining references to AInventory
...
What remains is the class definition and one single reference that will be scriptified.
2018-12-04 17:11:36 +01:00
Christoph Oelckers
cd563cc4db
Removed more literal references to AInventory.
2018-12-04 17:00:48 +01:00
Christoph Oelckers
3d28006eda
- started removing literal references of AInventory, so far only simple stuff.
2018-12-04 00:41:39 +01:00
Christoph Oelckers
a573c63f60
- removed all direct access to AInventory's members.
...
We are getting closer to make class Inventory fully scripted.
2018-12-04 00:22:26 +01:00
Magnus Norddahl
14919f49ec
- gcc/clang didn't like having this in a class
2018-12-03 23:39:03 +01:00
Magnus Norddahl
ae44b936eb
- add bool and unsigned int to the allowed types
...
- fix one case where floats were used (the JIT always calls with doubles)
2018-12-03 23:09:23 +01:00
Magnus Norddahl
ba0c7652eb
- perform compile time validation of direct native function signatures
2018-12-03 22:59:56 +01:00
Magnus Norddahl
5d9784f215
- fix VM native calls containing strings and enable them again
2018-12-03 21:58:01 +01:00
Magnus Norddahl
4f078dfcb3
- fix compile error
2018-12-03 21:57:07 +01:00
Magnus Norddahl
3ac2e74f1c
- GetInventoryIcon must return an integer for it to work for VM native calls
2018-12-03 21:56:06 +01:00
Christoph Oelckers
7df8245102
- added missing min/max unsigned instructions for the VM.
2018-12-03 21:12:39 +01:00
Rachael Alexanderson
493ff5f089
- always apply vid_scalefactor now, even when vid_scalemode is not 0 or 1.
2018-12-03 13:38:18 -05:00
Christoph Oelckers
b6d0492478
- fixed crash with weapons which remove themselves from the inventory but continue calling action functions.
...
This is still an error, so now this throws a meaningful exception.
2018-12-03 18:51:24 +01:00
Christoph Oelckers
6faeadaceb
- hardened the seg integrity checks against extremely broken mods.
...
Temple of the Lizardmen 3 has segs lumps in every level that seem to use a different data format and are completely unusable, up to triggering undefined behavior.
2018-12-03 18:10:36 +01:00
Christoph Oelckers
1b07bded47
- fixed: The static variant of PClass::FindFunction may only be used for actual static variables.
2018-12-03 17:41:05 +01:00
Christoph Oelckers
0e095b0c05
- removed all direct references of AInventory::Owner and AInventory::Amount from the C++ code.
2018-12-03 17:41:05 +01:00
Christoph Oelckers
53291b0abf
Merge branch 'master' of https://github.com/coelckers/gzdoom
2018-12-03 15:54:09 +01:00
Christoph Oelckers
40a67b8c9a
- fixed issues with Dehacked's ad-hoc script code generation
...
* The functions had no prototype and caused crashes.
* even after creating a prototype it didn't work because CreateAnonymousFunction was set up incorrectly for the case where a known return type was given.
2018-12-03 12:24:55 +01:00
Magnus Norddahl
1e30bc72fe
- compare against the thing renderstyle since the local copy has been modified
2018-12-03 11:10:40 +01:00
Magnus Norddahl
4604c9379c
- disable alpha test on models if the renderstyle isn't STYLE_Normal
2018-12-03 10:46:28 +01:00
Christoph Oelckers
39d90d022b
- made the BUddha checks readable again.
2018-12-03 09:48:05 +01:00
Christoph Oelckers
d7bb1726ab
- fixed compile warning
2018-12-03 09:14:11 +01:00
Christoph Oelckers
099b278f18
- removed assert that got triggered in an edge case that must pass here.
2018-12-02 23:35:18 +01:00
Christoph Oelckers
d222e82bbc
- implemented missing 'exact' parameter for ThinkerIterator.Next.
2018-12-02 23:15:34 +01:00
Christoph Oelckers
bfcd714186
- started replacing direct references to class AInventory.
...
The easiest part was the type checks which could be changed to the name variant with a global search and replace.
2018-12-02 21:35:55 +01:00
Major Cooke
6fd3bea38c
- fixed: P_PoisonPlayer and P_PoisonDamage did not check for NODAMAGE.
...
- fixed: P_PoisonDamage's check for Buddha2 and the Buddha powerup were inverted.
- fixed: P_PoisonDamage checked the modified damage instead of the raw, allowing amplifiers to boost the damage beyond telefrag and circumventing regular buddha.
2018-12-02 21:14:22 +01:00
Christoph Oelckers
807df33e1a
- scriptified AInventory::Tick.
...
This was the last bit of code standing in the way of making AInventory a fully scripted class.
All that's left to sort out is some variable accesses - the vast majority of them in SBARINFO.
2018-12-02 20:58:15 +01:00
Magnus Norddahl
d88d173b38
- ptest is a SSE 4.1 instruction
2018-12-02 20:44:36 +01:00
Christoph Oelckers
2e383073e8
- scriptified the AutoUseHealth feature.
...
This again is a piece of code that reads and even writes to inventory items' properties, so better have it on the script side.
2018-12-02 19:45:45 +01:00
Christoph Oelckers
3182569fb8
- scriptified the decision making of the invuseall CCMD.
...
Custom items had no way to adjust to this - and it also was the last native access to ItemFlags.
2018-12-02 18:43:38 +01:00
Christoph Oelckers
93f91d1039
- scriptified P_DropItem.
2018-12-02 18:31:18 +01:00
Christoph Oelckers
a5fc26b37c
- scriptified the no-spawn flag check for armor and health items.
2018-12-02 18:04:44 +01:00
Christoph Oelckers
319f8743db
- consolidated the check for "is actor an owned inventory item" into a subfunction.
...
This check occured 9 times in the source, better have it only once.
2018-12-02 16:53:12 +01:00
Christoph Oelckers
ee08412e49
- scriptified G_PlayerFinishLevel.
...
Outside of SBARINFO this was the biggest remaining piece of code that referenced AInventory internals.
2018-12-02 16:26:02 +01:00
Christoph Oelckers
719598aae4
- scriptified AActor::ClearInventory
2018-12-02 15:24:44 +01:00
Christoph Oelckers
2cb0b2db87
- took the last methods aside from Tick and Serialize out of AInventory.
2018-12-02 14:56:10 +01:00
Christoph Oelckers
db814dc333
- properly hook up the alt HUD with the status bar.
2018-12-02 14:34:10 +01:00
Christoph Oelckers
d11b33e8fd
- scriptified the last components of the alternative HUD.
...
- moved the ALTHUDCF parser PClass::StaticInit, so that it gets done right after creating the actor definitions.
All left to do is not to reallocate the AltHud object for each frame but store it in a better suited place.
2018-12-02 14:34:10 +01:00
Christoph Oelckers
ba905321b0
- scriptified the main drawer for the in-game HUD and removed all intermediate VM calls from the native source.
2018-12-02 14:34:09 +01:00
Christoph Oelckers
fe39236ee1
- scriptified the AltHUD'S powerup drawer.
2018-12-02 14:34:09 +01:00
Christoph Oelckers
ddaab4d2ab
- scriptified and cleaned up the AltHUD's DrawCoordinates, DrawTime and DrawLatency functions.
...
Some backing functionality was moved elsewhere because scripting should not have access to low level system information.
2018-12-02 14:34:09 +01:00
Christoph Oelckers
4431ec06fd
- scriptified the AltHUD's inventory drawer and fixed the InvPrev CCMD.
2018-12-02 14:34:09 +01:00
Christoph Oelckers
714ca9b2ce
- scriptified the AltHUD's weapon drawer.
2018-12-02 14:34:08 +01:00
Christoph Oelckers
1406c11f8e
- added the missing TNT1A0 check for icon-less keys.
...
Since it tries to get the icon from the spawn state it also has to check if that actually has a valid sprite.
2018-12-02 14:34:08 +01:00
Christoph Oelckers
fbc441673a
- AltHUD ammo drawer scriptified.
2018-12-02 14:34:08 +01:00
Christoph Oelckers
0cd93c14af
- allow %*d etc. format specifiers in ZScript, but only for numeric types.
2018-12-02 14:34:08 +01:00
Christoph Oelckers
4a1f011dc1
- Alt HUD scriptification, part 1.
2018-12-02 14:34:08 +01:00
Magnus Norddahl
edc05111cd
- don't use SSE for integer min/max
2018-12-02 09:58:08 +01:00
Magnus Norddahl
706a923884
- Use SSE2 for min/max instead
2018-12-02 07:35:02 +01:00
Christoph Oelckers
c66dae9f2c
- this was wrong...
2018-12-02 00:08:19 +01:00
Christoph Oelckers
117537339d
- fixed script call in PickNewWeapon.
2018-12-01 23:36:48 +01:00
Christoph Oelckers
2d0b90deb1
- fixed: P_Massacre without a class restriction no longer worked.
2018-12-01 22:44:06 +01:00
Christoph Oelckers
577af8860c
- scriptified invnext and invprev CCMDs.
2018-12-01 22:37:12 +01:00
Christoph Oelckers
5c647de70c
- moved ValidateInvFirst to the script side because this was one of the major functions that directly reference AInventory.
2018-12-01 17:46:20 +01:00
Christoph Oelckers
bc1990b6d7
- moved AInventory::DoRespawn fully to the script side.
2018-12-01 17:29:37 +01:00
Christoph Oelckers
3922f817fb
- made CallTryPickup a global function.
...
This one still gets called in too many places but stands in the way of moving Inventory fully to the script side.
2018-12-01 17:21:40 +01:00
Christoph Oelckers
7b63e088e1
- moved the GetBlend script call to the one single place where it is needed to get rid of one native AInventory method.
2018-12-01 17:21:20 +01:00
Christoph Oelckers
a14b0c58bf
- re-fixed the massacre fix for Dehacked-modified inventory items.
...
Instead of overriding the Massacre method it is preferable to clear the flags causing the bad behavior, most notably ISMONSTER.
# Conflicts:
# src/g_inventory/a_pickups.cpp
# src/g_inventory/a_pickups.h
2018-12-01 17:20:52 +01:00
Christoph Oelckers
7301bbc58e
- scriptified GiveAmmo and the one remaining piece of native code still using it.
2018-12-01 17:20:23 +01:00
Christoph Oelckers
2c59172c42
- scriptified DropInventory.
2018-12-01 17:18:26 +01:00
Christoph Oelckers
09129e0113
- scriptified UseInventory and several functions using the already scriptified ones,
2018-12-01 17:17:08 +01:00
Christoph Oelckers
588ddd185b
- scriptified TakeInventory, including the ACS/FS interfaces.
2018-12-01 17:11:09 +01:00
Christoph Oelckers
e7d309cb96
- code consolidation in invnext and invprev.
2018-12-01 17:09:43 +01:00
Christoph Oelckers
023efc7685
- scriptified RemoveInventory and Inventory.OnDestroy.
2018-12-01 17:09:23 +01:00
Christoph Oelckers
eb47fb9adc
- scriptified GiveInventory and made the interface a bit more configurable by mods.
...
Now a child type can decide for itself how to treat 'amount'.
The scripting interfaces to this function in ACS and FraggleScript have been consolidated and also scriptified.
2018-12-01 17:07:09 +01:00
Christoph Oelckers
a426655d61
- scriptified AddInventory.
2018-12-01 17:03:58 +01:00
Christoph Oelckers
d812b94d57
- disabled direct native functions for now until the problems with string arguments are fixed.
2018-12-01 16:56:55 +01:00
Christoph Oelckers
691652042c
- added direct native variants to nearly all status bar function.
...
I skipped ValidateInvFirst because that one will have to be scriptified soon.
2018-12-01 16:54:31 +01:00
Magnus Norddahl
5169a5b119
- minor code cleanup now that it is working
2018-12-01 14:35:21 +01:00
Christoph Oelckers
85a3edf583
- removed the no longer needed exception prevention hack.
...
# Conflicts:
# src/scripting/vm/vmframe.cpp
2018-12-01 14:27:18 +01:00
Christoph Oelckers
067e9de00a
- fixed: V_FindFontColor is not suitable for direct calls from JIT code, thanks to its FName parameter.
2018-12-01 14:26:53 +01:00
Christoph Oelckers
aa32acae25
- a bit of code reordering for adding direct native entry points.
...
- offloaded key list generation for alternative HUD to non-UI parts.
This change also revealed a problem with handling empty sprites in the key list so this got fixed, too.
2018-12-01 14:18:28 +01:00
Magnus Norddahl
83c011740c
- fix augmentation length bug
2018-12-01 14:14:28 +01:00
Magnus Norddahl
b428136866
- unwind data is now working on macOS
2018-12-01 12:46:35 +01:00
Christoph Oelckers
a7e472b4b3
- moved all exports from class Font to vmthunks.cpp and gave them direct native entrypoints.
...
- changed PARAM_STRING to use the passed string by reference instead of by value. The 3 instances where passing by value was needed now use PARAM_STRING_VAL.
2018-12-01 10:30:50 +01:00
Christoph Oelckers
ea3d26aafd
- fixed character to int conversion for UTF8-characters.
2018-12-01 10:30:50 +01:00
alexey.lysiuk
8d9b4f5a17
- previous fix attempts done right
2018-12-01 09:44:14 +02:00
SanyaWaffles
6dd73e43fd
Attempts to fix errors introduced by merging of asmjit branch and wea… ( #649 )
...
* Attempts to fix errors introduced by merging of asmjit branch and weapons scripting branch
* This didn't work. The others should work though.
* fix scriptutil.cpp:(.text+0x18d): undefined reference to `PClass::FindActor(FName)'
* Attempt to fix compilation on macOS
2018-12-01 07:31:25 +01:00
Magnus Norddahl
c41603c171
- implemented unwind data on Unix - does it work? no idea, there's no easy way to tell when the debugger doesn't support the interface..
2018-12-01 01:14:15 +01:00
Christoph Oelckers
42b9a41421
- removed the longjmp based exception catch/rethrow mechanism and instead force-terminate in case a user exception is thrown while the VM is executing JITed code on a non-Windows system
...
On Windows none of this is needed, because we can generate a proper unwind frame for the JITed functions, but even on Linux, it would require manual additions to each single piece of native code that ever gets called from inside a JIT compiled function.
This is an utterly prohibitive proposition because it makes direct native calls a virtual impossibility
So, in order to get the thrown error properly presented both I_Error and ThrowAbortException will now forward to I_FatalError if it is called from inside a JIT context.
2018-11-30 21:30:14 +01:00
Christoph Oelckers
b26b16e4b7
Merge remote-tracking branch 'remotes/origin/master' into asmjit
2018-11-30 21:29:12 +01:00
Christoph Oelckers
a0c0e8bdfe
Merge remote-tracking branch 'remotes/origin/weapon_scriptification' into asmjit
...
# Conflicts:
# src/g_inventory/a_pickups.cpp
2018-11-30 21:28:44 +01:00
Christoph Oelckers
32f7e9a9ea
-add a dummy definition for vm_jit in 32 bit.
2018-11-30 20:50:31 +01:00
Christoph Oelckers
62f649b4f6
- fixed: the direct native GetTextureSize used the wrong calling convention.
2018-11-30 19:28:24 +01:00
Player701
b79e3f8904
- Added a flag to make bouncing objects disappear when hitting sky surfaces
2018-11-30 18:53:57 +01:00
Christoph Oelckers
8e46cb3a21
Merge remote-tracking branch 'remotes/origin/master' into asmjit
2018-11-30 18:49:28 +01:00
Christoph Oelckers
00d97197db
- removed deprecated method to retrieve OpenGL extensions
...
Since we force a core profile and this was explicitly disabled for core profiles, this code has no use anymore
2018-11-30 17:16:21 +01:00
Christoph Oelckers
a3df67bdd4
- let FOBJModel::ParseVector actually use its templated size parameter
...
In this setup the array can be statically updated because the size is always constant per instantiation
2018-11-30 17:12:36 +01:00
Christoph Oelckers
25ad71a113
- Changed a few allocations into usin TArrays
...
S_SoundCurve in particular looked like a candidate for leaking memory.
2018-11-30 17:07:42 +01:00
Christoph Oelckers
024870ba11
- merged DCanvas and DSimpleCanvas and use a TArray to hold its memory.
2018-11-30 17:02:39 +01:00
Magnus Norddahl
cb1153272a
- fix native call crash and assertion error
2018-11-30 16:55:22 +01:00
Magnus Norddahl
6e598274f7
- hook up unix unwind info (still not working)
2018-11-30 02:06:40 +01:00
Player701
927d333063
- Exported AActor::Grind to ZScript.
2018-11-29 23:46:47 +01:00
Magnus Norddahl
b1bb82fe01
- fix WriteSLEB128
2018-11-29 19:44:26 +01:00
Magnus Norddahl
5d052fc565
- fix compile errors
2018-11-29 19:32:08 +01:00
Magnus Norddahl
37e33c6609
- implemented unwind info for Linux and macOS - now to fix the bugs that cannot be fixed when the documentation is as useless as it is for those platforms..
2018-11-29 18:45:55 +01:00
Christoph Oelckers
19df662348
- fixed code generation for dummy results.
2018-11-29 20:15:53 +01:00
Christoph Oelckers
b8394b2f16
- fixed compilation warnings.
2018-11-29 20:11:28 +01:00
Christoph Oelckers
717912c88c
- direct native methods for dynamic arrays.
2018-11-29 20:09:41 +01:00
Christoph Oelckers
3ecda35379
Add direct native calls to TexMan's native methods.
2018-11-29 19:41:03 +01:00
Christoph Oelckers
3acd9c8116
Made all virtual base functions for the event handler scripted
...
This was by far the largest block of native virtuals, and they were only native to be able to allow checking if the event was implemented for the current handler. This can easily be done by looking at the byte code, just like VMCall also does but in turn it removes more than half of the existing native virtuals from the interface.
2018-11-29 18:46:28 +01:00
Magnus Norddahl
110b982031
- fix compile error on systems with no SSE support
2018-11-29 13:08:46 +01:00
Christoph Oelckers
762a100d60
Direct native functions for SBarInfo
...
Mostly pointless because they all get used only once and aren't even virtual overrides, but I only realized this after everything was complete…
2018-11-29 12:20:24 +01:00
Christoph Oelckers
53d59559cd
Added direct native functions to the remaining content of vmthunks.cpp
2018-11-29 17:55:56 +01:00
Christoph Oelckers
62efe11a85
- more direct native functions for sector utilities.
2018-11-29 17:38:58 +01:00
Magnus Norddahl
e3c13fe193
- Emit DW_CFA_advance_loc and DW_CFA_def_cfa_offset codes
2018-11-29 02:37:58 +01:00
Christoph Oelckers
f43f0b9bd4
- added a few more direct native entry points.
2018-11-29 00:27:09 +01:00
Magnus Norddahl
fa185693d2
- _mm_rcp_ps may be faster but its precision is too poor
2018-11-29 00:17:40 +01:00
Magnus Norddahl
4ee7cf2de1
- forgot to set the light level
2018-11-29 00:03:50 +01:00
Magnus Norddahl
d62a26a177
- use psprite renderstyle on HUD models
2018-11-29 00:01:16 +01:00
Christoph Oelckers
d3ff657231
- added a direct native function for NextHighestCeilingAt to test multiple return values.
2018-11-28 21:40:56 +01:00
Magnus Norddahl
5ae456d059
- fix typo in macro
2018-11-28 19:59:35 +01:00
Christoph Oelckers
a5a9ab07af
Merge branch 'master' into asmjit
2018-11-28 18:44:42 +01:00
Christoph Oelckers
9c398cd343
- fixed: P_Recalculate3DFloors may not be called before the vertex buffer has been set up.
...
Since this function creates dynamic copies for 3D floors that need to be split it requires the vertex buffer index to be set up.
In older versions this did not produce errors because there was a fallback render path that was less efficient.
Now with that fallback removed this resulted in temporary 3D floors being created without valid vertex data.
2018-11-28 18:42:37 +01:00
Magnus Norddahl
232c24e4de
- add .eh_frame generation code except for building the actual CIE and FDE instructions
2018-11-28 13:10:31 +01:00
Christoph Oelckers
fc7ca39927
- allocate storage for all of a function's return values
2018-11-28 00:24:50 +01:00
Christoph Oelckers
6a9696e525
- moved the remaining exports from p_sectors.cpp to vmthunks.cpp
2018-11-28 00:24:50 +01:00
Magnus Norddahl
8860517bbd
- pass additional return values as the last args to a direct native call
2018-11-27 20:43:35 +01:00
Magnus Norddahl
3202c86ea7
- use the OP_PARAM and OP_RESULT opcodes to build the function signature
2018-11-27 19:56:39 +01:00
Christoph Oelckers
5e4e9e2c2b
Merge branch 'master' into asmjit
2018-11-27 19:53:22 +01:00
Christoph Oelckers
59b4e297c0
- fixed the mapping of additive translucency to color-based translucency.
...
The destination mode sould be 'One', not 'InvSrcColor'.
Now both of these are available as explicit modes, not just through the optional mapping.
2018-11-27 19:43:10 +01:00
Christoph Oelckers
3d3a00fd0d
- fixed: The flat drawer did not check for full brightness before processing dynamic lights.
2018-11-27 17:49:10 +01:00
Magnus Norddahl
d5b9b8e57a
- fixed missing setRet call for REGT_POINTER return types
2018-11-27 17:10:20 +01:00
Magnus Norddahl
9dbb1d77ce
- fix compile error
2018-11-27 17:02:51 +01:00
Magnus Norddahl
73819d45b7
- annotate which function we are calling for better dumpjit info
2018-11-27 17:00:29 +01:00
Magnus Norddahl
d195efc431
Merge remote-tracking branch 'origin/master' into asmjit
2018-11-27 15:38:10 +01:00
Magnus Norddahl
5e01a874be
- merge the span step code used by both the 8 bit and 32 bit drawers
2018-11-26 17:02:01 +01:00
Magnus Norddahl
dbb7df998d
- step with SSE
2018-11-26 14:32:56 +01:00
Magnus Norddahl
2db433e68f
- only do shade clamps if needed
2018-11-26 12:18:07 +01:00
Magnus Norddahl
8b852ce4d8
- move the jit runtime to its own file
2018-11-26 10:46:09 +01:00
Magnus Norddahl
52b7a77771
- use SSE for the dynlights
2018-11-26 00:49:07 +01:00
Christoph Oelckers
47b1fa774d
Merge branch 'asmjit' into weapon_scriptification
...
# Conflicts:
# src/gi.cpp
# wadsrc/static/zscript/base.txt
2018-11-26 00:14:44 +01:00
Christoph Oelckers
90d79865a5
Merge branch 'master' into asmjit
2018-11-25 23:33:23 +01:00
Christoph Oelckers
182d43ae70
- fixed: Any direct native function may not use struct values as parameters, not even something as simple as an FName.
2018-11-25 23:33:15 +01:00
Christoph Oelckers
bef5b953b2
- free everything.
2018-11-25 23:33:15 +01:00
Christoph Oelckers
34a1c8e545
- delete JIT data when shutting down.
2018-11-25 23:33:14 +01:00
Magnus Norddahl
c164b3c3b0
- fix: float constants got their move instructions inserted after the call instruction
2018-11-25 22:26:38 +01:00
Christoph Oelckers
d79ef939e9
- fixed: The serializer must treat object that were already destroyed or are declared transient like a null pointer and not ignore them.
...
This caused FraggleScript's SpawnedThings array to go out of sync.
2018-11-25 22:13:14 +01:00
Christoph Oelckers
9475bfe4f1
- declare builtins as static.
2018-11-25 21:47:28 +01:00
Christoph Oelckers
176da5de68
- added a direct native variant for A_PlaySound because this function is relatively easy to test.
2018-11-25 18:41:27 +01:00
Magnus Norddahl
61b91f9814
- fix macro expansion error on gcc and clang
2018-11-25 18:37:26 +01:00
Magnus Norddahl
d30bf44dcc
- use SSE for the normal walls
2018-11-25 17:11:05 +01:00
Christoph Oelckers
2b960aa28f
- finished adding direct native functions to vmthunks.cpp.
2018-11-25 16:12:15 +01:00
Magnus Norddahl
53175c49a7
- change DrawSpanOpt32 to render a scanline in multiple steps as the speed is about the same and it will make it easier to use SSE for each of the steps
2018-11-25 15:49:15 +01:00
Christoph Oelckers
03364a8c3e
- all sector exports done.
2018-11-25 15:14:48 +01:00
Christoph Oelckers
8e8ee732f4
- another batch of direct native functions.
2018-11-25 14:19:19 +01:00
Christoph Oelckers
6628b34f4a
- continued work on adding direct native support.
2018-11-25 13:35:32 +01:00
Christoph Oelckers
dc16c1d44e
- moved VM thunks from p_sectors.cpp to a separate file and started adding direct native implementations.
...
For a few larger functions I took them out of sector_t and made them global functions to avoid creating more unnecessary stubs.
2018-11-25 11:34:50 +01:00
Christoph Oelckers
a501a22b28
- define the built-in functions defined in codegen.cpp through the regular interface instead uf just hacking them into the symbol table with incompletely set up data.
...
- added direct native variants to these builtins and fixed problems with builtin processing.
2018-11-25 11:41:29 +01:00
Christoph Oelckers
43d434b071
- removed AStateProvider from native code.
...
The only place still referencing it was CallStateChain, so this has been made a static function now instead of a class method.
2018-11-25 10:09:06 +01:00
Christoph Oelckers
f4789bdefc
- fixed handling of dummy flags.
2018-11-25 10:06:00 +01:00
Christoph Oelckers
d6b781312c
- removed all remaining native components of the weapon class.
2018-11-25 10:00:55 +01:00
Christoph Oelckers
70d3c31551
- allow defining flags in the script declaration of a class and do that for Weapon.
2018-11-25 09:29:12 +01:00
Christoph Oelckers
b5c4ab8c47
- removed all direct access to AWeapon's members to prepare moving this class fully to the script side.
...
Disregarding UI-side and setup-related calls there's unfortunately still 6 places in the native game code which require direct access.
2018-11-25 08:17:37 +01:00
Christoph Oelckers
00a48b09e5
- moved the 'Finalize' methods back into a single function in the parser code.
...
It has been like this initially but was changed when ZDoom gained an overly complicated polymorphic class descriptor object that required a lot of support code. All these complications have long been removed but these methods remained. Since they prevent a class from being moved to the script side entirely they had to be removed.
This was the last major blocker to make Weapon a purely scripted class, the only remaining native method is Serialize which is of no concern for the coming work.
2018-11-25 08:16:18 +01:00
Christoph Oelckers
7012179904
- moved MarkPrecacheSounds completely to the script side and added native support to make this a usable feature.
2018-11-25 07:43:05 +01:00
Christoph Oelckers
8fa16b6c30
- some cleanup on the weapon slot interface.
...
This really shouldn't make any decisions from directly reading weapon class defaults.
2018-11-25 07:21:02 +01:00
Christoph Oelckers
f218e95c4d
- scriptified cht_Takeweaps.
2018-11-25 01:26:19 +01:00
Christoph Oelckers
bc86ec4c51
- removed the less-parameters versions of P_SpawnPlayerMissile, because there was only one native call left to them.
2018-11-25 01:14:50 +01:00
Christoph Oelckers
460c400315
- scriptified ApplyKickback.
2018-11-25 01:12:45 +01:00
Christoph Oelckers
e856e3c830
- moved the kickback code in P_DamageMobj into a subfunction.
...
This is a first attempt to reduce the complexity of that 600+ lines monstrosity, and also a good first target for scriptification.
2018-11-25 01:01:34 +01:00
Christoph Oelckers
ae27acb944
- scriptified A_WeaponReady and its subfunctions.
2018-11-25 00:54:13 +01:00
Christoph Oelckers
5fcc96a0f2
- fixed: When extracting a MiniBSP for polyobject rendering, the parent subsector must copy all its relevant properties to the children.
...
The sections pointer was not copied here.
2018-11-25 00:38:04 +01:00
Christoph Oelckers
34b7e5f435
- scriptified P_BobWeapon as a virtual function on PlayerPawn.
2018-11-25 00:23:03 +01:00
Christoph Oelckers
b75ee1027a
- a little bit of cleanup on some code that repeatedly accessed some fields in AWeapon and produced far too many search results when looking for this.
2018-11-24 23:51:09 +01:00
Christoph Oelckers
8eb4697fbd
- removed the bot related properties from AWeapon.
...
This stuff is now kept locally in the bot code so that it doesn't infest the rest of the engine.
And please don't read the new botsupp.txt file as some new means to configure bots! This was merely done to get this data out of the way.
The bots are still broken beyond repair and virtually unusable, even if proper data is provided for all weapons.
2018-11-24 23:48:23 +01:00
Christoph Oelckers
ead28db007
- consolidated the 3 nearly identical code fragments handling the weapon's YAdjust for the different renderers into a utility function in DPSprite.
2018-11-24 22:40:14 +01:00
Christoph Oelckers
4392b4e96d
- exported the blood spawning part of P_LineAttack as a virtual ZScript function.
2018-11-24 22:35:50 +01:00
Christoph Oelckers
f260709e73
- moved the weapon selection logic to PlayerPawn as overridable virtual functions.
2018-11-24 22:22:36 +01:00
Christoph Oelckers
51ee623b3b
- took the weapon selection logic out of the WeaponSlots data and blocked all direct access to the weapon slots internals
...
This seriously needs to be independent from the data store and better abstracted. More work to come to move this to its proper place.
2018-11-24 22:03:56 +01:00
Christoph Oelckers
b6d0d5008e
- change teleport freeze handling to a player property plus virtual override on PlayerPawn for increased configurability.
2018-11-24 21:37:00 +01:00
Christoph Oelckers
337750b874
- scriptified BecomeItem and BecomePickup
2018-11-24 21:25:26 +01:00
Christoph Oelckers
3d892d3970
- scriptified FilterCoopRespawnInventory.
2018-11-24 20:58:33 +01:00
Christoph Oelckers
c14b7f58d3
- scriptified some simple sound functions.
2018-11-24 20:33:00 +01:00
Christoph Oelckers
fb91982da2
- scriptified APlayerPawn::Die and fixed a few things I encountered while doing it.
2018-11-24 20:32:12 +01:00
Christoph Oelckers
cf9cd58310
- scriptified ModifyDropAmount as a virtual function hierarchy for Inventory and children.
2018-11-24 19:59:24 +01:00
Christoph Oelckers
652606f70b
- scriptified A_Explode and relatives.
2018-11-24 19:29:52 +01:00
Christoph Oelckers
44d51a6de9
- scriptified GetDefaultInventory.
2018-11-24 19:03:33 +01:00
Christoph Oelckers
be100fa5d3
- removed MeleeWeapon flag from the tomed PhoenixRod and the fighterhammer.
...
In both cases, having this flag on will render the monster-backing-off-check for melee attacks ineffective because it would misinterpret these weapons as close range only - which they aren't. Even for the PhoenixRod the range is longer than what gets checked here.
As a consequence, the bot's check for missile shooting melee weapons has also become pointless because no such weapon is defined anymore.
2018-11-24 18:42:10 +01:00
Christoph Oelckers
814af66864
- exported one FraggleScript function for testing.
2018-11-24 18:33:42 +01:00
Christoph Oelckers
595208f2fd
- exported a few more weapon handling functions so that the native GetDownState stub could be removed.
2018-11-24 18:21:40 +01:00
Christoph Oelckers
d8aa39e03e
- let player_t::Resurrect use P_BringUpWeapon to raise the weapon again instead of doing it directly.
...
This seems a bit safer.
2018-11-24 17:24:08 +01:00
Christoph Oelckers
9584e3bc53
- scriptified P_BringUpWeapon because this was the only native function still referencing AWeapon::GetReadyState.
2018-11-24 17:22:59 +01:00
Christoph Oelckers
b4c272ddff
- scriptified A_SpawnItem(Ex) and A_ThrowGrenade.
...
These were the last native functions referencing AWeapon::DepleteAmmo, so that function is now exclusively on the scripting side.
2018-11-24 17:01:12 +01:00
Christoph Oelckers
6be7fc33f3
- scriptified 3 more functions in stateprovider.
2018-11-24 15:42:43 +01:00
Christoph Oelckers
4c1b3f81ab
- scriptified A_RailAttack.
2018-11-24 15:12:30 +01:00
Christoph Oelckers
5c130737c4
- scriptified A_CustomPunch
2018-11-24 14:48:30 +01:00
Christoph Oelckers
7bb3855439
- scriptified A_FireProjectile
2018-11-24 14:16:08 +01:00
Christoph Oelckers
e071be8371
- scriptified A_FireBullets and A_CustomBulletAttack.
2018-11-24 13:50:27 +01:00
Christoph Oelckers
4440bff83a
- deleted redundant native ActivateMorphWeapon method.
2018-11-24 13:08:44 +01:00
Christoph Oelckers
6fc63b9b78
- started with a ScriptUtil class which will allow moving function implementations for ACS and FraggleScript to zscript.txt
...
So far 3 functions for testing implemented.
2018-11-24 13:06:01 +01:00
Christoph Oelckers
ac77ca6474
- scriptified Weapon.CheckAmmo and Weapon.DepleteAmmo
2018-11-24 11:29:57 +01:00
Christoph Oelckers
bd84a60663
- scriptified the rest of the morph code.
2018-11-24 10:47:42 +01:00
Christoph Oelckers
b267252a09
- fixed: Since out types cannot be marked as such in a function prototype (as it'd cause parameter mismatches in the resolving pass) it is necessary to check the argflags as well when determining the register type.
2018-11-24 09:34:53 +01:00
Christoph Oelckers
ac1bffc51b
- scriptified P_MorphMonster.
2018-11-24 09:33:03 +01:00
Christoph Oelckers
3ed7f4066d
- fixed message output.
2018-11-24 08:41:07 +01:00
Christoph Oelckers
cce1bad042
- testing and cleanup of scripted morph code.
2018-11-24 08:39:35 +01:00
Christoph Oelckers
78d6832d14
- P_UndoPlayerMorph scriptified.
...
Not tested yet and still missing a new native interface.
2018-11-24 08:17:30 +01:00
Christoph Oelckers
192104aea2
- scriptified P_MorphPlayer and dependencies.
...
It still needs its counterpart scriptified as well before it can work.
2018-11-24 07:45:49 +01:00
Marrub
2e2fe87445
Fix null pointer access in p_terrain.cpp
2018-11-24 07:29:26 +01:00
Magnus Norddahl
31ed1da4e5
Merge remote-tracking branch 'origin/master' into asmjit
2018-11-23 22:57:11 +01:00
Marisa Kirisame
ee91cf77e4
expose defaultbloodcolor to ZScript.
2018-11-23 22:15:15 +01:00
alexey.lysiuk
dc6ba6bd52
- fixed compilation of POSIX targets
...
src/doomerrors.h:74:14: error: exception specification of overriding function is more lax than base version
src/posix/sdl/i_main.cpp:272:28: error: 'class std::exception' has no member named 'GetMessage'
2018-11-23 15:14:15 +02:00
Magnus Norddahl
4e2cc1f144
- fix missing include statement
2018-11-23 12:13:53 +01:00
Magnus Norddahl
ac62088690
- fix wrong attribute count passed to SetFormat
...
- fix missing include statement
2018-11-23 12:09:36 +01:00
Magnus Norddahl
e02367dd09
- use std::runtime_error instead as the constructor on std::exception is a MSVC extension
2018-11-23 12:06:44 +01:00
Christoph Oelckers
ce46f5165a
Merge branch 'master' into asmjit
2018-11-23 11:12:52 +01:00
Christoph Oelckers
bced30d1e3
- made CDoomError inherit from std::exception so that the main catch block can also deal with exceptions thrown by the STL.
...
- Also do not ignore empty exception messages as irrelevant. The only irrelevant exception type is CNoRunExit.
2018-11-23 10:18:52 +01:00
Christoph Oelckers
80c6505eee
- fixed initialization of default parameters in dynamically created function calls like in the MENUDEF parser
2018-11-23 09:34:38 +01:00
Magnus Norddahl
6f397854d0
- inline VBTL opcode
...
- remove old META and CLSS implementations
2018-11-23 05:37:26 +01:00
Magnus Norddahl
9ef7212f54
- add return type to CreateFuncSignature
2018-11-23 05:20:12 +01:00
Magnus Norddahl
be4b217608
- fix typo
2018-11-23 04:50:01 +01:00
Magnus Norddahl
3ba6290419
- add support in the jit compiler to do direct native calls using the x64 calling convention
2018-11-23 04:47:18 +01:00
Magnus Norddahl
d4e630c127
- fix a rendering glitch when changing resolution
2018-11-23 03:00:11 +01:00
Magnus Norddahl
3e9f531b5f
- add NUMA awareness to drawer threads
2018-11-22 14:48:09 +01:00
Rachael Alexanderson
4859c3d301
- fix inverted logic of Intel check
2018-11-22 02:02:37 -05:00
Magnus Norddahl
b4aa4bf0ac
- only use shader cache on Intel
2018-11-22 05:31:10 +01:00
Magnus Norddahl
48fd91227c
- fix compile error
2018-11-21 10:46:13 +01:00
Magnus Norddahl
dd42557e69
- implement a shader cache
2018-11-20 23:12:20 +01:00
Magnus Norddahl
216191c86d
- interpolate the normal for models
2018-11-20 13:41:27 +01:00
Christoph Oelckers
a5ee673c91
- exported ADecal to ZScript as a non-native class.
...
Its one function is still native but this was by far the easiest of the remaining actor classes to export.
2018-11-19 17:54:38 +01:00
Christoph Oelckers
e90ed0a01c
removed the quite redundant GetStateForButtonName function
...
Since it forwards directly to FindState and has no script bindings there is no need to keep it, it'd only complicate the full scriptification of the weapon class if it stuck around.
2018-11-19 18:26:23 +01:00
Christoph Oelckers
ad04001135
- fixed some issues with the bodyque and moved this variable into FLevelLocals
...
* it was never saved in savegames, leaving the state of dead bodies undefined
* it shouldn't be subjected to pointer substitution because all it contains is old dead bodies, not live ones.
2018-11-19 18:13:23 +01:00
Christoph Oelckers
02de10f657
- cleaned up the PointerSubstitution code
...
Since the only thing it gets used for is swapping out PlayerPawns it can safely skip all global variables that never point to a live player, which allowed to remove quite a bit of code here that stood in the way of scriptifying more content
2018-11-19 17:05:00 +01:00
Christoph Oelckers
108874f379
- fixed the reginfo checks for the Draw... functions.
...
They need to be offset by the same amount as the arguments so that the values are properly matched.
2018-11-18 21:18:15 +01:00
Christoph Oelckers
8bc2d50ad2
Merge branch 'master' into asmjit
...
# Conflicts:
# src/p_actionfunctions.cpp
2018-11-18 21:08:16 +01:00
Christoph Oelckers
426ee2b78e
- fixed: Ceiling render hack segments were inserted into the floor list and incorrectly rendered.
2018-11-18 20:03:06 +01:00
Christoph Oelckers
3aef8418d9
- fixed the type checks for object arrays.
...
Null pointers must be allowed and non-object pointers which are not null must be explicitly checked for because the code could crash on them when performing a static_cast on an incorrect type.
2018-11-18 19:48:09 +01:00
Christoph Oelckers
a9ec819557
- moved the type infomation entirely out of VMValue.
...
For the varargs functions that used the Type field to validate their parameters, now a hidden additional argument is passed which contains a byte array with the type info for the current call's arguments. Since this is static per call location it can be better prepared once when the code is being compiled instead of being put in a runtime created array for each invocation. Everything else uses the per-function instance of the same data.
The only thing that still needed the type field with a VMValue is the defaults array, so this uses a different struct type now to store its data.
2018-11-18 19:31:13 +01:00
Christoph Oelckers
a981737855
- generate register type info for the parameter lists of all functions.
...
Currently used for loading parameters into registers.
For checking parameters of native functions some more work is needed to get the info to the function. Currently it doesn't receive the function descriptor.
2018-11-18 17:10:55 +01:00
Major Cooke
a8d4d45e89
P_Thing_Raise fixes & cleanup
...
- Transfer flags directly into the function and process inside instead of the action functions
- Pass in raiser for all function calls
2018-11-18 15:28:05 +01:00
Magnus Norddahl
1ef772d017
- add missing CheckVMFrame call
2018-11-18 14:02:39 +01:00
Magnus Norddahl
a8a9ec98f3
- only allocate stack space for vmframe and call returns when we need them
2018-11-18 13:49:19 +01:00
Magnus Norddahl
748dbec77a
- improve dumpjit output slightly
2018-11-18 13:14:41 +01:00
Magnus Norddahl
e778f05b12
- don't emit VMValue.Type information when we know the receiver isn't going to read it anyway
2018-11-18 12:59:53 +01:00
Magnus Norddahl
486b7e0f3c
- delay emitting PARAM and VTBL instructions until CALL/CALL_K
2018-11-18 12:38:55 +01:00
alexey.lysiuk
4624c6e6a3
- use custom offsetof() macro
...
src/scripting/vm/jit_call.cpp:164:38: warning: offset of on non-standard-layout type 'VMScriptFunction' [-Winvalid-offsetof]
src/scripting/vm/jit_load.cpp:87:50: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof]
src/scripting/vm/jit_load.cpp:96:50: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof]
src/scripting/vm/jit_load.cpp:257:53: warning: offset of on non-standard-layout type 'DObject' [-Winvalid-offsetof]
2018-11-18 12:48:50 +02:00
alexey.lysiuk
e4c238b6c7
- fixed compilation of POSIX targets
...
src/scripting/backend/vmbuilder.h:169:19: error: no member named 'function' in namespace 'std'
2018-11-18 12:37:07 +02:00
Christoph Oelckers
28db04b501
- missed one OP_RESULT.
2018-11-18 10:09:29 +01:00
Christoph Oelckers
fe0a341e0c
- moved all code related to function calls into the helper class so that all future work on the calling convention is in one place only.
2018-11-18 10:02:31 +01:00
Christoph Oelckers
cbedcff559
- moved all handling for the simple calls into EmitterArray to have it in one place only.
...
The main case of FxVmFunctionCall is not done yet, though.
2018-11-18 08:29:41 +01:00
Christoph Oelckers
629d329f22
- removed OP_TAIL.
...
The amount of support code for this minor optimization was quite large and this stood in the way of streamlining the VM's calling convention, so it was preferable to remove it before moving on.
2018-11-18 07:43:03 +01:00
Magnus Norddahl
4e0c5cf16c
- fix compile errors
2018-11-18 03:28:57 +01:00
Christoph Oelckers
292cf93fa7
- fixed TArray's Append methods.
...
I mistakenly assumed that Grow would incease the array's reserved space.
2018-11-18 01:23:14 +01:00
Christoph Oelckers
983c0c56b1
- changed OP_PARAM handling so that all registers remain allocated until the call instruction and reordered instruction emission so that the param instructions all directly precede the call instruction.
2018-11-18 01:06:04 +01:00
Christoph Oelckers
b2c07e731f
- completed the Dehacked fix.
...
I missed some arguments that were specified but set to 'not given'.
2018-11-17 21:33:21 +01:00
Christoph Oelckers
5180265ab1
- fixed: The Dehacked function wrappers now need full parameter lists.
2018-11-17 21:21:23 +01:00
Christoph Oelckers
533f66396d
Merge branch 'master' into asmjit
2018-11-17 20:16:03 +01:00
Christoph Oelckers
45ef7bca4f
- fixed: FTexture::SmoothEdges must forward its result to the base texture in case a redirection is in effect.
...
Both need the bMasked flag, or some code will think that the texture is not fully opaque if no holes were found.
2018-11-17 18:55:44 +01:00
Christoph Oelckers
08fe9c375b
- use the same formula for calculating 3DMidTex offsets as the renderer when per-sidedef scaling is used.
...
This reuses the FTexCoordInfo class the hardware renderer had been using to calculate wall texture offsetting.
The software renderers still need this sorted out to bring them in line with the rest of the code, though, but they do not have this code sufficiently well organized to make this a straightforward task.
2018-11-17 18:24:14 +01:00
Magnus Norddahl
7e0dacdb1d
- disabled code that shows how a thunk function and native setup would look like
2018-11-17 16:26:54 +01:00
Christoph Oelckers
701b793f24
- fixed parameter mixup with P_CanResurrect.
2018-11-17 16:21:08 +01:00
Christoph Oelckers
160f17a907
- fixed stencil cap generation for old hardware and changed it so that it only gets done once for each stencil setup, not for each stencil pass.
2018-11-17 15:34:23 +01:00
Christoph Oelckers
bb4007f16a
- fixed: CVar.ResetToDefault was missing a check for use outside of menus.
2018-11-17 15:23:57 +01:00
Christoph Oelckers
89cec539fa
- fixed IJMP code generation for the JIT compiler.
...
With a proper count value available this can be done properly. The only relevant targets are the jumps immediately succeeding the IJMP instructions, nothing else.
2018-11-17 13:39:14 +01:00
Christoph Oelckers
fcb5684607
- do not use instructions from too recent instruction set extensions.
...
andn is part of BMI1 which was introduced in 2012, which is far too recent to be used unchecked.
2018-11-17 13:10:18 +01:00
Christoph Oelckers
adde0510fe
- deconstruct A_Jump with multiple labels into A_Jump(chance, RandomPick(label1, label2, label3,...)) to remove this ugly special case from the VM calling convention.
...
This also adds the number of available choices to OP_IJMP.
2018-11-17 12:35:03 +01:00
Magnus Norddahl
68afc419af
- inline ReadBarrier, GetClass and GetClassMeta
2018-11-17 10:54:16 +01:00
Christoph Oelckers
6398c27646
- fixed RNG setup in FxRandom.
2018-11-17 10:06:01 +01:00
Christoph Oelckers
94ed30e782
- removed the default parameter handling from all native script functions because it is no longer needed.
2018-11-17 10:03:40 +01:00
Christoph Oelckers
e643582957
- fixed FxFRandom setup which used a path in FxRandom that is no longer supported.
2018-11-17 08:06:23 +01:00
Magnus Norddahl
f99bba48dc
- stop using lambda functions for CreateCall because MSVC lambas use a different calling convention and "converts" them to the right one by generating a thunk function
2018-11-17 05:12:47 +01:00
Magnus Norddahl
f082a8af98
- removed the SetupSimpleFrameMissingArgs logic as the number of args are now guaranteed
2018-11-17 00:49:22 +01:00
Magnus Norddahl
8ec85cb0ee
- add warning text when falling back to the VM
2018-11-17 00:36:40 +01:00
Christoph Oelckers
6423902c63
- removed the unused 'no arguments' cases from the BuiltinRandom functions and split off BuiltinRandom2 into its own function.
...
This removes the last non-vararg cases where a native VM function checks 'numparam'. As of this commit all function calls will pass the complete list of arguments.
2018-11-17 00:14:39 +01:00
Magnus Norddahl
ea26bf6b2f
- make functions using too many registers (more than 200) fall back to the VM
2018-11-17 00:04:15 +01:00
Christoph Oelckers
95ab1da6a0
- always pass complete argument lists in the VM.
2018-11-16 22:43:12 +01:00
Christoph Oelckers
16053c7cdb
- build full argument lists for action function calls.
...
This uses one static global array to avoid frequent reallocations.
2018-11-16 20:38:52 +01:00
Christoph Oelckers
97573a0452
- implemented VMCallWithDefaults and used it for all calls with variable arguments.
...
This isn't used for the 3 action function calls because it requires an array allocation which would be a bit too costly for something as frequently called as action functions.
They will need a different approach.
2018-11-16 19:18:33 +01:00
Christoph Oelckers
6d7710165c
- fixed last commit.
2018-11-16 18:50:34 +01:00
Christoph Oelckers
c24da62cdd
- marked all places where an incomplete parameter list may be passed to the VM by a native call by redirecting VMCall to an intermediate VMCallWithDefaults. This function must later fill in the missing arguments from the default.
2018-11-16 18:41:27 +01:00
Christoph Oelckers
acbdfddb26
Merge remote-tracking branch 'remotes/origin/master' into asmjit
2018-11-16 17:20:12 +01:00
Christoph Oelckers
33fb76698b
Avoid using argument count for any kind of decision making in native VM functions.
...
This allows retaining the functionality, even if for the JIT compiler's benefit all default arguments are pushed onto the stack instead of reading them from the defaults array.
2018-11-16 15:25:37 +01:00
Christoph Oelckers
8c57447108
- Restricted argument count check to the void return case.
...
There were some issues here:
* a check for mismatching count is too strict because it is legal to omit return values
* it failed to detect returning multiple values in a single expression.
2018-11-16 12:28:24 +01:00
Christoph Oelckers
358001c306
fixed right shift operator for unsigned values
...
This is version protected to avoid breaking old code.
2018-11-16 11:32:24 +01:00
Christoph Oelckers
7cd89fe07b
- fixed: FxUnaryNotBitwise modified the source operand instead of allocating a new one.
2018-11-16 11:21:51 +01:00
Christoph Oelckers
1250eb5323
- fixed: AActor' friction field was not saved
2018-11-16 08:06:01 +01:00
Magnus Norddahl
ac28f0d34f
- remove unused argument
2018-11-16 01:33:41 +01:00
Magnus Norddahl
34b037c9db
- avoid calling VMFillParams for simple stack frames
...
- split Setup into more functions
2018-11-16 01:13:25 +01:00
Player701
c569029b1d
- Readonly pointer casting now works in ZScript.
2018-11-15 23:28:37 +01:00
Magnus Norddahl
6c31d2e965
- add dword store to memset code
2018-11-15 23:04:11 +01:00
Magnus Norddahl
00d41432d8
- disable jit in 32-bit builds
2018-11-15 22:47:44 +01:00
Magnus Norddahl
5ef2175c38
- fix wrong offsets
2018-11-15 22:40:12 +01:00
Magnus Norddahl
0394dc56b7
- generate a memset for the allocated stack memory because that's what the VM does
...
(this really shouldn't be done by the VM either - the compiler backend should clear its registers if it wants them to be zero!)
2018-11-15 22:33:13 +01:00
Magnus Norddahl
f3e0db913c
- fix operand size mismatch error
2018-11-15 22:07:27 +01:00
Magnus Norddahl
3b2faf5397
Merge remote-tracking branch 'origin/master' into asmjit
2018-11-15 22:02:11 +01:00
Christoph Oelckers
47138b748a
Make BounceFlags 32 bit wide.
2018-11-15 16:53:19 +01:00
Cacodemon345
07838f4c2a
BOUNCEONUNRIPPABLES flag; makes actors bounce on actors with DONTRIP flag
2018-11-15 12:47:57 +01:00
alexey.lysiuk
39a3527396
- fixed compilation of targets with optimization
2018-11-15 10:59:37 +02:00
Christoph Oelckers
aa4de71e6d
Merge branch 'master' into asmjit
2018-11-15 09:25:27 +01:00
Christoph Oelckers
cf590d73e4
- extended state caller check to work on CustomInventory items as well
...
Since CallStateChain is a public member in CustomInventory we cannot really be sure that the given state is valid so it needs checking as well.
2018-11-15 09:24:17 +01:00
Christoph Oelckers
0a21d19723
Added a run time check for calling a state action from the wrong actor type.
...
This can happen if a state that's retrieved with FindState gets used with a different actor type and can lead to hard to trace problems if not checked.
2018-11-15 09:04:38 +01:00
Chronos Ouroboros
96b8f12a30
Fix the code for MODF_RK in the JIT compiler.
2018-11-14 21:05:24 -02:00
Christoph Oelckers
9f6091519f
- changed the stencil cap drawer to only cover the area which is actually used by the portal.
...
This will now both exclude floor caps when only ceiling elements are used and everything outside the bounding box of active portal lines.
Hopefully this is enough to fix the issues with portal caps but of course it is not foolproof if someone just makes the right setup.
2018-11-14 23:30:46 +01:00
Christoph Oelckers
a23d1c2d25
- went back to the original portal stencil setup from 3.4.0.
...
The main reason is to unify the portal hierarchy again. The split into a hardware independent and a hardware dependent part turned out to be unnecessary and complicated matters.
Another issue was that the new stencil setup code was having a few subtle problems, so this recreates the original ones with indirect API calls.
2018-11-14 21:03:54 +01:00
Chronos Ouroboros
566eb58000
Fixed the Vector2/3 != operator.
2018-11-14 20:01:13 +01:00
Chronos Ouroboros
5375a99cf6
Added support for CMP_APPROX to EQV_R and moved the code to a template.
2018-11-14 10:29:48 -02:00
Magnus Norddahl
8429fc8124
- fix missing type check when using Push or Insert for typed arrays
2018-11-14 10:08:04 +01:00
Magnus Norddahl
99849bc0c5
Merge remote-tracking branch 'origin/master' into asmjit
2018-11-14 01:23:17 +01:00
Christoph Oelckers
a6b44b02b7
- fixed incompletely initialized secplanes in sprite splitting code.
...
The recent optimization of the shader setup needs the negiC value properly set.
2018-11-13 20:36:23 +01:00
Major Cooke
55f17fa90c
Changed A_RaiseActor to just RaiseActor.
2018-11-13 19:01:56 +01:00
Major Cooke
f47210df4e
Fixed inconsistency.
...
- P_Thing_Raise returned true while P_Thing_CanRaise returned false for the condition of having no raise state. P_Thing_Raise now returns false.
2018-11-13 19:01:56 +01:00
Major Cooke
71d2b39d92
Added A_RaiseActor(Actor other, int flags = 0)
2018-11-13 19:01:56 +01:00
Major Cooke
b553be153d
Added CanResurrect(Actor other, bool passive)
...
- Works similarly to CanCollideWith.
- Passive means the caller is trying to be resurrected by 'other'.
- Non-passive means the caller is trying to resurrect 'other'.
2018-11-13 19:01:56 +01:00
Christoph Oelckers
33f2f9f34e
- fixed: ZScript's finalization code used the last parsed lump for of one translation unit as reference, not the base lump.
...
This resulted in incorrect messages but also could produce some more subtle errors.
2018-11-12 00:22:50 +01:00
Christoph Oelckers
ca2defa6a2
- added ZScript export for side_t::SetSpecialColor.
2018-11-12 00:13:14 +01:00
Christoph Oelckers
65a6866a1b
- fixed typo in ceiling render hack code.
2018-11-11 22:22:29 +01:00
Christoph Oelckers
59790302ec
- fixed rendering of lower untextured linedef parts.
2018-11-11 22:17:44 +01:00
Christoph Oelckers
a0a2230b92
- removed test code that was accidentally left in.
2018-11-11 21:50:33 +01:00
Christoph Oelckers
f2dcff4386
- more options for Doom 64 style gradients on walls:
...
* Colors can npw be defined per sidedef, not only per sector.
* Gradients can be selectively disabled or vertically flipped per wall tier.
* Gradients can be clamped to their respective tier, i.e top and bottom of the tier, not the front sector defines where it starts.
The per-wall colors are implemented for hardware and softpoly renderer only, but not for the classic software renderer, because its code is far too scattered to do this efficiently.
2018-11-11 16:04:36 +01:00
Player701
d37192c1e8
- Fixed: Decal generator should be taken from the current weapon instance instead of the default instance.
2018-11-11 15:07:57 +01:00
Christoph Oelckers
d3aa9c6af1
- do not abort on unclosed sections.
...
Apparently they can indeed happen with broken map setups like isolated linedefs somewhere in the wild (see Strife MAP08.)
Although they are a problem for triangulation, this isn't what sections get used for currently so it's of no real concern.
In case this is needed later their work data gets marked as 'bad' for the time being.
2018-11-11 10:08:13 +01:00
Christoph Oelckers
094afdfd5f
- fixed: It may happen that a degenerate subsector ends up without any section or sector. Try to assign the best fit in such a case so that the relevant pointers are not null.
2018-11-11 09:33:40 +01:00
Christoph Oelckers
c946edd9bf
- instead of copying the sector planes to GLWall, just store pointers to the front and back sector for later use.
...
Until now this wasn't doable because these could have come from hw_FakeFlat which only were local copies on the stack.
With the recent change these faked sectors live long enough so that they can be passed around here.
2018-11-10 23:19:08 +01:00
Magnus Norddahl
e6023c55a8
- modify exception checks to jump ahead if the exception is to be thrown as it limits static misprediction
2018-11-10 22:48:20 +01:00
alexey.lysiuk
67e012e445
- fixed compilation on POSIX-like platforms
...
src/p_udmf.cpp:2052:6: error: no matching member function for call to 'OpenMem'
src/sc_man.h:24:7: note: candidate function not viable: expects an l-value for 2nd argument
src/sc_man.h:23:7: note: candidate function not viable: requires 3 arguments, but 2 were provided
src/resourcefiles/file_directory.cpp:198:32: error: use of undeclared identifier 'Filename'; did you mean 'FileName'?
2018-11-10 22:32:09 +02:00
Christoph Oelckers
a90655b295
- cache the results of hw_FakeFlat for the remainder of the current scene instead of storing this in local variables.
...
An exception is made for the sprite drawer which needs to call this in the worker thread on some occasions for as-yet unprocessed sectors.
This case may not alter the cache to avoid having to add thread synchronization to it.
The main reason for this change is that pointers to such manipulated sectors can now be considered static in the renderer.
Due to them being short lived local buffers it was not possible to carry them along with the render data for information retrieval.
2018-11-10 20:07:00 +01:00
Magnus Norddahl
a7ef178284
- fix a typo
2018-11-10 19:56:54 +01:00
Magnus Norddahl
173fe94736
- fix the throw messages
2018-11-10 19:52:41 +01:00
Major Cooke
9a7f570b19
Added DMG_NO_ENHANCE for DamageMobj.
...
- Disables PowerDamage's effect, similar to DMG_NO_PROTECT disabling PowerProtect.
2018-11-10 16:18:33 +01:00
Christoph Oelckers
191f2d9d76
- use TArray and FString in resource file management.
2018-11-10 14:19:55 +01:00
Christoph Oelckers
4d06c17a44
- a few more buffers converted.
2018-11-10 14:18:34 +01:00
Christoph Oelckers
6894912f44
- use TArray for most buffers in p_glnodes.cpp.
2018-11-10 14:15:39 +01:00
Christoph Oelckers
3448749de6
- replaced a few temporary allocations with TArray and added a few convenience loader functions for this.
...
Amazingly with today's optimizers this creates code which is just as good as doing it all manually with the added benefit of being safer.
2018-11-10 11:56:18 +01:00
Christoph Oelckers
602ea8f723
- made some minor changes to TArray after finding out that "new int()" is not the same as "new int".
...
With parentheses this initializes to 0 which created needless initialization code in a few places.
2018-11-10 10:43:35 +01:00
Christoph Oelckers
cfe51f0c30
- hole filling subsectors must also be explicitly triangulated for the automap because they may be non-convex.
2018-11-10 08:04:03 +01:00
Christoph Oelckers
fb7345e470
Merge branch 'master' into asmjit
2018-11-09 22:36:16 +01:00
Christoph Oelckers
3c5609537a
- fixed vector math instructions to use the same order of operations as the VM.
2018-11-09 22:36:08 +01:00
Christoph Oelckers
0caabbe355
- clear spechit before leaving P_CheckPosition.
...
Otherwise this may contain residual data from the last call.
One can only hope that this doesn't cause other side effects - this entire code is one horrendous mess of bad ideas.
2018-11-09 19:06:54 +01:00
Christoph Oelckers
f6af50fc74
- restored portal code that shouldn't have been deleted.
2018-11-08 20:39:44 +01:00
Major Cooke
cdd60b1431
Changed IsPointInMap to use P_PointOnDivlineSide.
2018-11-08 14:50:04 +01:00
alexey.lysiuk
ed72843dec
- fixed undefined behavior when grouping sections
...
The current group should not be accessed by reference because its container can be reallocated during iteration
https://forum.zdoom.org/viewtopic.php?t=62487
2018-11-07 23:04:42 +02:00
Major Cooke
9ff7f338fd
Added IsPointInMap(Vector3 p).
...
- Checks if a point is inside the map geometry or not.
2018-11-07 15:16:45 -05:00
Christoph Oelckers
4eecaada67
- added copyright header to p_destructible.cpp
2018-11-07 19:27:35 +01:00
Christoph Oelckers
9661c3b53c
- moved hw_Sections to r_data, because this is an essential component of the dynamic light system now so it is needed for all renderers.
2018-11-07 00:53:44 +01:00
Christoph Oelckers
bad2a7c49b
- silenced debug message in standard mode.
2018-11-07 00:43:11 +01:00
ZZYZX
a276ebfb08
Exported destructible geometry to ZScript
2018-11-07 00:12:37 +01:00
ZZYZX
ed3355acc6
Explode bouncing projectiles if hit damageable geometry
2018-11-07 00:12:37 +01:00
ZZYZX
d85e5afdfb
Destructible geometry - minor fixes and 3D floor support
2018-11-07 00:12:37 +01:00
Christoph Oelckers
752a64c840
- fixed typo in sight checking code.
2018-11-07 00:12:03 +01:00
Christoph Oelckers
c28f001cb2
Merge branch 'sections'
2018-11-06 23:50:16 +01:00
Christoph Oelckers
f2e593f8bf
- disabled the hack for fixing the original design of the portal in KDiZD's Z1M1.
...
This portal got fixed in a later re-release of KDiZD and no other portal needs this runtime fix to my knowledge.
The main problem here is that this runtime fix requires some manipulation of the render data that does not work anymore.
Should other maps need this fix as well they are probably best served with a compatibility entry.
2018-11-06 21:41:16 +01:00
Christoph Oelckers
085bf0d33f
- fixed Transfer_Heights and 3D floors.
2018-11-06 20:53:45 +01:00
Christoph Oelckers
ddc75f7ba5
- made the common render hacks functional again as separate render items.
2018-11-06 20:31:44 +01:00
Christoph Oelckers
a6e77ae094
Refactored the render hack storage so that it can be decoupled from the regular GLFlat render items.
...
Having these in there makes it impossible to change render techniques so these are better done as separate items.
2018-11-06 18:20:59 +01:00
Christoph Oelckers
aee47d23bd
- fixed validcount for real and added a side check for intra-section sides to light code.
2018-11-06 11:53:03 +01:00
Christoph Oelckers
df52a71475
- fixed validcount.
2018-11-06 01:01:59 +01:00
Christoph Oelckers
87973ff504
- added handling for intra-sector lines to lighting code.
2018-11-06 00:47:43 +01:00
Christoph Oelckers
ba66c0c889
- changed dynamic light traversal to use sections instead of the subsectors.
...
This is mostly complete, except for handling intra-section sidedefs.
2018-11-06 00:13:23 +01:00
Christoph Oelckers
9ddca3c3a9
- removed the subsector light lists as a preparation step to move over the light traversal code to use sections instead of subsectors.
2018-11-05 22:35:24 +01:00
Christoph Oelckers
375dd7e28f
- the sections are now being used as the smallest element to draw flat planes.
...
This also removes one piece of code that was used to cope with the missing clip planes on old ATI cards, so support for those will most likely have to be dropped in the near future.
2018-11-05 22:14:18 +01:00
Christoph Oelckers
50bd9c3594
- flatvertex generation is working again.
2018-11-05 21:29:57 +01:00
Christoph Oelckers
625eb1e76a
- FVertexBuilder's output looks correct now.
2018-11-05 21:11:54 +01:00
Christoph Oelckers
950ed07ae6
WIP
2018-11-05 15:30:50 +01:00
Christoph Oelckers
d7db00d92e
- sector rendering refactoring for sections - work in progress.
2018-11-05 01:01:48 +01:00
Christoph Oelckers
0deb388a75
- automatically create sections and store them with the level data.
...
- added subsector indexing to sections.
This is needed for finding a section from a point.
2018-11-04 22:19:11 +01:00
Christoph Oelckers
705c87c6cc
- fixed bad case in #include.
2018-11-04 21:33:35 +01:00
Christoph Oelckers
c847180bdc
- reinstated the sector light clamping threshold from before version 3.3.
...
It turned out that without the clamping the feature does not work well, thanks to a poorly chosen scale of the original arguments.
2018-11-04 20:57:18 +01:00
Christoph Oelckers
49bfdbef9f
- create an intermediate structure between sectors and subsectors.
...
A section is a continuous part of a sector or in some case of several nearby continuous parts. For sectors with far away parts multiple sections will be created, especially when they lie in disjoint parts of the map.
This is mainly supposed to cut down on time for linking dynamic lights. Since they need to traverse subsectors to find all touching sidedefs a more coarse data structure that only contains the info needed for this is more suitable. In particular, this does not contain any intra-sector lines, i.e. those with both sides in the same sector.
2018-11-04 20:10:51 +01:00
Player701
9b7114a96d
- undid the save version bump
2018-11-04 19:58:57 +01:00
Player701
56f76a141e
- Added a function to get the actor's age in ticks.
2018-11-04 19:58:57 +01:00
Player701
a6dbfcf9c2
- Added a new field to the Actor class which stores the amount of ticks passed since the game started on the moment the actor was spawned.
...
- Added a function to the Actor class to get its spawn time relative to the current level.
- Added spawn time information to the output of the "info" console command.
2018-11-04 19:58:57 +01:00
Cacodemon345
b1d35eb0b3
Extend SKYEXPLODE flag for LineAttack
2018-11-03 15:24:30 +01:00
alexey.lysiuk
53bf598aee
- restored screen clear in Cocoa backend when setting video mode
...
This still doesn't work well in windowed mode
In fullscreen the effect is quite noticeable thought
2018-11-03 13:09:30 +02:00
Christoph Oelckers
1ccbbcb81d
- added a method to FileReader to read the contents into an array and used it on the MIDI sources for testing.
2018-11-02 10:20:12 +01:00
Christoph Oelckers
c07aeb7498
- use a single TArray to allocate the memory for the lump manager's hash lists.
2018-11-02 09:51:44 +01:00
Magnus Norddahl
534606f4ce
- add vm_jit cvar to control JIT compilation
2018-11-01 21:39:30 +01:00
Magnus Norddahl
369dcfd57f
Merge remote-tracking branch 'origin/master' into asmjit
2018-11-01 21:23:26 +01:00
alexey.lysiuk
8597c9e326
- added warning for constant conditional expression
...
ZScript code like `if (x = 0) // ...` no longer causes assertion failure in Debug but produces a warning regadless of configuration
https://forum.zdoom.org/viewtopic.php?t=62422
2018-11-01 16:05:27 +02:00
alexey.lysiuk
d99aeb0895
- fixed potential crash when drawing status bar log
...
src/g_statusbar/shared_sbar.cpp:1133:34: warning: comparison of integers of different signs: 'unsigned int' and 'int'
[-Wsign-compare]
2018-11-01 13:37:11 +02:00
alexey.lysiuk
504a7f00b6
- fixed two potentially dangerous compilation warnings
...
src/hwrenderer/dynlights/hw_lightbuffer.h:51:29: warning: comparison between signed and unsigned integer expressions
[-Wsign-compare]
src/hwrenderer/scene/hw_renderstate.h:196:44: warning: operation on '((FRenderState*)this)->FRenderState::mVertexOffsets[0]' may
be undefined [-Wsequence-point]
2018-11-01 12:51:22 +02:00
Christoph Oelckers
b9f2cce8de
- versioned the return mismatch check to demote it to a warning for older versions than 3.7.
2018-11-01 11:30:53 +01:00
alexey.lysiuk
d3461be40c
- made 'return void' case a compilation error
2018-11-01 11:18:22 +01:00
Christoph Oelckers
b79622bcba
- added far stronger restrictions for when the Boom-Texture-Y-offset compatibility flag may trigger.
...
This had absolutely no sanity checks and unconditionally picked the source texture if one existed.
It should only be done for wall textures, only for those defined in TEXTUREx and only for those where the scale is identical with the underlying texture.
2018-11-01 10:51:57 +01:00
Christoph Oelckers
c5153ca095
- fixed: Do not pass Sysex messages to Windows's GS Wavetable synth.
...
This will totally refuse to play a MIDI if that happens.
Duke Nukem's Alienz.mid, which did not play before works after this change.
2018-11-01 10:22:21 +01:00
Christoph Oelckers
f7ce4dd2da
- added fake vid_renderer CVAR so that mods that checked for it to determine the renderer will get 1 returned instead of 0.
...
The majority of mods which did such a thing checked for the hardware renderer so this should be the default.
2018-11-01 09:43:11 +01:00
Christoph Oelckers
9df7ce1f9a
- fixed: P_DamageMobj should clear reactiontime only for non-players.
...
For players this variable has an entirely different meaning which does not agree with being modified here.
2018-11-01 09:27:38 +01:00
Christoph Oelckers
aa69d63a65
- made DBrokenLines serializable.
2018-11-01 09:02:20 +01:00
Christoph Oelckers
23aff98e90
- fixed handling of wrapped midtextures to be actually useful when used in sky sectors.
2018-11-01 08:02:11 +01:00
ZippeyKeys12
77c5c1eb19
Export AllClasses
2018-11-01 00:20:46 +01:00
Cacodemon345
eaaf0cb8f6
Fix bounce state not entering when hit from top.
2018-11-01 00:11:57 +01:00
Jonathan Russell
f39a389e99
- changed the way alpha works on DrawLine and DrawThickLine so they're consistent
2018-11-01 00:10:47 +01:00
Major Cooke
6a8b0df4ba
Added VelIntercept.
...
- Uses the same code as Thing_ProjectileIntercept to aim and move the projectile.
- targ: The actor the caller will aim at.
- speed: Used for calculating the new angle/pitch and adjusts the speed accordingly. Default is -1 (current speed).
- aimpitch: If true, aims the pitch in the travelling direction. Default is true.
- oldvel: If true, does not replace the velocity with the specified speed. Default is false.
- Split the code from Thing_ProjectileIntercept and have that function call VelIntercept.
2018-11-01 00:10:08 +01:00
ZZYZX
849d110f10
Fixed sector floor/ceiling actions not triggering in P_XYMovement
2018-11-01 00:05:43 +01:00
Christoph Oelckers
a388b6c8ab
- added missing nullptr check.
2018-10-31 23:23:02 +01:00
ZZYZX
a6cdcab128
Implemented loading/saving of line/sector health and health groups in savegames
2018-10-31 22:14:40 +01:00
Tommy Nguyen
40c56bad09
- fix _mm_pause() compiler error and zero initialize atomics
2018-10-31 22:35:56 +02:00
Christoph Oelckers
98b8a2b1f4
- missed one place where FBrokenLines was used.
2018-10-31 20:36:23 +01:00
Christoph Oelckers
4343d0b9c5
- fixed: An exception inside DestroyAllThinkers could send the engine into an endless loop of failed destructions.
2018-10-31 20:07:24 +01:00
Christoph Oelckers
0d54d335c4
- use a saner data structure to store the BrokenLines.
...
Calling the old method with a pointer to an array of unspecified length 'dirty' would be an understatement.
Now it uses a TArray to store the single elements
2018-10-31 19:13:54 +01:00
ZZYZX
b911bbc424
Single commit - destructible geometry feature
2018-10-31 17:22:09 +01:00
Christoph Oelckers
a33cc13054
- make GCC happy... :(
2018-10-31 17:20:04 +01:00
Player701
3e609f2b87
- Introduced an enum named EventHandlerType and changed the bool argument in E_NewGame to this type.
2018-10-31 17:19:21 +01:00
player701
04ae32f6f9
- Static NewGame events now fire before loading a map, and normal NewGame events fire after registering per-map handlers and before all other events.
...
- Static event handlers now unregister after per-map handlers.
- All event handlers now unregister in reverse order.
2018-10-31 17:19:21 +01:00
Christoph Oelckers
2dec7bb1e5
- added a non-multithreaded option for the renderer and fixed a few places where the wrong sector was used
...
The render_sector is only relevant for flats, but never for walls or sprites!
2018-10-31 17:13:22 +01:00
Christoph Oelckers
91df3f8c73
- added option to disable alpha testing for user shaders.
2018-10-31 15:56:20 +01:00
Christoph Oelckers
37166b5faf
- fixed missing binding of the light buffer.
...
I thought this wasn't needed but apparently the buffer refactoring caused this not to be done automatically anymore.
Best have it once at the start of each frame where the cost is negligible.
2018-10-31 12:48:09 +01:00
Christoph Oelckers
41fd34e424
- use standard sprite lighting for voxels.
...
Per-pixel lighting requires normals which voxels do not have.
2018-10-31 12:28:10 +01:00
Christoph Oelckers
3a6f186aa0
- removed memcpy workarounds from GLWall, GLFlat and GLSprite after making sure that all 3 are trivially copyable.
2018-10-31 11:51:52 +01:00
Christoph Oelckers
fdf324cce5
- fixed error message for old OpenGL versions. There was still a mention of "with framebuffer support" which is core in 3.3.
2018-10-31 10:50:45 +01:00
Christoph Oelckers
533ded8d1e
Merge branch 'master' into mt
2018-10-31 10:20:29 +01:00
Christoph Oelckers
790b121195
- added a bit of profiling code to the multithreaded parts of the renderer.
2018-10-31 10:20:06 +01:00
Christoph Oelckers
01a0af8ad1
- simplified the render job interface.
...
Since the job nodes were already taken from a static array, the added linked list isn't really needed. All we need is a read and a write pointer into the array, This can even be done without a spinlock as long as we assume that the list never overflows.
2018-10-31 09:49:07 +01:00
Christoph Oelckers
e9c2247ff4
- added missing file.
2018-10-31 09:22:38 +01:00
Christoph Oelckers
e4d2ec8cb2
- added a few comments to the renderstate to document where certain functions are used.
2018-10-31 08:16:44 +01:00
Christoph Oelckers
aafa445aac
- fixed stencil marking for SSAO.
2018-10-30 23:33:45 +01:00
Christoph Oelckers
e2e34f5245
- cleanup of the buffer binding interface.
...
Some stuff is not really needed and the vertex buffers no longer need to insert themselves into the render state.
2018-10-30 22:43:58 +01:00
Christoph Oelckers
1be1470d47
- cleanup of hw_bsp.cpp.
2018-10-30 22:19:55 +01:00
Marrub
0b460ccb03
Squashed commit of the following:
...
commit 767e3a64f0d5fd27ef56de6e93221e9b2016a0c7
Author: Marrub <marrub.xz@gmail.com>
Date: Tue Oct 30 04:01:09 2018 -0400
ProMessage -> PronounMessage
commit 305477f63fb669f8cf2d9f6d609ed3988f437664
Author: Marrub <marrub.xz@gmail.com>
Date: Mon Oct 29 23:56:58 2018 -0400
improve variable naming
commit f3f0245d0cdcc1b0a8a9b74806bc8954be747f40
Author: Marrub <marrub.xz@gmail.com>
Date: Mon Oct 29 19:52:32 2018 -0400
add "neutral" gender option and better obit formatting
2018-10-30 21:42:09 +01:00
Christoph Oelckers
48bc5550d7
- removed the Bind function from FFlatVertexBuffer.
...
This is not flexible enough. There was already one place where this was not supposed to go through the render state.
The new interface allows more general use of the contained buffer objects.
2018-10-30 19:28:47 +01:00
Christoph Oelckers
fa498611f8
- uncoupled texture precaching from regular binding for rendering.
...
The precaching should not depend on code that may be subject to change.
2018-10-30 19:27:10 +01:00
Christoph Oelckers
55df324d16
- basic multithreading for the render data generation.
2018-10-30 14:58:43 +01:00
Rachael Alexanderson
94688a3700
- do a texture check when drawing fog borders in the software renderer. this does not fix the crash issue, but mitigates it enough with a check that likely should be in place, anyhow.
2018-10-30 01:13:00 -04:00
alexey.lysiuk
0c686e6f92
- more fixes for GCC
...
error: ‘size_t’ does not name a type
error: ‘assert’ was not declared in this scope
2018-10-29 22:57:45 +02:00
Christoph Oelckers
b56e80a556
- disabled the buffer reallocation option for the light buffer.
...
The entire idea with CPU side buffering simply can not work since the buffer is being used live. To compensate the buffer's size was doubled.
2018-10-29 21:53:43 +01:00
alexey.lysiuk
2e02b7e555
- fixed compilation of SDL backend
...
error: unknown type name 'OpenGLFrameBuffer'
2018-10-29 22:41:24 +02:00
alexey.lysiuk
d2c7ffb2ca
- fixed crash with Cocoa backend on startup
2018-10-29 22:33:27 +02:00
alexey.lysiuk
2aac222d35
- fixed compilation on macOS
...
error: non-constant-expression cannot be narrowed from type 'unsigned long' to 'int' in initializer list
error: unknown type name 'OpenGLFrameBuffer'
2018-10-29 22:32:36 +02:00
Christoph Oelckers
47ae42d636
- fixed: for sectors that have to be drawn per subsector the render state was not applied. resulting in random garbage.
2018-10-29 17:52:44 +01:00
Christoph Oelckers
f7446160bb
Merge branch 'master' into renderstate_abstraction
2018-10-29 14:00:43 +01:00
Christoph Oelckers
118bc78fe3
- moved the entire OpenGL backend into a separate namespace.
2018-10-29 13:56:17 +01:00
Christoph Oelckers
0c8b36e121
- moved the texture resizer to hwrenderer.
...
This is pure math and will be shareable with Vulkan.
2018-10-29 13:18:48 +01:00
Christoph Oelckers
190a225301
- minor cleanup.
2018-10-29 13:00:12 +01:00
Christoph Oelckers
893e08df70
- moved DrawScene to GLRenderer and call it through std::function.
...
This was the last remaining virtual override of HWDrawInfo.
With it removed this type is now fully API independent.
2018-10-29 12:54:10 +01:00
Christoph Oelckers
325d2126ec
- moved ProcessScene to hwrenderer
2018-10-29 12:25:41 +01:00
Christoph Oelckers
8991537e57
- moved the 2D drawer tp hwrenderer.
2018-10-29 12:14:36 +01:00
Christoph Oelckers
8a0596893b
- fixed dynamic light profiling counters.
...
The draw counters were never incremented and this should be reset only once per scene, not once per viewpoint.
2018-10-29 10:36:48 +01:00
Christoph Oelckers
361bb688c8
- moved Set3DViewport to hwrenderer.
2018-10-29 10:21:52 +01:00
Christoph Oelckers
362ecacd52
- moved the End*Scene functions to hwrenderer.
2018-10-29 09:58:37 +01:00
Christoph Oelckers
1bbc9f6730
- removed two of the state flags in SetStencil and handle them explicitly.
2018-10-29 09:53:07 +01:00
Christoph Oelckers
163d6be0d7
- added a few more GL state wrappers to the render state.
...
Not used yet.
2018-10-29 09:41:26 +01:00
Christoph Oelckers
f6d9592a45
- moved calls to renderstate from buffer implementation into a subfunction so that it's easier to change if needed.
2018-10-29 09:40:03 +01:00
Christoph Oelckers
90982285ac
- moved the mSceneClearColor variable to main DFrameBuffer class.
2018-10-29 09:34:30 +01:00
Christoph Oelckers
98e111eba0
- merged the nearly identical wrapper texture classes for the software render and the wiper.
2018-10-29 07:39:33 +01:00
Christoph Oelckers
6dc47ff328
- the last commit was incomplete.
2018-10-29 07:06:29 +01:00
Christoph Oelckers
5528981a77
- CreateScene, too.
2018-10-28 23:32:13 +01:00
Christoph Oelckers
70f9507f16
- moved RenderPortal, too.
2018-10-28 23:18:19 +01:00
Christoph Oelckers
24d6b23042
- moved RenderScene and RenderTranslucent to hwrenderer.
2018-10-28 22:58:35 +01:00
Christoph Oelckers
9b56f407dd
- moved all 'present' functions into FGLRenderer.
...
This list of functions contained half of the existing references to the global GLRenderer variable.
2018-10-28 22:36:52 +01:00
Christoph Oelckers
9f9d747a6b
- moved all methods that would involve command buffer manipulation in Vulkan to FRenderState, because that's the object that would serve as command buffer builder.
2018-10-28 22:20:51 +01:00
Christoph Oelckers
2ee2766812
- moved more code from FDrawInfo to HWDrawInfo.
...
The entire setup/takedown code did not reference any API specific data. The only thing needed is a global virtual creation function.
2018-10-28 19:39:31 +01:00
Christoph Oelckers
1ca811d4a8
- moved more code out of FDrawInfo.
2018-10-28 19:19:46 +01:00
Christoph Oelckers
cb4ffbf053
- moved the draw lists back to the API independent side.
...
The original idea was to let Vulkan do this completely differently, but if that comes to pass it should be done without having generic data maintenance code on the API side.
2018-10-28 19:06:29 +01:00
Christoph Oelckers
df15f00a21
- moved more code out of 'gl'.
2018-10-28 18:49:29 +01:00
Christoph Oelckers
e6efee61b1
- moved the last remaining function from gl_shadowmap.cpp elsewhere so that the file can be deleted.
2018-10-28 17:09:22 +01:00
Christoph Oelckers
54f46fdfee
- moved most of FShadowMap to IShadowMap, except the main Update function.
2018-10-28 16:11:04 +01:00
Christoph Oelckers
cc058f98a5
- use IDataBuffer for the shadow map generator's buffers.
2018-10-28 15:59:20 +01:00
Christoph Oelckers
926a918e0c
- moved the light buffer pointer to globally visible state.
2018-10-28 15:22:48 +01:00
Christoph Oelckers
b2776c9351
- moved lightbuffer files to hwrenderer.
2018-10-28 15:09:33 +01:00
Christoph Oelckers
bd7df13200
- let the light buffer use IDataBuffer as well.
2018-10-28 15:04:57 +01:00
alexey.lysiuk
49c3ec6a87
- fixed compilation warnings reported by GCC and Clang
...
src/gl/data/gl_viewpointbuffer.cpp:142:12: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
src/gl/data/gl_viewpointbuffer.cpp:142:34: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
2018-10-28 15:59:28 +02:00
Christoph Oelckers
54de0bf59f
- changed a bit more stuff that doesn't need to be routed through the OpenGL interface anymore.
2018-10-28 14:25:29 +01:00
Christoph Oelckers
f7c7c8d1c5
- moved some buffer variables out of GLRenderer into common parts of the code so that they can be accessed from hwrenderer as well.
...
This will allow more code to be moved out of the API dependent parts.
2018-10-28 13:56:24 +01:00
Christoph Oelckers
c5b3b9e107
- moved the viewpoint buffer to hwrenderer.
2018-10-28 13:26:47 +01:00