Commit Graph

340 Commits

Author SHA1 Message Date
raa-eruanna 1560ed07af Added a hack that allows maps using fogmap to display properly in the true-color renderer. Unfortunately, this could be implemented better but at least for now it's here. 2016-09-29 20:00:00 -04:00
raa-eruanna 1c25ad7ce4 Merge http://github.com/rheit/zdoom 2016-09-24 23:36:51 -04:00
Christoph Oelckers 6a6a0e8017 - removed some more hubtravel related player start fudging.
* do not skip the player_t init when travelling in a hub. The old player may still be needed in some edge cases. This applies only to singleplayer for now. The multiplayer version still needs reviewing. I left it alone because it may shuffle players around which is not wanted when doing hub travelling.
 * do not spawn two temp players in G_FinishTravel. Instead handle the case where no player_t::mo can be found gracefully by adding a few nullptr checks. This temp player served no real purpose except for having a valid pointer. The actual start position was retrieved from somewhere else.
2016-09-25 01:28:27 +02:00
Magnus Norddahl 5ef46d1730 Merge remote-tracking branch 'gzdoom/master' into qzdoom 2016-09-24 09:37:18 +02:00
Christoph Oelckers 86e9282193 - removed the sequential processing of JSON objects because the benefit is too small.
After testing with a savegame on ZDCMP2 which is probably the largest map in existence, timing both methods resulted in a speed difference of less than 40 ms (70 vs 110 ms for reading all sectory, linedefs, sidedefs and objects).
This compares to an overall restoration time, including reloading the level, precaching all textures and setting everything up, of approx. 1.2 s, meaning an increase of 3% of the entire reloading time.
That's simply not worth all the negative side effects that may happen with a method that highly depends on proper code construction.
On the other hand, using random access means that a savegame version change is only needed now when the semantics of a field change, but not if some get added or deleted.

- do not I_Error out in the serializer unless caused by a programming error.

It is better to let the serializer finish, collect all the errors and I_Error out when the game is known to be in a stable enough state to allow unwinding.
2016-09-23 14:04:05 +02:00
Christoph Oelckers c17da32dbd - added object deserialization. It seems to work, at least the stuff I sampled looked like it was properly reatored and it triggers no error condition.
- always make the top level object randomaccess when opening a JSON file for reading. Some things won't work right if this is opened for sequential access.
2016-09-23 00:45:41 +02:00
Christoph Oelckers f52e2a8cc4 - removed bogus BeginObject call in deferred script serializer. 2016-09-22 12:36:29 +02:00
Christoph Oelckers 68dc75bf9e - fixed: array clamping may only be done when reading a savegame.
- fixed generation of savegame names for level snapshots.
2016-09-22 11:51:29 +02:00
raa-eruanna 2a9e97688d Merge http://github.com/coelckers/gzdoom 2016-09-22 05:23:02 -04:00
Christoph Oelckers f0e8e860f1 Merge branch 'master' into json 2016-09-22 09:09:48 +02:00
Christoph Oelckers 1e6b99cebd Merge branch 'master' of https://github.com/rheit/zdoom 2016-09-22 09:06:34 +02:00
nashmuhandes a49e15c541 Added REOPEN script type. These scripts behave just like OPEN scripts, except they will re-execute themselves every time the level is re-entered (ie as part of a hub). 2016-09-22 08:57:22 +02:00
Christoph Oelckers 5dfc396bb9 - read snapshots from zip. 2016-09-22 01:28:05 +02:00
Christoph Oelckers f93e4813d1 - removed farchive.cpp and .h 2016-09-22 00:48:22 +02:00
Christoph Oelckers 1c9dbc3c36 - converted the basic savegame loader so that all remnant of FArchive have been removed now. 2016-09-22 00:18:31 +02:00
Christoph Oelckers 88c27e2cc0 - allow the compact and pretty writers for JSON to coexist by wrapping the whole stuff into another class that calls the proper one as needed. Due to the implementation it is not possible to decide at run time how this should behave so there have to be two different objects for either mode.
- savegame code handles new format.
2016-09-21 21:57:24 +02:00
Christoph Oelckers ac3c00883d - implemented saving of new format savegames as zips. The code for that was adapted from zipdir.c. 2016-09-21 17:37:56 +02:00
Christoph Oelckers 810ef8f775 - save global savegame data to JSON as well.
This is incomplete and untested, just a safety commit before going on.
2016-09-21 12:19:13 +02:00
Christoph Oelckers 075e98c967 - use FCompressedBuffer to store level snapshots. FCompressedMemFile has been removed. 2016-09-21 01:48:23 +02:00
Christoph Oelckers daf43f9d35 - added polyobject serializer.
- added sanity checks to prevent a savegame from being loaded with an incompatible map
- refactored a few things to simplify serialization.
- started work on main level serializer function.
2016-09-20 09:11:13 +02:00
Christoph Oelckers c665cc53f9 - moved new code to its proper location and started moving the replaced old archive code to a placeholder file for easy removal later. 2016-09-19 10:34:54 +02:00
Christoph Oelckers 9313a99e12 - started implementing a JSON based serializer. Unfortunately it is far too slow to be of any real use. 2016-09-18 13:26:34 +02:00
raa-eruanna dede94b7e2 Merge branch 'master' of https://github.com/coelckers/gzdoom
# Conflicts:
#	src/posix/cocoa/i_video.mm
#	src/win32/hardware.cpp
#	wadsrc/static/menudef.txt
2016-09-08 03:26:11 -04:00
raa-eruanna 32f758de41 Merge branch 'truecolor' of https://github.com/dpjudas/zdoom
# Conflicts:
#	src/v_video.cpp
2016-09-08 03:19:08 -04:00
Christoph Oelckers 58bc64ee8f Merge branch 'master' of https://github.com/rheit/zdoom 2016-08-26 02:20:53 +02:00
Christoph Oelckers 465792df0a - make sure that after travelling has finished, no travelling thinkers are left in the list.
Since this list is excluded from regular thinker cleaning, anything that may survive through the end of G_FinishTravel will endlessly multiply and severely break the following savegames or just simply crash on broken pointers.
2016-08-26 02:16:06 +02:00
Christoph Oelckers 4a822a8f50 Merge branch 'master' of c:\programming\doom-dev\zdoom into Branch_97ff4cc02574e3773ff231b1d74c0fdb25e9440d 2016-08-25 22:02:23 +02:00
Christoph Oelckers 9ca6764556 Revert "- removed STAT_INVENTORY."
This reverts commit 5ff0abe568.

- use STAT_INVENTORY only for held items.

Seems this was causing some strange issues with hubs, but for items placed in the world it still cannot be allowed to have them in a different statnum.
2016-08-25 21:41:17 +02:00
Christoph Oelckers 5c267a2169 Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts:
#	wadsrc/static/language.eng
2016-08-21 08:42:06 +02:00
Christoph Oelckers 5ff0abe568 - removed STAT_INVENTORY.
This was causing issues with sprite sorting. For this to work as intended, all actors in the world that display sprites need to remain in spawn order, including inventory items.
The only thing this statnum was used for were some bot related search actions which are simply not worth breaking actual maps for some very minor performance gain.
2016-08-20 19:10:14 +02:00
Magnus Norddahl b322043724 Merge remote-tracking branch 'upstream/master' into truecolor 2016-06-19 23:13:16 +02:00
Christoph Oelckers b7d13c0711 Merge branch 'master' of https://github.com/rheit/zdoom 2016-06-17 16:18:24 +02:00
Christoph Oelckers 05fabbe294 - fixed: G_InitNew may only clear the hub statistics when it is not called during loading of a savegame. 2016-06-17 16:14:58 +02:00
Magnus Norddahl 9420826094 Merge remote-tracking branch 'upstream/master' 2016-06-10 16:59:20 +02:00
Magnus Norddahl 0c8c9e0aea Added FDynamicColormap support to true color mode 2016-06-05 14:08:03 +02:00
Christoph Oelckers 18ebe92cfc Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts:
#	src/g_level.cpp
2016-06-01 11:45:57 +02:00
Christoph Oelckers 26a15d0ccc - delete thinkers before starting to restore the savegame data to avoid interference of the old thinkers' Destroy() method with the newly loaded data.
Note that even with this change it is still not possible to unarchive any thinker pointers before the thinker list has been loaded as it would create broken lists.
2016-06-01 11:43:56 +02:00
Christoph Oelckers 9c6e7753d8 Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts:
#	src/p_spec.cpp
#	src/r_bsp.cpp
#	src/r_defs.h
2016-04-20 19:56:07 +02:00
Christoph Oelckers e5dc92f998 - some reshuffling of save data so that the actors won't get restored before the sectors.
Note that this required splitting P_SerializeWorld, because sector_t and FSectorPortal contain some actor pointers, for which the same rule applies: Portal linking can only be done after all sectors have been read, meaning it cannot be done along with the rest of the data in these structures.

Obviously such a change breaks savegame compatibility so the min. savegame version had to be increased again.
2016-04-20 19:42:00 +02:00
Christoph Oelckers 082042818b - refactored sector portal data so that it does not rely on actors.
This is necessary because otherwise the level data cannot be serialized before the actors.
2016-04-20 19:20:11 +02:00
Christoph Oelckers 990f5a79b4 Merge branch 'master' of https://github.com/rheit/zdoom 2016-04-18 15:29:45 +02:00
Christoph Oelckers 2327107f32 - fixed: Actors cannot be linked into the world until after all actors and sectors have been deserialized.
Two issues:

Portal linking requires all skyboxes in the sectors to be present, without them some info is not there when needed.
UpdateWaterLevel was called in AActor::Serialize, which operated on the freshly loaded level where lots of things haven't been set up yet and plane heights may be wrong.
2016-04-18 15:27:19 +02:00
Christoph Oelckers 447ce0abe7 Merge branch 'floatcvt' of https://github.com/rheit/zdoom into floatcvt
# Conflicts:
#	src/p_saveg.cpp
#	src/r_defs.h
2016-04-03 22:16:06 +02:00
Christoph Oelckers 3ee42f6aa6 - removed all savegame compatibility handling, since the data is just too different from what it was before to try to convert it. 2016-04-03 20:55:23 +02:00
Christoph Oelckers ae14268989 Merge branch 'floatcvt' of https://github.com/rheit/zdoom into floatcvt
# Conflicts:
#	src/r_utility.cpp
2016-03-29 10:09:03 +02:00
Christoph Oelckers 0a238e7e18 Merge branch 'master' into floatcvt 2016-03-28 22:53:26 +02:00
Christoph Oelckers a92de84cf7 - this stuff should not have been saved... 2016-03-28 22:53:10 +02:00
Christoph Oelckers d87f861e87 Merge branch 'master' into floatcvt
# Conflicts:
#	src/p_spec.cpp
#	src/p_spec.h
2016-03-28 22:23:41 +02:00
Christoph Oelckers 263051a77b - removed a few unnecessary #includes. 2016-03-28 22:20:25 +02:00
Christoph Oelckers a46a4c81b1 Merge branch 'master' into floatcvt
# Conflicts:
#	src/p_lnspec.cpp
#	src/p_spec.cpp
#	src/p_spec.h
2016-03-28 17:46:19 +02:00