Commit Graph

10563 Commits

Author SHA1 Message Date
Magnus Norddahl 36f168040e Fix null pointer crash bug 2016-12-04 03:12:40 +01:00
Christoph Oelckers daf1a40521 - allow swapping the order of gl_finish and SwapBuffers calls, because some cards do not seem to like the correct order. 2016-12-03 20:09:25 +01:00
Christoph Oelckers 834802def3 - sanitized the old sprite offset adjustment feature and used it to redefine offsets for some sprites that have really bad ones. 2016-12-03 19:49:32 +01:00
Rachael Alexanderson 244eaa99b3 Merge branch 'master' of https://github.com/rheit/zdoom 2016-12-03 13:23:28 -05:00
Christoph Oelckers dc1f03ec13 Merge branch 'zscript' of https://github.com/rheit/zdoom into gz-zscript 2016-12-03 19:14:39 +01:00
Christoph Oelckers 04f5be6249 - zcc_compile.cpp needs to include version.h for the DYNLIGHT #define. 2016-12-03 19:14:20 +01:00
Christoph Oelckers 5dd63a86cf - removed excess arguments for IMPLEMENT_CLASS. 2016-12-03 18:59:28 +01:00
Christoph Oelckers fbc8d0e83c Merge branch 'zscript' of https://github.com/rheit/zdoom into gz-zscript
# Conflicts:
#	wadsrc/static/zscript.txt
2016-12-03 18:51:10 +01:00
Christoph Oelckers 34970c9b9c - removed hexenglobal include from GL files. 2016-12-03 18:49:52 +01:00
Christoph Oelckers 71bda99c3b - fixed: DECORATE didn't pass all needed arguments to FunctionBuildList.AddFunction. Removed the default parameter values from this function's declaration to prevent it from happening again. 2016-12-03 18:14:07 +01:00
Christoph Oelckers 21e3aba1c7 - optionally allow passing a script position object to V_GetColor and subfunctions for better error output. Implemented this for all occurences where this info was available. 2016-12-03 16:27:53 +01:00
Christoph Oelckers 1fc90b1ba9 - fixed: A_Face* should not require the target to be non-null. 2016-12-03 15:59:02 +01:00
Christoph Oelckers 6a4f867c91 Merge branch 'master' into zscript 2016-12-03 15:54:18 +01:00
Christoph Oelckers 30cbce051e - fixed: Custom automap colors were not invalidated on restart.
- fixed: D_DoomMain has 3 calls to D_DoomLoop but only the main call of these was capable of a clean restart.
2016-12-03 15:44:46 +01:00
Magnus Norddahl d504931a80 Merge branch 'master' of https://github.com/raa-eruanna/qzdoom into qzdoom 2016-12-03 14:59:05 +01:00
Magnus Norddahl e09c7d239f Adjust class naming to closer match the GZDoom renderer and split portal rendering part to its own file 2016-12-03 14:58:56 +01:00
Christoph Oelckers 5117b32431 - fixed: The math for emulating the old slop overflow was not correct and made the affected sectors in void.wad display incorrectly.
- set compat_polyobj for void.wad because its polyobjects glitch quite a bit with the normal setting.
2016-12-03 14:42:06 +01:00
Christoph Oelckers 28604bad62 - fixed: The polyobject init specials must be cleared after Polyobject initialization is done, because they can block usage of regular lines colinear with the polyobject 2016-12-03 14:06:51 +01:00
Christoph Oelckers 0da233a664 changed ZScript include mechanism.
* It will now use #include, just like most other definition formats and can be mixed with regular definitions. However, due to how the Lemon-generated parser works this will not recursively pull in all files, but store them in a list and process them sequentially. Functionally this shouldn't make a difference, because ZScript is mostly order-independent - the only thing where order is important is native classes, but these are completely internal to zdoom.pk3 where proper order is observed.
2016-12-03 13:16:09 +01:00
Christoph Oelckers 136e976b2a - added an error check for duplicate local variable definitions.
Note that this only applies if both are in the same block. Just like in C++, it is perfectly legal to have the same variable name in two different nested scopes.
2016-12-03 12:33:58 +01:00
Christoph Oelckers b3783a3850 redid the exception mechanism for script-side access violations to be of more use for diagnosing problems.
The original implementation just printed a mostly information-free message and then went on as if nothing has happened, making it ridiculously easy to write broken code and release it. Changed it to:

* Any VMAbortException will now terminate the game session and go back to the console.
* It will also print a VM stack trace with all open functions, including source file and line numbers pointing to the problem spots. For this the relevant information had to be added to the VMScriptFunction class.

An interesting effect here was that just throwing the exception object increased the VM's Exec function's stack size from 900 bytes to 70kb, because the compiler allocates a separate local buffer for every single instance of the exception object.
The obvious solution was to put this part into a subfunction so that it won't pollute the Exec function's own stack frame. Interesting side effect of this: Exec's stack requirement went down from 900 bytes to 600 bytes. This is still on the high side but already a lot better.
2016-12-03 12:23:13 +01:00
Rachael Alexanderson fc2ae9ecc3 Delete DelLLVMCache.cmd
This file is now vestigial and no longer needed.
2016-12-03 02:18:29 -05:00
Magnus Norddahl dbacb75617 Capped sky rendering 2016-12-03 06:58:06 +01:00
Magnus Norddahl ff063a33b5 Merge branch 'master' of https://github.com/raa-eruanna/qzdoom into qzdoom 2016-12-03 05:02:42 +01:00
Magnus Norddahl 04e981dba0 Fix up/down culling issue 2016-12-03 05:02:34 +01:00
Rachael Alexanderson c95372052c Merge branch 'master' of https://github.com/rheit/zdoom 2016-12-02 16:39:50 -05:00
Christoph Oelckers d93b6e31d6 - fixed: The ammo and sister weapon type pointers were not properly declared as pointers to the type system. 2016-12-02 22:10:15 +01:00
Christoph Oelckers 211d9d92a1 Merge branch 'master' into zscript 2016-12-02 21:14:56 +01:00
Christoph Oelckers 87d2991256 - removed all cluster music definitions so that the default from the gameinfo section can be used to change it. 2016-12-02 20:13:30 +01:00
Christoph Oelckers 60b1f5c25a - fixed: FPNGTexture::fr could be left uninitialized. 2016-12-02 19:38:30 +01:00
Christoph Oelckers 91c3ddf692 - fixed: When a tentative class is being replaced, the old one should be removed entirely so that it cannot cause any problems later. 2016-12-02 19:30:58 +01:00
Christoph Oelckers fbf8084999 - corrected the export signatures of several script exports to contain the correct classes, so that the fudging in FindFunction could be removed.
- fixed PARAM_ACTION_PROLOGUE to assign correct types to the implicit pointers. It gave the actual class to the wrong one, which until now did not matter because all functions were using 'Actor', regardless of actual class association.
- fixed the definition of IceChunk and removed some redundant code here. Since A_FreezeDeathChunks already calls SetState, which in turn calls the state's action function, there is no need to call it again explicitly.
2016-12-02 18:52:58 +01:00
Christoph Oelckers 1e01e6e4df - record all line numbers during function generation. This is useful for error reporting and eventually debugging.
- throw a useful exception when a VM abort occurs, the simple enum was incapable of reporting anything more than the barest minimum, which at least for array index out of bounds errors was insufficient.

The current exception mechanism is still insufficient. It really has to report a proper crash location and print a stack trace to the maximum extent possible. Instead it just prints a message and happily goes on. This is not a good solution.
2016-12-02 17:36:29 +01:00
Christoph Oelckers 967f6c0269 - use a separate exception type for reporting errors from FraggleScript.
CRecoverableError is used in other parts as well and it might create interference.
2016-12-02 16:56:50 +01:00
Edoardo Prezioso 9dbfa6d04e - Fixed uninitialized line number info in thing map parsing. 2016-12-02 14:54:32 +01:00
Magnus Norddahl ce6e1e1e47 Fully hook up sprite clipping by subsector 2016-12-02 13:24:53 +01:00
Magnus Norddahl 01008f0daa Fix sprite bsp clipping bug and wall sorting bug 2016-12-02 13:06:16 +01:00
Christoph Oelckers f9441cd9d9 - added null pointer validation to any relevant exported function. In most cases null pointers were already being treated as 'do nothing', but there's several places where this can make the code silently fail so in these cases a VM exception will be raised, once the VM's exception handling has been repaired to provide useful diagnostics. (Right now all it does is catch the exception, print a useless message and return to the caller as if nothing has happened.) 2016-12-02 12:06:49 +01:00
Christoph Oelckers 82c2670617 - removed redundant DoDropItem function. A_DropItem already exists and can be used instead. 2016-12-02 11:42:33 +01:00
Magnus Norddahl 71350f2c17 Sprite line clipping by subsector 2016-12-02 08:12:01 +01:00
Christoph Oelckers 05cc3dde72 - fixed: Dehacked did not copy the defaults for DehackedPickup replacements anymore. 2016-12-02 01:33:18 +01:00
Christoph Oelckers 4dd22d74dd - partial optimization of chained comparisons. 2016-12-02 01:16:32 +01:00
Christoph Oelckers fb7a8fb553 - branch optimization for for loops. 2016-12-02 00:56:54 +01:00
Christoph Oelckers 719be058e5 - use the immediate versions for loading integer constants when possible. 2016-12-02 00:54:40 +01:00
Christoph Oelckers 77192fa9dd - branch optimization. 2016-12-02 00:51:29 +01:00
Christoph Oelckers 17d9a152e7 - added missing THINGSPEC constants 2016-12-02 00:31:52 +01:00
Christoph Oelckers cbd61d963f - removed test messages. 2016-12-02 00:29:32 +01:00
Magnus Norddahl fc16f6bbbc Further improve early stencil rejection test by restoring stencil blocks to a single value if possible 2016-12-01 13:31:42 +01:00
Magnus Norddahl 06362385d6 Improve performance by 30% from using a better stencil block rejection test 2016-12-01 11:21:14 +01:00
Magnus Norddahl e3b3b7a4ce Masked store experiment (which turned out to be much slower) 2016-12-01 10:52:53 +01:00