Commit graph

16293 commits

Author SHA1 Message Date
Christoph Oelckers
9f1aedd135 - place automap marker and scale variables in the level so that saving and restoring works properly without affecting other maps by leaving behind residual data. 2019-01-12 00:53:58 +01:00
Christoph Oelckers
fe7112188a - fixed: Strife was missing the move factors. 2019-01-11 22:14:30 +01:00
Christoph Oelckers
7b799be947 - fixed handling of snapshot buffers.
They get copied around a bit too much, so they cannot have a destructor. They must be explicitly deleted when the snapshot gets removed.
2019-01-11 22:00:07 +01:00
Christoph Oelckers
99a3b09a68 - it works now so that I can start a level, go to the next one and quit the engine without crashing.
Judging from this there will be quite a few surprises with the memory management that still need fixing.
2019-01-11 20:53:25 +01:00
Christoph Oelckers
70ee43a95a - started cleaning up g_level.cpp.
This works up to the point where it tries to apply snapshots, it doesn't start the level yet.
2019-01-11 19:31:56 +01:00
alexey.lysiuk
e0826726ba - fixed script line numbers after multi-line raw string literal
https://forum.zdoom.org/viewtopic.php?t=63210
2019-01-11 17:37:07 +01:00
alexey.lysiuk
731fe67600 - fixed saving and loading of games
Saved game with one map only can be loaded so far
2019-01-11 15:55:09 +02:00
Christoph Oelckers
02c9899ed3 - 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.
2019-01-11 12:10:59 +01:00
alexey.lysiuk
e68b3f6694 - fixed crash when playing sounds with no level loaded 2019-01-11 12:55:51 +02:00
alexey.lysiuk
4ee7827d2c - fixed compilation of POSIX targets
src/posix/sdl/i_main.cpp:165:59: error: ‘vp’ was not declared in this scope
src/scripting/backend/codegen.cpp:6286:69: error: invalid initialization of non-const reference of type ‘FArgumentList& {aka TDeletingArray<FxExpression*>&}’ from an rvalue of type ‘FArgumentList {aka TDeletingArray<FxExpression*>}’
2019-01-11 12:50:50 +02:00
Christoph Oelckers
1b1e2ef7d2 - added a level parameter to the thinker iterator.
Not used yet, but will be when the thinker lists are moved into FLevelLocals.
2019-01-11 01:43:43 +01:00
Christoph Oelckers
4ec2d31e9f - give P_ExecuteSpecial a Level parameter. 2019-01-11 01:03:33 +01:00
Christoph Oelckers
1c4e3ae06d - moved the static sky variables into FLevelLocals and removed the redundant ones for the texture ID. 2019-01-11 00:05:07 +01:00
Christoph Oelckers
439c36c8f7 - moved UDMF custom properties into FLevelLocals. 2019-01-10 23:22:21 +01:00
Christoph Oelckers
229dde1e67 - moved the non-map timers out of LevelLocals into GameSession and moved the composite compatibility flags into FLevelLocals, because they are level specific. 2019-01-10 23:08:35 +01:00
Christoph Oelckers
3b59afae31 - some progress. 2019-01-10 21:02:20 +01:00
Christoph Oelckers
f25397b391 - started building the framework to replace the global level variable
A few of the old level members will also be moved to the new class, now that workaround getters can be implemented.
These currently spit out some deprecation warnings which will be addressed next.
2019-01-10 19:46:51 +01:00
Christoph Oelckers
5cd3f86775 - fixed return type. 2019-01-10 18:03:32 +01:00
Christoph Oelckers
2b30ae6ccd - fixed misplaced variable initialization. 2019-01-10 18:02:23 +01:00
Marrub
5dbd81ea7f Make LevelLocals::ExecuteSpecial return int 2019-01-10 17:28:19 +01:00
Marrub
82736985cc Make LevelLocals::ExecuteSpecial return int 2019-01-10 17:28:19 +01:00
Christoph Oelckers
203110c6fe Merge branch 'master' of https://github.com/coelckers/gzdoom 2019-01-10 16:13:41 +01:00
alexey.lysiuk
2cd1ac49eb - unary minus operator propagates boolean operand to integer
https://forum.zdoom.org/viewtopic.php?t=63214
2019-01-10 12:21:16 +01:00
alexey.lysiuk
2bb7d49664 - register interpolators on reading serialization only
Interpolators were added twice when saving a game which led to a cycle in linked list and so to an infinite loop
2019-01-10 11:15:35 +02:00
alexey.lysiuk
f44cf007b7 - fixed sector marker initialization
This fixes a crash when starting a new game for the second time
2019-01-10 10:43:18 +02:00
Christoph Oelckers
d6d66ca774 - the final batch of level removal before refactoring the underlying data. 2019-01-10 03:44:19 +01:00
Christoph Oelckers
ad17bce1f0 - use map time, not hub time for map actions. 2019-01-10 03:42:54 +01:00
Christoph Oelckers
7e3ef4d72d - fixed: The sector tag iterator needs access to the level.
This is done through the tag manager to avoid #include dependency hell. Trying to reference FLevelLocals directly from the inline functions will inevitably create a circular dependency.
2019-01-10 02:50:48 +01:00
Christoph Oelckers
72d09c0338 - the next batch of 'level' removals.
Untested, may not work!
2019-01-10 02:30:38 +01:00
Christoph Oelckers
80427b72e9 - 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-10 02:12:43 +01:00
Christoph Oelckers
9506b0e337 - moved the SectorMarker handling into the level itself. 2019-01-10 02:00:58 +01:00
Christoph Oelckers
8cc563b80f - moved particle storage to FLevelLocals. 2019-01-10 01:21:17 +01:00
Christoph Oelckers
2aa9c065ac - added Level parameter to R/P_PointInSector(Sub)Sector. 2019-01-10 00:30:04 +01:00
Christoph Oelckers
a28d5dd973 - moved sound sequence head of list into FLevelLocals. 2019-01-09 22:55:51 +01:00
Christoph Oelckers
ce8d5b48ef - fixing things. 2019-01-09 21:19:27 +01:00
Christoph Oelckers
21ac6ab97f - fixed saving. 2019-01-09 20:54:36 +01:00
Christoph Oelckers
0b2daaf20f - fixed bad variable name. 2019-01-09 20:48:16 +01:00
Christoph Oelckers
c19e1ff5d7 - moved interpolator into FLevelLocals.
- redid P_Ticker. This function is a messy affair of mixing per-level and per-session actions which all depend on proper ordering. As a result it has to run 3 ForAllLevels iterators to ensure that the order does not change.
2019-01-09 20:46:50 +01:00
Christoph Oelckers
45a4bc88a2 - Changed the sound system to ignore sounds not from the primary level.
This is a task for later when other things actually work, but until then, any sound from a sub-level should simply not play at all.
This required giving the positioned S_Sound version a Level argument so that the sound engine can check which level such a sound belongs to.
2019-01-09 19:53:14 +01:00
Christoph Oelckers
00b49282be - the missing parts of last commit. 2019-01-09 19:02:02 +01:00
Christoph Oelckers
4227b9020c - moved bglobal.freeze to FLevelLocals, because this flag has nothing specific to do with bots as it freezes the entire level. 2019-01-09 18:59:41 +01:00
Marrub
adeb8fb65b Fix return value of native BuiltinCallLineSpecial 2019-01-09 18:10:42 +01:00
Christoph Oelckers
cf967b36ff Merge branch 'master' of https://github.com/coelckers/gzdoom 2019-01-09 16:51:43 +01:00
alexey.lysiuk
32cf79c519 - fixed crash with Line_SetPortal special
https://forum.zdoom.org/viewtopic.php?t=63191
2019-01-09 11:41:22 +02:00
alexey.lysiuk
a173021c75 - fixed crash on loading linedefs 2019-01-09 10:55:12 +02:00
alexey.lysiuk
cb4548a160 - fixed compilation error
src\p_tags.cpp(302): error C2143: syntax error: missing ')' before '}'
2019-01-09 10:01:08 +02:00
Christoph Oelckers
0180bcb178 Moved Strife conversation data into FLevelLocals. 2019-01-09 02:03:26 +01:00
Christoph Oelckers
0ed856fbd4 - moved the TIDHash array to FLevelLocals and adjusted the actor iterator code. 2019-01-09 01:42:25 +01:00
Christoph Oelckers
e70d708163 - forgot to delete the static tag manager. 2019-01-09 01:02:03 +01:00
Christoph Oelckers
520d73edf6 - 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.
2019-01-09 00:04:28 +01:00