Commit graph

11458 commits

Author SHA1 Message Date
Christoph Oelckers
c519e76280 - fixed calculation of clipping rect's lower edge. 2017-04-23 12:58:40 +02:00
Christoph Oelckers
82b032680c - delete the MMX function, too. 2017-04-23 12:12:49 +02:00
Christoph Oelckers
ace0568d09 - now that SSE2 is a required feature for compiling on x86, DoBlending_MMX has no use anymore and could be removed, as could the checks for bRDTSC, which is an older hardware feature than SSE2. There's also little point printing pre-SSE2 hardware features because they can be assumed to be present on anything the code can run on. 2017-04-23 11:54:08 +02:00
Magnus Norddahl
63e0310961 - add non-sse version of the softpoly drawers 2017-04-23 11:05:48 +02:00
Christoph Oelckers
2621c460e3 Revert "- add CPU.bSSE2 branching support to softpoly"
This reverts commit 545241aa06.

These commits are WIP stuff that should not be in the master branch. A work branch has been created to finalize this code.
2017-04-23 10:39:07 +02:00
Chris Robinson
c2391d6a0d Fix the default loop end point 2017-04-23 09:06:34 +02:00
Chris Robinson
4b7834465b Fix off-by-one error for the loop end 2017-04-23 09:06:34 +02:00
Magnus Norddahl
fe2864d396 - add the AVX-2 softpoly drawer to the repository for completeness sake (not currently used) 2017-04-22 22:15:09 +02:00
Magnus Norddahl
9c805d1867 - added non-sse version of the true color softpoly drawers 2017-04-22 22:05:47 +02:00
alexey.lysiuk
173fa31383 Fixed internal Dehacked support
https://mantis.zdoom.org/view.php?id=619
2017-04-22 22:58:45 +03:00
alexey.lysiuk
e4c73cfc5f Fixed compilation on Linux
src/polyrenderer/drawers/poly_triangle.cpp:212:20: error: ‘CPU’ was not declared in this scope
src/polyrenderer/drawers/screen_triangle.cpp:955:6: error: ‘CPU’ was not declared in this scope
2017-04-22 22:21:34 +03:00
Magnus Norddahl
545241aa06 - add CPU.bSSE2 branching support to softpoly 2017-04-22 20:38:06 +02:00
Christoph Oelckers
3608299e61 - serialize AActor::boomwaterlevel.
After changing the splash code this looks necessary.
2017-04-22 15:52:24 +02:00
Christoph Oelckers
882279d600 - clamp the loop end point to the sample size for sound effects so that bogus values do not render the loop start ineffective. 2017-04-22 15:49:39 +02:00
Christoph Oelckers
dc3df4e897 - remove mod_dumb CVAR. This now effectively disabled module playback because the OpenAL backend cannot substitute for it, unlike FMod. 2017-04-22 10:59:52 +02:00
alexey.lysiuk
ecbfb255f7 Fixed handling of default values in EventHandler.SendNetworkEvent() 2017-04-22 10:28:53 +03:00
alexey.lysiuk
370b639ab1 Fixed crash on returning to title screen
https://mantis.zdoom.org/view.php?id=615
2017-04-22 09:58:38 +03:00
alexey.lysiuk
4e1e527b2c Fixed compilation with Clang
src/sound/oalsound.cpp:1288: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'ALint' (aka 'int') in initializer list [-Wc++11-narrowing]
2017-04-21 22:07:06 +03:00
Christoph Oelckers
3ccd4aa0d1 - fixed: The powerup icons did not blink when expiring. 2017-04-21 18:08:30 +02:00
Christoph Oelckers
0ed3ee6267 - updated the license in fmopl.cpp to the one in the current version of the original file. 2017-04-21 17:48:40 +02:00
Christoph Oelckers
f7a22154b7 - fixed: loop_end needs a different default in the sound effect code than in the music code. 2017-04-21 16:25:36 +02:00
Christoph Oelckers
b3f3500ce5 - added loop tag reading for Ogg and Flac sound effects. Due to lack of test material this is currently untested.
- removed unaligned memory access in FindLoopTags.
2017-04-21 12:29:50 +02:00
Christoph Oelckers
66b5c26352 - consider the volume control of all Windows MIDI mapper devices broken, because it may be the GS synth, which is not detectable. 2017-04-21 10:37:03 +02:00
alexey.lysiuk
c681d6eff0 Fixed applying of multiple pain chances
https://mantis.zdoom.org/view.php?id=608
2017-04-20 22:09:18 +03:00
alexey.lysiuk
e19f6fe8ea Final touch in fixing restart CCMD
https://mantis.zdoom.org/view.php?id=595
2017-04-20 16:20:51 +03:00
alexey.lysiuk
403634c0e1 Fixed crash caused by failure to allocate memory block of very special size
Allocation of 810 FState objects (32400 bytes in total) could be performed in MSVC x64 build but worked in 32-bit version
This fixes https://mantis.zdoom.org/view.php?id=602
2017-04-19 17:52:43 +03:00
ZZYZX
29402ff685 ZScript version of SetCameraToTexture 2017-04-19 11:20:17 +02:00
Christoph Oelckers
1f69a000df - removed redundant sound includes. 2017-04-18 20:55:40 +02:00
alexey.lysiuk
00dc649cc2 Fixed compilation with Clang
error: cannot pass object of non-trivial type 'FString' through variadic constructor; call will abort at runtime [-Wnon-pod-varargs]
2017-04-18 18:46:53 +03:00
Christoph Oelckers
42a34ddd58 - fixed: The menu descriptors were not cleared on restart, leaving some menu data behind. 2017-04-18 16:54:06 +02:00
Christoph Oelckers
8180d34765 - added user configurable menus where soundfonts, patch sets or Timidity EXEs can be selected from lists being stored in the config file to reduce the hassle of testing MIDIs with different settings. 2017-04-18 16:43:07 +02:00
Christoph Oelckers
fb12c58533 - restart the music if the OPL core or the config file for the softsynths is changed, except for the GUS synth, which loads all its data during engine startup and cannot swap it out.
- added arrays to the config to hold entries for the softsynths' config files. This is not active yet, but will later be used to give the user a list of config options instead of having to type it by hand.
2017-04-18 16:43:07 +02:00
alexey.lysiuk
8db239d34f Fixed build with NO_OPENAL defined
https://mantis.zdoom.org/view.php?id=596
2017-04-18 16:40:31 +03:00
alexey.lysiuk
1d84b28fc2 Added support for bool type in SetUserVariable() ACS function
https://mantis.zdoom.org/view.php?id=462
2017-04-18 15:37:45 +03:00
alexey.lysiuk
b6774e723b Fixed non-functional XInput support when built with modern Windows SDKs
https://mantis.zdoom.org/view.php?id=568
2017-04-18 10:42:05 +03:00
alexey.lysiuk
03b77c0505 Set names for mpg123 and sndfile macOS dynamic libraries 2017-04-17 19:21:57 +03:00
alexey.lysiuk
a7cb7bbb9c Backported changes from newer sndfile.h to fix non-MSVC compilation 2017-04-17 18:51:29 +03:00
Christoph Oelckers
7405f541e8 - allow dynamic loading of all sound related libraries without providing any SDK at all.
The needed headers are now included in the repo, which for these libraries is possible thanks to a stable ABI (at least on Windows, the other platforms still need to be checked but the headers only add, never remove or change existing content.)
The big advantage of this setup is that it allows building the project on Windows without any necessary setup - all that needs to be provided is the DLLs from the binary package.
This still requires some fixes for macOS and Linux. On MacOS the proper library names are missing and the ones for Linux are not verified. Both platforms should work, though, if the dynamic loading is disabled.
2017-04-17 17:05:09 +02:00
Christoph Oelckers
a48a3d0abf - fixed some signedness warnings in OPL code. 2017-04-17 15:37:45 +02:00
Christoph Oelckers
96d328de9b - removed all Doom Source license and all default Raven copyright headers and replaced them with GPLv3. Also fixed the license in a few other files.
For some files that had the Doom Source license attached but saw heavy external contributions over the years I added a special note to license all original ZDoom code under BSD.
2017-04-17 13:33:19 +02:00
Christoph Oelckers
57d703236b - changed Doom source license to GPL in all subdirectories and fixed missing licenses in a few other files. 2017-04-17 12:27:19 +02:00
Christoph Oelckers
b68741b17f - removed the special conditions of the FraggleScript license, now that they are no longer needed. Also relicensed the two original files under the GPL for consistency. 2017-04-17 10:31:25 +02:00
Christoph Oelckers
33ee761b37 - fixed: The timing of Heretic's lava damage was not correct. 2017-04-17 10:10:09 +02:00
alexey.lysiuk
59626cf843 Simplified transition to OpenAL sound backend 2017-04-17 10:46:38 +03:00
alexey.lysiuk
4519ab12e9 Fixed compilation errors
src/sound/oplsynth/musicblock.cpp:3:10: fatal error: 'muslib.h' file not found
src/sound/oplsynth/oplio.cpp:410:12: error: use of undeclared identifier 'cos'
src/sound/oplsynth/oplio.cpp:410:41: error: use of undeclared identifier 'sin'
2017-04-17 10:27:11 +03:00
Christoph Oelckers
c219811a54 - removed FMod as the last remaining piece of code that is not GPL compatible.
Please consider GZDoom as licensed under the GPL starting with this commit, even though the license headers have not been changed yet.
2017-04-17 01:06:54 +02:00
Christoph Oelckers
79ed1f73e7 - some minor cleanup, including renaming some data structutrd in the OPL code. 2017-04-17 00:46:27 +02:00
Christoph Oelckers
ba5721f98a - rewrote the OPL middle layer to remove the MusLib code.
The new version keeps the non-MusLib code of both files and replaces most of the rest with code from Chocolate Doom.
2017-04-17 00:39:03 +02:00
Christoph Oelckers
4f67dc4f01 - fixed: DCorpsePointer's constructor was doing nasty stuff while the object wasn't fully set up yet. 2017-04-15 19:07:13 +02:00
Christoph Oelckers
47bcd8aaa2 - added per-layer translucency support to the OpenGL PSprite drawer. 2017-04-15 17:25:46 +02:00
Major Cooke
259e3127fe - Fixed crash with corpse queueing. 2017-04-15 16:43:40 +02:00
Christoph Oelckers
1ee9256842 - did a complete workover of the weapon sprite translucency code that got inherited from QZDoom.
This was very poorly done without ever addressing the issues a composite render style can bring, it merely dealt with the known legacy render styles.
The same, identical code was also present in two different places.
The oversight that AlterWeaponSprite overrode even forced styles was also fixed.

OpenGL is not implemented yet but with the problems eliminated should be doable now.
2017-04-15 16:41:00 +02:00
Christoph Oelckers
046e250f2e - fixed: Ceiling_CrushStop checked the wrong argument for the remove parameter. 2017-04-15 14:54:43 +02:00
Christoph Oelckers
2d0da4fcfa - fixed: Dynamic arrays of objects in structs were not registered for garbage collection. 2017-04-15 13:20:58 +02:00
Christoph Oelckers
069e4e9b0b - allow tag == 0 for backside activation on a few more actions. 2017-04-15 12:03:21 +02:00
Christoph Oelckers
e333e31410 - fixed: Vector array elements failed to allocate the proper amount of registers. 2017-04-15 12:03:21 +02:00
alexey.lysiuk
490fd8f3a0 Fixed applying of multiple damage factors
https://mantis.zdoom.org/view.php?id=586
2017-04-15 12:33:26 +03:00
Christoph Oelckers
edebea4f8d - allow specifying a custom class for message box display. 2017-04-14 23:28:54 +02:00
Christoph Oelckers
ca1981c52f - fixed missing null pointer check in BuiltinNameToClass. 2017-04-14 23:06:12 +02:00
Christoph Oelckers
c73b71807b - fixed: During hub travel, static thinkers may not be deserialized.
Since they are static, the version that got carried over from the last level will still be there and the more current version.
2017-04-14 22:06:29 +02:00
Christoph Oelckers
3d8821ee82 - make polyobject setup errors not abort the map. 2017-04-14 20:27:46 +02:00
Christoph Oelckers
d014395dae - do not delete the namespaces when removing compiler symbols. They still get referenced by some types and must remain until the engine shuts down. 2017-04-14 19:40:50 +02:00
Christoph Oelckers
7186342221 - do not try to serialize static arrays. 2017-04-14 19:25:47 +02:00
Christoph Oelckers
d03c33f393 - added Translation.GetID. 2017-04-14 17:40:05 +02:00
alexey.lysiuk
2add60a4c4 Single RUNTIME_CLASS() macro for classes and templates
The main purpose of this is to fix compilation errors with GCC/Clang
src/dobject.h:87:48: error: expected primary-expression before ‘)’ token
2017-04-14 18:07:20 +03:00
Christoph Oelckers
cde450dd8a - some enhancements for PowerReflection. 2017-04-14 16:51:11 +02:00
Christoph Oelckers
329c168cc2 - added a distance parameter to A_SprayDecal. 2017-04-14 16:28:54 +02:00
Christoph Oelckers
92acbdc625 - made GetClassName an intrinsic and expanded it to also work on class types. 2017-04-14 16:14:27 +02:00
Christoph Oelckers
1135f154b7 - fixed: For Screen.SetClipRect, -1 is a valid value for width and height so it must not be clamped away. 2017-04-14 15:41:36 +02:00
Christoph Oelckers
47bb29bac6 - check the return value of ogl_LoadFunctions and abort if it indicates failure.
If this happens there is normally something very wrong on the system side so continuing is not advised.
2017-04-14 15:32:04 +02:00
Christoph Oelckers
7983f6ea4f - fixed incorrect return variable. 2017-04-14 15:23:18 +02:00
alexey.lysiuk
fd07b56ae9 Fixed link error for MSVC x64 build with modern Windows SDK
win32video.obj : error LNK2001: unresolved external symbol IID_IDirectDraw2
2017-04-14 16:13:51 +03:00
Christoph Oelckers
33145610b1 - let's better add a null check to Create<> in case allocation or construction fails. Although unlikely it's not impossible. 2017-04-14 13:48:00 +02:00
Christoph Oelckers
cd180d29c7 - block direct use of 'new' for DObjects.
This is to ensure that the Class pointer can be set right on creation. ZDoom had always depended on handling this lazily which poses some problems for the VM.
So now there is a variadic Create<classtype> function taking care of that, but to ensure that it gets used, direct access to the new operator has been blocked.

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

- did a bit of optimization on the bots' decision making whether to pick up a health item or not.
2017-04-14 13:31:58 +02:00
Christoph Oelckers
929affa3cb - removed MarkACSThinker.
The global variable holding a pointer to this thinker should be a weak reference to the instance in the thinker chain, there is no need to mark this global variable, as the thinker's lifetime is only determined by the thinker chain.

- committed a few Posix related file the last commit missed.
2017-04-14 10:59:57 +02:00
Christoph Oelckers
dc5a5419fc - took DCanvas and all its subtypes out of the DObject tree.
I have no idea why they were even in there, as they intentionally circumvented all GC related features - they declared themselves fixed if prone to getting collected, they all used OF_YesReallyDelete when destroying themselves and they never used any of the object creation or RTTI features, aside from a single assert in V_Init2.

Essentially they were a drag on the system and OF_YesReallyDelete was effectively added just to deal with the canvases which were DObjects but not supposed to behave like them in the first place.
2017-04-14 10:48:18 +02:00
Magnus Norddahl
d407aa3157 - Fix linear filtering bug for sprites 2017-04-13 22:16:26 +02:00
Christoph Oelckers
b1057cee36 - fixed: do not draw armor on the fullscreen HUD if the amount is 0. 2017-04-13 20:43:17 +02:00
Christoph Oelckers
2d098e99fb - fixed: WP_NOCHANGE had different values in native and script code, resulting in problems with weapon selection.
This now explicitly allocates a single object it can safely point to instead of trying to hack around it.
2017-04-13 18:59:45 +02:00
Christoph Oelckers
98dab9c4b9 - took PTypeBase and all its subclasses out of the DObject hierarchy.
- moved scope flag to a new variable that is specific to PType instead of hijacking the ObjectFlags for this.
2017-04-13 17:47:17 +02:00
Christoph Oelckers
988fe8d735 - removed all RTTI from the type table.
Using names is just as good as using types so now this is what's done.
2017-04-13 16:01:38 +02:00
Christoph Oelckers
aeb455d705 - removed all RTTI checks for the types. 2017-04-13 15:38:06 +02:00
Christoph Oelckers
b2d944974e - first stage of simplifying the type system.
Let's use inline checkers in PType instead of constantly having to do clumsy IsKindOf checks etc. Once complete this also means that the types can be taken out of the class hierarchy, freeing up some common names.
2017-04-13 12:52:18 +02:00
Christoph Oelckers
522ce59be2 - use in-class initialization for FLightDefaults to avoid uninitialized variables in the future. 2017-04-13 12:50:43 +02:00
alexey.lysiuk
cced9e014b Fixed issue with actors occasionally unaffected by dynamic lights
https://mantis.zdoom.org/view.php?id=536
2017-04-13 13:14:33 +03:00
alexey.lysiuk
fbc1028d2b Fixed crash when parsing DECORATE constant expressions 2017-04-13 12:06:59 +03:00
alexey.lysiuk
cbf2a21c83 Fixed registration of tentative classes 2017-04-13 12:03:45 +03:00
alexey.lysiuk
c99cecea8e Fixed warnings reported by GCC/Clang
src/p_pspr.cpp:363:37: warning: more '%' conversions than data arguments [-Wformat]
src/gl/textures/gl_texture.cpp:845:21: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
2017-04-13 10:40:44 +03:00
alexey.lysiuk
1889efa814 Fixed build with Clang
Fixed bunch of compilation errors:
cannot pass non-trivial object of type 'FString' to variadic method; expected type from format string was 'char *' [-Wnon-pod-varargs]

Fixed linker erorr:
g_doomedmap.cpp.o: In function `InitActorNumsFromMapinfo()':
src/g_doomedmap.cpp: undefined reference to `PClass::FindActor(FName)'
2017-04-13 10:40:43 +03:00
Christoph Oelckers
1712667ce2 Merge branch 'master' of https://github.com/coelckers/gzdoom 2017-04-13 02:18:16 +02:00
Christoph Oelckers
85d8244d03 - fixed: With the reorganization of the class data the setup of actor replacements must be delayed until after InitializeDefaults has been called. 2017-04-13 02:18:06 +02:00
Christoph Oelckers
6599e2c425 - moved the VM types into their own file and only include it where really needed. 2017-04-13 01:12:04 +02:00
Christoph Oelckers
3e47f00ba0 - the new order requires manual deletion of all class descriptors. 2017-04-12 22:57:14 +02:00
Christoph Oelckers
fc9e304189 - separated class descriptors from VM types.
Combining these two groups of data has been the cause of many hard to detect errors because it allowed liberal casting between types that are used for completely different things.
2017-04-12 22:46:49 +02:00
Christoph Oelckers
afd6743965 - moved AddNativeField to PSymbolTable, too. 2017-04-12 18:29:58 +02:00
Christoph Oelckers
8dc11317dd - Moved WriteFields into SymbolTable as well. 2017-04-12 17:42:10 +02:00
Christoph Oelckers
96631e8808 - make PClass not inherit from PStruct.
Having these two types related can cause problems with detection in the compiler because for some parts they need quite different handling.
Common handling for the fields has been moved into PSymbolTable but overall redundancy was quite minor as both types share surprisingly little functionality.
2017-04-12 17:21:13 +02:00
alexey.lysiuk
20a9f17a15 Fixed handling of count parameter's default value in Array.Delete()
https://mantis.zdoom.org/view.php?id=571
2017-04-12 17:40:17 +03:00
Christoph Oelckers
0d7b7d6ab1 - merged PStruct and PNativeStruct.
There were exactly 4 places in the code that checked for the difference, this is better done with a flag.
2017-04-12 15:12:41 +02:00
Christoph Oelckers
63eb3e331e - un-const-ify some functions. 2017-04-12 14:40:29 +02:00