Commit Graph

173 Commits

Author SHA1 Message Date
Christoph Oelckers f5421491ec - wrapped the entire DSBarInfo class in a container and completely decoupled it from DBaseStatusBar.
The idea is, when status bars are moved to ZScript that only this small wrapper class needs to be dealt with and the implementation can be left alone. SBARINFO is far too complex to be scriptified, but having it inherit directly from DBaseStatusBar and access its member variables severely limits the options of dealing with the status bar code. This way, it only accesses some globally visible functions in DBaseStatusBar and no variables.

- renamed the global ST_X and ST_Y variables because it is far too confusing and error-prone to have the same names inside and outside DBaseStatusBar.
2017-01-20 11:11:22 +01:00
Christoph Oelckers 2fcffd1fc1 - removed the remaining native parts of ABasicArmor.
- simplified some FindInventory calls using PClass::FindActor to call the variant taking a name directly.
2017-01-18 22:57:47 +01:00
Christoph Oelckers d8acf774a6 - scriptified the remains of AKey.
- replaced Key.KeyNumber with special1. This is only for internal bookkeeping purposes so there's really no need to complicate this with a new variable when this one works just as well.
2017-01-18 15:17:12 +01:00
Christoph Oelckers cfdd580044 - deleted a_artifacts files. 2017-01-18 10:44:51 +01:00
Christoph Oelckers d338ca3ec1 - scriptified the sector actions. 2017-01-13 13:51:47 +01:00
Christoph Oelckers 12037fdc95 - made the vertexes array VM friendly. 2017-01-09 00:46:16 +01:00
Christoph Oelckers cd7986b1b1 - refactored global sides array to be more VM friendly.
- moved FLevelLocals to its own header to resolve some circular include conflicts.
2017-01-08 18:46:17 +01:00
Christoph Oelckers 71d1138376 - refactored the global lines array into a more VM friendly form, moved it to FLevelLocals and exported it to ZScript.
- disabled the Build map loader after finding out that it has been completely broken and nonfunctional for a long time. Since this has no real value it will probably removed entirely in an upcoming commit.
2017-01-08 14:39:16 +01:00
Christoph Oelckers c02281a439 - refactored the global sectors array into a more VM friendly type and moved it into FLevelLocals. 2017-01-07 19:32:24 +01:00
Christoph Oelckers 267b1842b4 - scriptified a few more of the simpler powerups. 2016-12-31 01:08:09 +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
Christoph Oelckers a13e23dbe6 - scriptified some trivial stuff from g_shared. 2016-11-29 19:50:34 +01:00
Marisa Heit 55ee78fc0b Add bottomclip parameter to FillSimplePoly() for the software implementation
- Polygons will be clipped to bottomclip. If this is zero or below, they
  will be clipped to the bottom of the screen instead. This keeps the
  polygons from overwriting the status bar border for sofware 2D. The
  hardware version ignores it, since it always draws the status bar border
  every frame.
2016-11-05 22:49:33 -05: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 fd7b833ad5 - added some helper code mainly designed to help GZDoom maintain the vertex buffer for the textured automap. 2016-08-06 19:20:41 +02:00
Christoph Oelckers 78055733c8 - fixed: automap markers were scaled too small 2016-05-18 21:25:58 +02:00
Christoph Oelckers 2447f7bc38 - renamed FTransform access functions. 2016-04-23 13:40:02 +02:00
Christoph Oelckers bc2a5b3f16 - fixed typo in automap background position calculation. 2016-04-17 10:19:56 +02:00
Christoph Oelckers 1eeaee1ac7 - completely reviewed and fixed all codes using angles in the automap. 2016-04-07 13:05:29 +02:00
Christoph Oelckers 14b370df66 - fixed automap rotation to point upward, not downward when am_rotate is on. 2016-04-07 10:39:15 +02:00
Christoph Oelckers b93d4a796a - fixed angles for am_rotate. 2016-04-06 17:28:31 +02:00
Christoph Oelckers 9b5a4b6d43 - removed several unused setter functions for level data structures and fixed some incorrect uses. 2016-04-02 22:05:23 +02:00
Christoph Oelckers 931774ab38 - fixed some issues with the PathTraverse and sight checking code:
* typo in calculating end position from a trace vector
 * must use floor to convert from floating point block coordinate to block index to account for running off the negative side of the blockmap. (Int cast always rounds toward zero which is wrong here.)
 * bad calculation of sight checking slopes - they has the actor's z coordinate duplicated.

- fixed scaling of automap markers.
2016-04-02 20:10:48 +02:00
Christoph Oelckers 8680391e0b - floatified the global view variables.
The software renderer still uses internal copies of the fixed point version.
2016-04-01 12:22:16 +02:00
Christoph Oelckers 8fd76f0c8a - floatified bmaporgx and bmaporgy, allowing to remove the gross overflow prevention hacks present in the blockmap code. 2016-03-31 09:23:14 +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
Christoph Oelckers 66929cbaff - floatified p_trace, p_slopes and p_udmf.cpp.
- major cleanup of unused code.
2016-03-30 16:30:22 +02:00
Christoph Oelckers 35bb686281 - floatification of sector_t::centerspot. 2016-03-26 09:38:58 +01:00
Christoph Oelckers e42b0171b3 - floatification of bot code. 2016-03-26 00:34:56 +01:00
Christoph Oelckers 8e13d13916 - floatified the automap. 2016-03-25 21:54:59 +01:00
Christoph Oelckers fb8e03d5eb - floatified FLineOpening.
- some smaller fixes.
2016-03-25 18:43:37 +01:00
Christoph Oelckers 1125101b37 - floatified AActor::Prev plus the stuff using it.
- rewrote some coordinate functions in AActor to use real float math instead of converting back and forth between float and fixed.
2016-03-25 16:25:25 +01:00
Christoph Oelckers 8b6b5e7b1c - preparation for upcoming work: rename the fixed point versions of PosRelative. 2016-03-25 14:18:50 +01:00
Christoph Oelckers 41387622f2 - changed angle parameter of FillSimplePoly. 2016-03-24 16:36:43 +01:00
Christoph Oelckers 4a79602325 - floatification of g_shared.
- rewrote FraggleScript's movecamera function because it was utterly incomprehensible.
2016-03-24 01:46:11 +01:00
Christoph Oelckers 6b3c0ecbd3 - floatified viewheight variables and some related code. 2016-03-22 18:06:08 +01:00
Christoph Oelckers 4e60ea0252 - made AActor::alpha a floating point value
- replaced some uses of FRACUNIT with OPAQUE when it was about translucency.
- simplified some overly complicated translucency multiplications in the SBARINFO code.
2016-03-21 12:18:46 +01:00
Christoph Oelckers 0bdb65c477 - made AActor::radius a double.
This means that all files in g_doom are now fully converted.
2016-03-20 15:04:13 +01:00
Christoph Oelckers ada5097e34 - converted scale variables in AActor, FMapThing and skin to float. 2016-03-20 12:13:00 +01:00
Christoph Oelckers 51b05d331d - replaced AActor::vel and player_t::Vel with a floating point version.
- Converted P_MovePlayer and all associated variables to floating point because this wasn't working well with a mixture between float and fixed.

Like the angle commit this has just been patched up to compile, the bulk of work is yet to be done.
2016-03-20 00:54:18 +01:00
Christoph Oelckers 671291227e - first stage of converting actor angles to float complete
Patched up everything so that it compiles without errors again. This only addresses code related to some compile error. A large portion of the angle code still uses angle_t and converts back and forth.
2016-03-16 12:41:26 +01:00
Christoph Oelckers 51ab60178a - added portal overlays to automap. 2016-03-13 12:33:58 +01:00
Randy Heit 55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
alexey.lysiuk 3c044ebd5e Removed usage of register keyword
No more 'register storage class specifier is deprecated' warnings
2016-02-27 15:03:44 +02:00
Christoph Oelckers 58d3b04590 - fixed some places in p_pillar.cpp where sector plane z's were calculated at (0, 0) which could cause overflows if the actual plane is too far away from the origin.
- renamed sector_t::soundorg in centerspot, changed the type to a fixedvec2 and removed the CenterSpot #define.

Since this thing was used in lots of places that have nothing to do with sound the name made no sense. Having it as a fixed_t array also made it clumsy to use and the CenterSpot #define used a potentially dangerous type cast.
2016-02-24 14:49:59 +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 158caf78a0 - more float to double conversion.
In particular this removes all assignments of FIXED2FLOAT to double variables because they not only lose precision but also generate unnecessary code.
2016-02-11 21:33:30 +01:00
Christoph Oelckers 7b5a77a8d8 - added various action specials and parameter extensions defined by Eternity Engine.
The reason for defining them is to be able to fill out the Eternity translation table for GZDoom's Extradata parser.
Most of the new specials are mere specializations of ZDoom's Generic_* functions and occupy positions above 255 to avoid filling up the last remaining free slots available for Hexen format maps.
Allowing action specials greater than 255 required a few changes:
 * all access to action specials is now through a small set of access functions.
 * Two new PCodes were added to ACC to handle these new specials from scripts.
 * a minor change to the network protocol, so netgame  and demo version numbers were bumped.
 * FS_Execute is now properly defined in p_lnspec.cpp.
Two of the newly added specials - generalizations of the special 'close Door in 30 seconds' and 'raise door in 5 minutes' sector types, will also be available to Hexen format maps. The rest are limited to use in ACS, UDMF and DECORATE.
This also adds 'change' and 'crush' parameters to most Floor_* and Ceiling_* specials, again to match Eternity's feature set.
2016-01-25 18:49:56 +01:00
Christoph Oelckers 3e446ea04d - replaced access to AActor's coordinate members with access functions
(first 200 compile errors down...)
2016-01-17 13:48:16 +01:00