Commit Graph

115 Commits

Author SHA1 Message Date
Christoph Oelckers cf1e6d5275 - converted FBehavior::StaticSerializeModuleStates.
- removed some code which is no longer needed.
2016-09-20 11:35:25 +02:00
Christoph Oelckers af6404f763 - all DObjects converted.
- cleaned out some old cruft that's no longer needed.
2016-09-20 10:27:53 +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 ab43e0c8cb - all thinker serializers done. 2016-09-20 00:41:22 +02:00
Christoph Oelckers d24aa5dec9 - reformatting for easier search. 2016-09-19 10:47:59 +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
Edoardo Prezioso 574f2936d4 - Fixed GCC/Clang compiler errors and warnings. 2016-06-17 10:19:03 +02:00
Christoph Oelckers 7ccdbf9b62 Merge branch 'PSprites' 2016-06-16 16:16:16 +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 36dfa97802 - fixed: Polyobjects did not save their specialdata pointer.
- fixed: DMovePoly did not save its m_Speedv member.

# Conflicts:
#	src/version.h
2016-05-22 01:27:05 +02:00
Christoph Oelckers f184438032 - fixed: Polyobjects did not save their specialdata pointer.
- fixed: DMovePoly did not save its m_Speedv member.
2016-05-22 01:26:13 +02:00
Leonard2 1966b61b8f Generalized the psprites implementation 2016-05-20 17:04:44 +02:00
Christoph Oelckers 4a72c7d2f1 - fixed: Decals may not be serialized before thinkers.
Since decals may have thinkers attached this will crash when such a savegame gets loaded, because the thinker lists get reset in P_SerializeThinkers, deleting any thinker that already was processed.
I also added an error message that immediately aborts the save process if such an out-of-sequence thinker is attempted to be written out.
This obviously breaks savegame compatibility again...
2016-04-29 11:44:17 +02:00
Christoph Oelckers 0f99d7d73f - floatified the few remaining linedef and sector properties that still were fixed_t. The only fixed point things left in r_defs.h are the nodes and a fixed point setter function for vertex_t, which is still needed by the node builder. 2016-04-24 12:15:09 +02:00
Christoph Oelckers 04e614daec - removed some fixed point functions that are no longer needed.
- fixed: Visplane checks should only compare the plane flags that are relevant for rendering and mask out the rest.
- floatified FTransform and made the visplane checks a bit less verbose by moving the comparison as an operator into FTransform.

Note that this operator needs forceinline on Visual Studio so that it won't get called as a function.
2016-04-23 12:42:07 +02:00
Christoph Oelckers 4d4f31fd83 - floatified sidedef texture info and fixed two bugs involving this data. 2016-04-23 09:41:59 +02:00
Christoph Oelckers 3c7d0c971f - fixed: It seems it is not allowed to serialize any thinker before the actual thinker chain is serialized. This means that sector_t::floordata, ceilingdata and lightdata's handling had to be moved to P_SerializeWorldActors. 2016-04-22 17:48:25 +02:00
Christoph Oelckers c3eec6db4d -fixed warnings 2016-04-21 10:38:42 +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 3ed7a25d61 - added polyportal offset updates.
- removed the nodebuilder message for splitting polyobject subsectors because it is no longer relevant.
2016-04-17 17:10:11 +02:00
Christoph Oelckers a199fe1825 - fixed: loading polyobjects from a savegame was incomplete. 2016-04-17 12:04:32 +02:00
Christoph Oelckers 6a27267500 - changed handling of one-time, one-way door polyobjects to be more efficient.
The old code kept the dead thinker, resulting in constant deletion and recreation of the subsector links and PolyBSP because the interpolation kept running.
Changed it so that the thinker is destroyed and the polyobject gets blocked by setting a new flag.
2016-04-17 01:24:07 +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 7a2c8fdc1c - floatified po_man.cpp and the remaining bits in p_lnspec.cpp 2016-03-31 00:41:21 +02:00
Randy Heit 55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Christoph Oelckers 02d7572343 - some header dependency cleanup so that it is no longer needed to include portal.h to get the inline functions. Portal.h has been reduced of most dependencies now so that including it is cheap and can be done in other headers.
- some consolidation in p_map.cpp. PIT_CheckLine and PIT_FindFloorCeiling had quite a bit of redundancy which has been merged.
- Ĩontinued work on FMultiBlockLinesIterator. It's still not completely finished.
2016-02-19 14:08:41 +01:00
Christoph Oelckers 6adb069506 - rewrote p_local.h so that it doesn't pull in the entire bunch of headers.
This was to resolve some circular dependencies with the portal code.
The most notable changees:

 * FTextureID was moved from textures.h to doomtype.h because it is frequently needed in files that don't want to do anything with actual textures.
 * split off the parts from p_maputl into a separate header.
 * consolidated all blockmap related data into p_blockmap.h
 * split off the polyobject parts into po_man.h
2016-02-15 02:14:34 +01:00
Christoph Oelckers 405db83393 - added a function which collects all portal group an actor would touch if standing in a given position. 2016-02-15 00:53:59 +01:00
Christoph Oelckers c940c2ba81 - fixed: The counters for the whirlwind were initialized too late, the first time they are needed is in P_CheckMissileSpawn, which gets called from inside P_SpawnMissile. Also took the opportunity and moved them to properties that are accessible from DECORATE. 2016-02-08 13:34:54 +01:00
Christoph Oelckers 43b4d452db Merge branch 'ChaseThresholdScript' of https://github.com/MajorCooke/zdoom
# Conflicts:
#	src/version.h
2016-02-08 13:06:08 +01:00
Christoph Oelckers 94b7ef72ca - more cleanup on portal implementation:
- store portal data in a separate structure.
- store portal data in savegames because some of this will be changeable later.
- run a cleanup pass after all portals have been created to weed out broken ones.
- add a definition type that's compatible with Eternity Engine's line portal types.
- swapped arg[2] and arg[3] of Line_SetPortal, because the type is more significant than the alignment.
2016-02-05 23:15:56 +01:00
Christoph Oelckers 724e625f16 - fixed: Loading an old savegame from before the sector damage refactoring cleared the extended Boom sector flags before processing them. 2016-01-28 09:20:27 +01:00
Christoph Oelckers 37f18055af - turned sector_t::FloorSkyBox and CeilingSkyBox into an array.
- removed unused SpreadCeilingPortal function.
2016-01-12 21:34:41 +01:00
Christoph Oelckers 23cfd29dbb - let's save the terrain properties as names so that they survive a change in the definition files. 2016-01-09 12:28:42 +01:00
Christoph Oelckers 71c7f2b42c - added 'floorterrain' and 'ceilingterrain' sector properties for UDMF. These will take precedence over texture based terrain if used.
'ceilingterrain' is needed because the top of 3D-floors refers to the model sector's ceiling, so in order to give a 3D floor a terrain it must be assignable to the sector's ceiling.
Note that although it is basically the same property, its actual function bears no relevance to its use in Eternity.
2016-01-09 12:10:36 +01:00
Christoph Oelckers bd8513c063 - made sector_t::damageamount an int so that it can hold TELEFRAG_DAMAGE.
- marked all places where sector_t::special needs to be addressed for the damage overhaul.

NOTE: This commit will not compile!
2016-01-06 12:56:35 +01:00
Christoph Oelckers 1ee441412a - add savegame compatibility handling for damage related changes: When loading an old savegame the sector specials must be reinitialized to set the damage properties. 2016-01-06 12:31:27 +01:00
Christoph Oelckers d34077a3ba - ... and finally the push flag. 2016-01-06 02:05:39 +01:00
Christoph Oelckers 3ffcec3eb3 - moved friction flag from special to Flags as well. 2016-01-06 02:01:59 +01:00
Christoph Oelckers 6a63effa1f - fixed: A_CheckTerrain did not use the proper damage type for processing an instant death sector.
- moved sector secret information from sector_t::special and secretsector to two flag bits in sector_t::Flags.

This is to get rid of the bit masking madness in the floor/ceiling thinkers which need to preserve this bit when they change a sector's type.
2016-01-06 01:50:45 +01:00
Christoph Oelckers 3e13e772ef - after realizing that changing the sector's MOD variable to an FNameNoInit doesn't do anything bad, I just went ahead and got rid of the last place in the engine that still used this data type for internal storage. 2016-01-05 16:10:04 +01:00
Christoph Oelckers d432df55e9 - changed Sector_SetDamage so that it can explicitly set the damage interval and the leakiness probability, instead of hardcoding it to fixed damage ranges.
- fixed: FCajunMaster::IsDangerous did not check for Heretic's sludge type.
2016-01-05 15:39:21 +01:00
Christoph Oelckers b613db4ae5 Revert "Merge pull request #359 from Leonard2/master"
This reverts commit 364ca11b43, reversing
changes made to dae0e217d1.

Conflicts:
	src/r_data/r_interpolate.cpp
2015-09-18 17:41:16 +02:00
Leonard 86e9504d04 Added weapon interpolation. 2015-08-19 15:59:54 +02:00
Christoph Oelckers db61c1cb57 - allow multiple line IDs as well using the same method as for sector tags. 2015-04-19 17:51:34 +02:00
Christoph Oelckers b921157f57 - uncouple sector tag storage from the sector data to allow multiple tags per sector.
Tags are now handled by a tag manager class which stores sector/tag pairs. This way multiple entries can be added per sector.
Since UDMF does not have any arrays the additional tags are stored as a space separated string as 'MoreIDs'.
2015-04-19 12:33:27 +02:00
Christoph Oelckers 1a39ac9243 - forgot to save this before committing... 2014-12-25 19:56:38 +01:00
Christoph Oelckers 6fd70ff320 - fixed: Trying to rotate a polyobject into its actual position during loading of a savegame still inflicted damage on all touching actors - including incomplete player pawns - and also got blocked by them.
Similar code already existed for the MovePolyobj function but apparently was overlooked here.
2014-12-25 18:46:50 +01:00