Commit Graph

16523 Commits

Author SHA1 Message Date
Christoph Oelckers f7489976ec - the sound compatibility flags do not need level support.
They are intentionally omitted from both MAPINFO and compatibility settings.
This removes the last place where it still went through the map-modified versions of the compatflags.

# Conflicts:
#	src/s_sound.cpp
2019-01-23 21:18:36 +01:00
Marrub af06d7cb9e Make LevelLocals::ExecuteSpecial return int
# Conflicts:
#	wadsrc/static/zscript/base.txt
2019-01-23 21:15:33 +01:00
Marrub ad5c62da95 Make LevelLocals::ExecuteSpecial return int 2019-01-23 21:15:25 +01:00
alexey.lysiuk 21531c5ddb - unary minus operator propagates boolean operand to integer
https://forum.zdoom.org/viewtopic.php?t=63214
2019-01-23 21:14:29 +01:00
Christoph Oelckers 4126f8ce72 - made OP_NEW a builtin function instead of an opcode.
The code was present 3 times due to the JIt, and this is not something that benefits from being a real opcode, even in the interpreted case.
2019-01-23 21:12:23 +01:00
Marrub cc73449d29 Fix return value of native BuiltinCallLineSpecial 2019-01-23 21:09:34 +01:00
Christoph Oelckers e90ef4e886 - moved the impact decal counter into FLevelLocals and do the counting in a less problematic fashion.
This was yet another piece of code that lived or died with the assumption that there can only be one level, stored in global variables.

# Conflicts:
#	src/p_saveg.cpp
2019-01-23 21:05:27 +01:00
Chronos Ouroboros c64ce0fdfd Fixed multidimensional array definitions. 2019-01-23 21:02:33 +01:00
alexey.lysiuk 5132119812 - increased range of valid sound positions and velocities
https://forum.zdoom.org/viewtopic.php?t=61420
2019-01-23 20:59:38 +01:00
Christoph Oelckers 0fa92d59e2 - same for the ambient sound
# Conflicts:
#	src/s_advsound.cpp
2019-01-23 20:57:39 +01:00
Christoph Oelckers 36f0ab2ea1 - removed dependency on global time in sound sequence code.
This can better use a countdown timer that doesn't depend on external behavior.
2019-01-23 20:56:49 +01:00
Christoph Oelckers ed3bb2fd09 Moved access to ACS instance data out of ScriptUtil worker class
This is better done at a higher level.
2019-01-23 20:55:59 +01:00
Christoph Oelckers 848d9c3750 - Moved high level parts of view border drawing to status bar. 2019-01-23 20:55:38 +01:00
alexey.lysiuk 86acb876f1 - fixed key number assignment during parsing of locks
https://forum.zdoom.org/viewtopic.php?t=63171
2019-01-23 20:45:36 +01:00
alexey.lysiuk 59d84296bf - fixed crash on creation of scroll texture
Example: Hadephobia MAP19 crashes on loading
2019-01-23 20:45:21 +01:00
alexey.lysiuk 11958b713e - fixed many compilation errors with GCC and Clang 2019-01-23 20:45:01 +01:00
Chronos Ouroboros 4fdcc47edc Added support for implicitly-sized initialized arrays.
Also fixed dynamic arrays not being cleared before initializing.
2019-01-23 20:43:46 +01:00
Christoph Oelckers a1ae01e392 - fixed last PR.
The result of GetPointer must be null checked as well!
2019-01-23 20:43:23 +01:00
Chronos Ouroboros 7c91b27463 Fixed some issues in the ZScript array compilation code. 2019-01-23 20:43:06 +01:00
Cacodemon345 70a07e154c Move receiver NULL check above the orresult check (#695)
This is to prevent a VM abort from happening here if orresult is false.
2019-01-23 20:42:41 +01:00
Major Cooke 7666997580 Fixed Thing_ProjectileAimed being broken.
- It was calling the fallback aiming in the wrong place when it should have been outside the speed check.
- Credit to _mental_ for the base code, but no gotos involved.
2019-01-23 20:42:17 +01:00
Christoph Oelckers 83ce72db48 - check the shader timer only once per frame, not once per draw call. 2019-01-23 20:40:17 +01:00
Christoph Oelckers 4de649d4d1 - major cleanup of p_scroll.cpp to eliminate the use of indices to access sidedefs and sectors. 2019-01-23 20:39:38 +01:00
Christoph Oelckers 55339761f6 - fixed serialization of ACS thinker. 2019-01-06 10:25:46 +01:00
Christoph Oelckers a11eea98b5 - replaced some NULLs with nullptr. 2019-01-06 09:39:35 +01:00
Christoph Oelckers 8ead5a3a6b - pass level num to string locking functions as a parameter. 2019-01-06 09:37:11 +01:00
Christoph Oelckers cf7ab6d085 - let level stats screen operate only on the data it got provided instead of getting the current level from global variables. 2019-01-06 09:03:58 +01:00
Christoph Oelckers dca4a42dd6 - changed light mode handling of the hardware renderer so that it only operates on local copies but doesn't alter the level's setting.
There are several places where a temporary change of light mode is needed, all these made this change in the global level struct. Now the change is only local to the active draw info.
2019-01-06 09:00:52 +01:00
Christoph Oelckers 3328821a98 - pass 'level' as a parameter to AABBTree. Also renamed a few things to make the code easier to read. 2019-01-06 08:24:04 +01:00
Chronos Ouroboros a0ce8f2988 Implemented compound initializers for arrays. 2019-01-06 00:46:56 +01:00
Christoph Oelckers b445c6fabc - actually use the newly added indices. 2019-01-06 00:46:09 +01:00
Christoph Oelckers 8b18ed4759 - store the index of each map item in the struct itself and return that for the Index function.
If we ever want to refactor the global level data these must not reference the 'level' variable.
The main parts of the map loader cannot use this information, because it can only be created after running the node builder, so it got its own set of index functions instead.
2019-01-06 00:41:46 +01:00
Christoph Oelckers c05968146e - starting to reduce references to global level variable. 2019-01-05 22:46:45 +01:00
Christoph Oelckers 6f6dc60e2b - moved the global ACS ActiveThinker variable into FLevelLocals. 2019-01-05 21:59:34 +01:00
Christoph Oelckers b386a09358 - changed AFuncDesc initialization to avoid generating initializer functions.
Visual C++ will never statically initialize a class instance where a member field has a default value set, so the DEFINE_ACTION_FUNCTION variants without a direct native call need to be handled differently. The easiest way to do this is to leave out the nullptr default and omit the value in the initializer list. For trailing fields this will always get them nulled.
2019-01-05 20:48:22 +01:00
Player701 28531c3f8f - Fixed spawn height of projectiles created by SpawnPlayerMissile. 2019-01-05 18:19:51 +01:00
Christoph Oelckers 7b235ea13e - moved the per-level ACS state into FLevelLocals. 2019-01-05 18:19:35 +01:00
Christoph Oelckers 131eef9eb9 - converted the ACS Stringbuilder macros into inline functions. 2019-01-05 16:09:59 +01:00
Christoph Oelckers c651045ed3 - let RunHealth clamping respect the newly added global properties. 2019-01-05 15:37:14 +01:00
Christoph Oelckers 639fb43682 -reordered sector_t so that the internal declarations are at the top, followed by the member variables and the methods.
Also tried to sort them by renderer use but that turned out to be without any performance effect, even though the struct is a bit better aligned now and several bytes shorter.
2019-01-05 13:27:32 +01:00
Christoph Oelckers a0ad4ea193 - made the corpse queue a simple array in FLevelLocals.
I have to wonder why it had to use such a complicated implementation that provided no advantages whatsoever.
The new code is just 1/5th of the old one's size and much closer to Hexen's original implementation which also was a simple array but with no means to resize the queue.
2019-01-05 10:53:06 +01:00
Christoph Oelckers dab68184f5 - moved the global spot state into FLevelLocals.
This way it doesn't even have to be a thinker.
2019-01-05 10:04:27 +01:00
Christoph Oelckers 7b16433e97 - changed FraggleScript setup so that the MapLoader does not use the global level variable anymore.
This involves passing the level explicitly to many functions. What was done here may seem a bit excessive but at least it covers everything.
Most importantly, the global ActiveThinker pointer has been moved into FLevelLocals and is now getting tracked properly by the level without using dangerous assumptions about how the game organizes its data.
2019-01-05 09:40:03 +01:00
Christoph Oelckers 95995e4aa3 - use a local pointer to the current level in FraggleScript parser.
Just to test a few things.
2019-01-05 08:59:45 +01:00
Christoph Oelckers 86551e53df - bumped savegame version because the recent scriptification of APlayerPawn will render all old savegames unusable. 2019-01-05 08:52:21 +01:00
Christoph Oelckers bfbf7ff9c9 - made forwardmove and sidemove defaults configurable through the gameinfo section. 2019-01-05 08:48:57 +01:00
Christoph Oelckers d898cadda5 - fixed: Trying to remove the first item in an actor's inventory would lose all owned items. 2019-01-04 18:56:14 +01:00
Christoph Oelckers b47a3804d2 - fixed delete calls on FDynamicLight.
This isn't allocated from the system heap so it cannot be freed by it.
2019-01-04 16:12:39 +01:00
Christoph Oelckers 980977d444 - fixed: GetSoundClass must be able to handle non-players. 2019-01-04 16:08:45 +01:00
Magnus Norddahl f10ded756e - split shadowmap AABB tree into two parts. one for static and one for dynamic
- upload only the dynamic AABB subtree using glBufferSubData
- change internal raytracing stack limit from 16 to 32
- update shadowmap AABB tree after R_SetupFrame for proper frame interpolation
2019-01-04 15:51:59 +01:00