Commit graph

10550 commits

Author SHA1 Message Date
alexey.lysiuk
08bf08f297 Restored effect of negative horizontal texture scale in software renderer 2017-02-14 12:33:27 +02:00
Magnus Norddahl
eac98ac226 Calculate sprite dynamic light contribution and pass it along to the sprite drawer 2017-02-14 06:37:06 +01:00
Magnus Norddahl
5ef8ecce2a Fix wall scroller direction 2017-02-14 02:52:41 +01:00
Christoph Oelckers
73ed351144 - don't error out on unknown CVars for optional parameters in menu items. 2017-02-13 23:24:31 +01:00
Rachael Alexanderson
2a71ec89de Merge https://github.com/coelckers/gzdoom 2017-02-13 17:02:56 -05:00
Christoph Oelckers
32da1de385 - fixed: negative texture scales should not affect the direction a wall scrolls in. 2017-02-13 22:37:16 +01:00
Christoph Oelckers
cb758f6dab - added a 'nolightfade' MAPINFO option which disables light diminishing in OpenGL. Note that this only works for light modes 0-3. Modes 4 and 8 use special light math that would not work if such a setting was forced. 2017-02-13 22:17:15 +01:00
Christoph Oelckers
1a63450fe2 - fixed a few issues with actor bouncing logic. 2017-02-13 22:00:27 +01:00
Christoph Oelckers
5dd00e44ef - fixed bad parameters for MouseEvent call in menus. 2017-02-13 20:06:07 +01:00
Christoph Oelckers
6525e04118 - added restrictions to CVAR and CCMD access functions for the menus. CVAR changes are only allowed when the menu is open or for mod-CVARs. The CCMD execution function is now private to the control requiring it and heavily guarded against improper access from the outside so that abuse is mostly impossible.
This also means that the remaining scriptification of the menu is on hold. The player menu would require even more access to critical game data, which is a no-go, and the other remaining menus offer little benefit from getting scriptified.
2017-02-13 19:18:45 +01:00
Christoph Oelckers
7877bcbdcb - exported more parts of the joystick menus and also exported all strings for them to the string table.
- exported the skeleton definition for list menus.
2017-02-13 17:45:03 +01:00
Magnus Norddahl
9159e3b1f0 Move software canvas drawing to its own file in the software renderer 2017-02-13 17:32:52 +01:00
Magnus Norddahl
10b36934c2 Fix vid_hw2d 0 translation bug 2017-02-13 16:13:24 +01:00
Magnus Norddahl
93f43e8751 Menu code accessed the screen buffer without a lock 2017-02-13 15:42:35 +01:00
Magnus Norddahl
69787fac72 Fix translation issue 2017-02-13 15:08:11 +01:00
raa-eruanna
a2edca6032 - fix at least one of the GCC errors 2017-02-13 07:01:44 -05:00
Rachael Alexanderson
8c176575c8 Merge https://github.com/coelckers/gzdoom 2017-02-12 21:39:20 -05:00
Christoph Oelckers
89ef30166d - fixed assembly output for SO instruction. 2017-02-13 00:25:39 +01:00
Christoph Oelckers
46c0d27fe7 - scriptified the entire OptionMenu class and all still existing native subclasses. 2017-02-13 00:08:20 +01:00
Magnus Norddahl
22be201fc7 Split line drawing into more functions 2017-02-13 00:00:25 +01:00
Christoph Oelckers
12db190f41 - scriptified the CVar printers for the gameplay and compatibility menus. 2017-02-12 23:17:05 +01:00
Christoph Oelckers
2b977f70e6 - scriptified the video mode menu (only the part that extends the actual menu class, the entire thing is basically non-modifiable but this code would otherwise stand in the way of properly handling the rest of the menus.) 2017-02-12 23:05:39 +01:00
Christoph Oelckers
7d96f85fe8 Merge remote-tracking branch 'remotes/origin/master' 2017-02-12 21:57:46 +01:00
Christoph Oelckers
b6ad14a614 - made adjustments to text input menu to work with scripts. 2017-02-12 21:45:37 +01:00
Christoph Oelckers
f0e925c5a7 - scripted color picker fully working. 2017-02-12 20:20:47 +01:00
Christoph Oelckers
dbf3530696 - the keybinding control works again, this time fully scripted. 2017-02-12 18:38:23 +01:00
Christoph Oelckers
2e9c1ec3f3 - fixed translation setup for player backdrop.
- fixed return value of GetAction method of menu controls.
2017-02-12 16:48:29 +01:00
Christoph Oelckers
03283de4e8 - fixed issues with option menu items.
- fixed the octal parser in strbin.
- remove 'new' token because it gets in the way.
2017-02-12 16:02:55 +01:00
Christoph Oelckers
4562695854 - fixed stringtable access in menus. 2017-02-12 14:28:38 +01:00
Christoph Oelckers
bb6def820f - everything compiles and mostly works again. 2017-02-12 14:04:48 +01:00
Rachael Alexanderson
ae0ef8b09d Merge https://github.com/coelckers/gzdoom
# Conflicts:
#	src/r_things.cpp
2017-02-12 06:28:20 -05:00
Magnus Norddahl
9482c3e639 Fixed voxel clipping bug 2017-02-12 11:32:06 +02:00
alexey.lysiuk
c01107181a Reset sound position only when there is no listener
https://mantis.zdoom.org/view.php?id=206
https://mantis.zdoom.org/view.php?id=248
2017-02-12 11:26:25 +02:00
Magnus Norddahl
83332562f1 Fix skyhack 2017-02-12 07:37:18 +01:00
Magnus Norddahl
bb749c032a Create SetTopTexture, SetMiddleTexture and SetBottomTexture 2017-02-12 07:24:35 +01:00
Magnus Norddahl
b5c5bd9a1c Create ClipSegmentTopBottom function 2017-02-12 06:44:03 +01:00
Magnus Norddahl
8d25a6d8d4 rw_offset is not a member variable 2017-02-12 06:23:57 +01:00
Magnus Norddahl
0dadf38bbe Create WallPartTexture class 2017-02-12 06:17:38 +01:00
Magnus Norddahl
0ba8448782 Fix colormap null pointer crash 2017-02-12 03:25:27 +01:00
Magnus Norddahl
9123c71bb6 Fix clang warning 2017-02-12 03:25:17 +01:00
Magnus Norddahl
5a85fabfa6 Add true color support to voxel renderer 2017-02-12 01:27:26 +01:00
Christoph Oelckers
ee1217c8c7 - everything compiles again, now to make it work again with all menu widgets 100% scripted. 2017-02-12 01:18:49 +01:00
Magnus Norddahl
0cea344dce Fix voxel clipping bug 2017-02-11 23:23:34 +01:00
Magnus Norddahl
8c5360e547 Enable Ken Silverman's voxel drawing code now that he has given us permission to license it as GPL 2017-02-11 22:10:52 +01:00
Christoph Oelckers
2a5b26c27c - removed native option menu controls. Note that this commit will not compile! 2017-02-11 21:28:48 +01:00
Magnus Norddahl
3e28d53308 Move rw_havelow and rw_havehigh to local function variables 2017-02-11 20:27:11 +01:00
Magnus Norddahl
9e2702d885 Move more encrypted code into IsInvisibleLine, IsDoorClosed and IsSolid 2017-02-11 20:01:23 +01:00
Magnus Norddahl
1983dd2483 Move code closer to where it is used 2017-02-11 19:13:26 +01:00
Magnus Norddahl
1141e05fdf Decipher some line setup code into ShouldMarkFloor, ShouldMarkCeiling and ShouldMarkPortal 2017-02-11 18:52:49 +01:00
Magnus Norddahl
c17317de24 Rename variables and group them a little more how they are used 2017-02-11 18:00:02 +01:00
Christoph Oelckers
fc4e1ffcdf - separated the savegame menu code into an internal class managing the savegame data and the actual menu.
The manager class cannot be scriptified because it provides the internal implementation which may change at some point in the future. It also encapsulates all access to the file level because if that part is not protected, modders could write malware mods.
2017-02-11 17:20:12 +01:00
Christoph Oelckers
947b625c50 - all menu items scriptified, but not yet active. 2017-02-11 16:11:48 +01:00
Rachael Alexanderson
a52f79055d Merge https://github.com/coelckers/gzdoom
# Conflicts:
#	src/menu/playerdisplay.cpp
2017-02-11 05:05:24 -05:00
Christoph Oelckers
f91d91d6e8 - all optionmenu items scriptified, but not integrated yet. 2017-02-11 00:36:53 +01:00
alexey.lysiuk
d2affc7c0c Fixed crash on attempt to get string value of null
https://mantis.zdoom.org/view.php?id=231
2017-02-10 16:19:33 +02:00
Christoph Oelckers
98de1fcfcb - make the pixel buffer of the player backdrop dynamic. 2017-02-10 14:18:00 +01:00
Christoph Oelckers
65174af544 - moved the backdrop for the player box into the texture manager so that the menu doesn't have to bother with managing the texture itself. 2017-02-10 14:07:21 +01:00
Christoph Oelckers
8c780ab7ff - exported the drawer function of the colorpicker menu. 2017-02-10 13:21:35 +01:00
alexey.lysiuk
04e2b3be4a Fixed compilation with GCC/Clang
No more 'enumeration previously declared with fixed underlying type' error
2017-02-10 13:34:28 +02:00
Christoph Oelckers
be9b2b38fc - ColorpickerMenu.MouseEvent exported. 2017-02-10 11:44:46 +01:00
Rachael Alexanderson
ad1092c670 Merge https://github.com/coelckers/gzdoom 2017-02-10 00:16:25 -05:00
Christoph Oelckers
07ba75762b - the first menu function has been scriptified. 2017-02-10 00:25:50 +01:00
Magnus Norddahl
3c0d769499 Fix portals draw segment indexing bug 2017-02-09 22:58:28 +01:00
Christoph Oelckers
7efa9cd70d - made the menu descriptors garbage collectable and started exporting some fields as preparation for script work on the menu. 2017-02-09 20:18:53 +01:00
Rachael Alexanderson
6ed46921c8 Merge https://github.com/coelckers/gzdoom 2017-02-09 11:21:01 -05:00
Christoph Oelckers
f37db344df - removed class pointers from AActor's pointer list. 2017-02-09 15:13:43 +01:00
alexey.lysiuk
7c8babceba Extended mouse wheel handling in Cocoa backend
Horizontal scrolling using mouse wheel with Shift keyboard button hold is no longer ignored
2017-02-09 16:07:28 +02:00
alexey.lysiuk
14ca635dc1 Fixed clashing of actor render flags' values
Sorted definitions in ascending order of values
See https://mantis.zdoom.org/view.php?id=204
2017-02-09 15:45:35 +02:00
Magnus Norddahl
ff4de4a744 Merge branch 'master' of https://github.com/raa-eruanna/qzdoom into qzdoom 2017-02-09 12:19:33 +01:00
Magnus Norddahl
c16aa3d361 Fix crouch player sprite 2017-02-09 12:18:40 +01:00
Christoph Oelckers
4e1300ecbe - added a script export for ACS's ReplaceTextures function. 2017-02-09 12:02:07 +01:00
Rachael Alexanderson
325ef6d7d7 Merge https://github.com/coelckers/gzdoom 2017-02-09 05:56:01 -05:00
nashmuhandes
3d9673af44 Fixed: Models did not take SpriteRotation into account 2017-02-09 11:29:10 +01:00
nashmuhandes
a4d146c843 Added DONTCULLBACKFACES MODELDEF flag to forcefully disable backface culling on models 2017-02-09 11:24:10 +01:00
Christoph Oelckers
845f5e0833 - fixed: A_Teleport and A_Warp had incorrect declarations for their state parameter. 2017-02-09 11:22:36 +01:00
Christoph Oelckers
4f0747c59e - fixed: Class pointers were accepted for objects of the base type 'Object'. 2017-02-09 11:11:54 +01:00
alexey.lysiuk
4dd7e02721 AActor::GiveInventory() is now functional
See https://mantis.zdoom.org/view.php?id=213
2017-02-09 10:15:05 +02:00
Rachael Alexanderson
47100e473e Merge https://github.com/coelckers/gzdoom 2017-02-09 02:09:21 -05:00
Magnus Norddahl
371dd98102 Show player in mirrors and portals 2017-02-09 05:57:37 +01:00
Magnus Norddahl
388c511e11 Fix portal sprite clipping bugs 2017-02-09 05:42:15 +01:00
Christoph Oelckers
ccecfeb45c - to avoid problems with the final garbage collection, the players' PendingWeapon needs to be cleared manually.
This is because it can point to a non-standard value which the garbage collector cannot deal with during engine shutdown.
2017-02-09 01:34:07 +01:00
Rachael Alexanderson
5948c7b0da Merge https://github.com/coelckers/gzdoom 2017-02-08 18:42:24 -05:00
Christoph Oelckers
4e685f2b78 - fixed: for unpositioned sounds the play position was never initialized and depended on random memory contents. 2017-02-08 23:29:52 +01:00
Christoph Oelckers
36a07b8e6e - remove all type table entries from garbage collection.
Like the symbols and the VM functions this is data that is static from startup until shutdown and has no need to be subjected to garbage collection. All things combined this reduces the amount of GC-sensitive objects at startup from 9600 to 600.
2017-02-08 22:43:20 +01:00
Christoph Oelckers
8277299135 - Turned DropItem into a plain struct again like it was before the scripting branch got merged.
Making this an object had little to no advantage, except being able to remove the deleter code. Now, with some of the class data already being allocated in a memory arena so that freeing it is easier, this can also be used for the drop item lists which makes it unnecessary to subject them to the GC. This also merges the memory arenas for VM functions and flat pointers because both get deleted at the same time so they can share the same one.
2017-02-08 20:37:22 +01:00
Christoph Oelckers
9499c22dfe - restored ZDoom 2.8.1's version of FindClassTentative which just modified the existing class instead of replacing it and having to run a costly and volatile PointerSubstitution call to replace all pointers to the old one. 2017-02-08 19:52:33 +01:00
Christoph Oelckers
17a2666bd4 - moved DisplayName, the last remaining PlayerPawn meta property, to PClassActor so that PClassPlayerPawn could be removed.
Now all actors have the same metaclass and therefore it will always be the same size which will finally allow some needed changes to the type system which couldn't be done because it was occasionally necessary to replace tentatively created classes due to size mismatches.
2017-02-08 19:42:24 +01:00
Christoph Oelckers
68e9918ed5 - moved player color sets and pain flashes into global variables.
There's simply never enough of them and they are used far too infrequently to justify the hassle of tagging along two TMaps per class.
For what they provide, single global lists that handle all player classes at once are fully sufficient.
2017-02-08 19:10:11 +01:00
Major Cooke
dd102caf13 - Fixed: SetCamera didn't have the 'action' identifier, nor did it use the actual 'cam' actor provided, rendering it nonfunctional. 2017-02-08 18:17:09 +01:00
Christoph Oelckers
c77f6636f8 - moved the three remaining variables from PClassInventory to PClassActor so that PClassInventory can be removed. 2017-02-08 18:11:23 +01:00
Christoph Oelckers
eebe09fb59 - moved the scalar class properties of PClassInventory into AInventory.
What's left is the non-scalars, they will need different treatment to get them out of the way.
2017-02-08 16:57:48 +01:00
Christoph Oelckers
2ca0e34785 - turned many of PClassPlayerPawn's strings into names and moved all scalar properties into APlayerPawn.
The goal is to get rid of PClassPlayerPawn and PClassInventory so that the old assumption that all actor class descriptors have the same size can be restored
This is important to remove some code that seriously blocks optimization of the type table because that can only be done if types do not need to be replaced.
2017-02-08 16:42:13 +01:00
Christoph Oelckers
a6785afddb - optimized the FName versions of IsDescendantOf and IsKindOf. These can be done without first looking up the class type itself. 2017-02-08 15:47:22 +01:00
Christoph Oelckers
31223ca180 - remove all symbols that get linked into the symbol table from the garbage collector.
Symbols are very easy to manage once they are in a symbol table and there's lots of them so this reduces the amount of work the GC needs to do quite considerably.
After cleaning out compile-time-only symbols there will still be more than 2000 left, one for each function and one for each member variable of a class or struct.
This means more than 2000 object that won't need to tracked constantly by the garbage collector.

Note that loose fields which do occur during code generation will be GC'd just as before.
2017-02-08 14:34:39 +01:00
Christoph Oelckers
f1b3d60b2f - PSymbol does not need to inherit from PTypeBase. This also means that there are no remaining references to any symbol object outside of the symbol tables. 2017-02-08 13:37:13 +01:00
Christoph Oelckers
18c532c307 - moved the compiler symbols into their own file.
- removed all pointer declarations to types from the symbols. All types must be placed into the type table which means that they can be considered static.
2017-02-08 13:17:25 +01:00
Christoph Oelckers
5a81a4ca16 - moved a few things around to have them into better fitting places. 2017-02-08 12:24:08 +01:00
Christoph Oelckers
f6d6f310a9 - fixed comments. 2017-02-08 11:56:12 +01:00
Christoph Oelckers
3cbd62479b - took VMFunction out of the DObject hierarchy.
As it stood, just compiling the internal ZScript code created more than 9000 DObjects, none of which really need to be subjected to garbage collection, aside from allowing lazy deallocation.
This puts an incredible drag on the garbage collector which often needs several minutes to finish processing before actual deletion can start.

The VM functions with roughly 1800 of these objects were by far the easiest to refactor so they are now. They also use a memory arena now which significantly reduces their memory footprint.
2017-02-08 11:13:41 +01:00
Magnus Norddahl
2d25002e2a Fix InterestingSegments not being properly resized in PopPortal 2017-02-08 02:59:25 +01:00