Commit Graph

6842 Commits

Author SHA1 Message Date
Christoph Oelckers a7fd04a235 Merge branch 'master' of https://github.com/kcat/zdoom 2016-05-18 11:48:27 +02:00
MajorCooke 115dbd0b58 - Added A_WeaponOffset(x = 0, y = 32, flags).
- Places the weapon offset by the defined x and y. Both are floats. This stacks with weapon bobbing.
- WOF_KEEPX: Don't change the X offset.
- WOF_KEEPY: Don't change the Y offset.
- WOF_ADD: Add onto instead of replacing the coordinates.
2016-05-18 11:19:24 +02:00
Christoph Oelckers 661c2e5919 - added missing NULL pointer check to ACS's CheckInventory. 2016-05-18 09:39:19 +02:00
Chris Robinson fe966916d7 Set head-relative for sources near the listener
This matches the behavior of the FMOD backend
2016-05-16 17:02:39 -07:00
Christoph Oelckers 9e847c252b - fixed: When linking an actor into the blockmap multiple portal groups, AActor::LinkToWorld would delete the links to the previous nodes for each new group. This was causing random crashes when the affected actor was deleted by the garbage collector. 2016-05-15 23:24:30 +02:00
Christoph Oelckers aff8b00575 - added NULL pointer checks to SpecialDropAction methods that call CheckLocalView. 2016-05-15 09:16:37 +02:00
Christoph Oelckers 6949afc334 - fixed: For allowing an unblocking move, PIT_CheckThing used the wrong actor's position. This was causing monster pile-ups with moving ceilings.
- don't let P_PushUp move any actors with the same z as the pushing actor. This should solve most monster pile-ups, but the entire logic here needs some serious rethinking. The only reason this doesn't cause more problems is some fudging in several other places.
2016-05-14 15:05:06 +02:00
Christoph Oelckers ebca170e73 - fixed a few warnings in OpenAL code. 2016-05-13 10:07:18 +02:00
Christoph Oelckers cd8213f067 - fixed: The skybox pointer in FSectorPortal must at least be initialized to nullptr when the struct is deserialized, to avoid an access violation if the partially initialized data is used. This can happen when P_SerializeThinkers destroys the original thinkers that were created on map load.
- removed the sector loop for deleting skybox references in ASkyViewpoint::Destroy. Since this only refers to the sectorPortals array it is completely redundant as the following code will clear them just as well.
2016-05-13 10:07:01 +02:00
MajorCooke 4998d4a84d Use the direct pointer of P_PointInSector instead. 2016-05-12 22:15:06 +02:00
MajorCooke 2ba26693d1 - Added 3D Floor + Portal awareness, along with flags to turn off detection of both features. 2016-05-12 22:15:06 +02:00
MajorCooke b91ed5dc5d Added GetZAt DECORATE function.
- float GetZAt(x, y, angle, flags, pick_pointer);
- Gets the floor z  at x distance ahead and y distance to the side in relative form from the calling actor pointer. Flags are as follows (GZF_ prefix):
- CEILING: Returns the ceiling z instead of floor.
- ABSOLUTEPOS: x and y are absolute positions.
- ABSOLUTEANG: angle parameter does not add the pointer's angle to the angle parameter.
2016-05-12 22:15:05 +02:00
MajorCooke 39f64383cb Changed RTF_THRUSTZ to match RADF_THRUSTZ's bitmap. 2016-05-11 19:41:33 +02:00
MajorCooke 952219a018 Added RTF_THRUSTZ for A_RadiusThrust.
- Allows thrusting with Z velocity.
2016-05-11 19:41:33 +02:00
Christoph Oelckers 852ed6cd04 - un-revert P_CheckMove fix. 2016-05-11 19:39:08 +02:00
Edoardo Prezioso 769521b2e1 - Fixed second player lock after error in netgame. 2016-05-11 14:05:29 +02:00
Christoph Oelckers 078e27e61f - fixed: The mugshot's angle was inverted. 2016-05-11 14:04:21 +02:00
Christoph Oelckers d4b258f15b - don't place the chasecam right at the hit position of the trace. This will be the intersection with a wall or sector plane and may cause clipping issues. Instead place it very slightly in front of the actual hit position. 2016-05-11 13:57:49 +02:00
MajorCooke 9ab620814d - Fixed: Armor absorption did not take ALLOW/CAUSEPAIN flags into account. 2016-05-11 13:33:39 +02:00
Christoph Oelckers 0726a88ab9 - only return DWORD aligned addresses in openings because the 3D floor code stores floating point values in there which cannot be accessed on platforms with strict alignment rules. 2016-05-11 12:04:41 +02:00
Christoph Oelckers 220255e6a4 - fixed P_CheckMove's dropoff check and removed some unneeded code. 2016-05-11 11:56:03 +02:00
Christoph Oelckers 43d93a19a0 - fixed: P_AlignFlat had the 'dist' value negated. Also simplified the code a bit. 2016-05-11 11:36:53 +02:00
Christoph Oelckers f8c12f4533 - fixed warning in s_sound.cpp 2016-05-11 10:32:57 +02:00
Christoph Oelckers cc88130362 - fixed: P_CheckMove's dropoff check had the heights swapped. This also shouldn't in any way depend on COMPATF_DROPOFF and must be skipped entirely for actors with either MF_FLOAT or MF_DROPOFF set. 2016-05-11 10:09:13 +02:00
Christoph Oelckers 77e30bb7d7 - fixed: The line portal links were not deleted when an actor was destroyed. 2016-05-11 09:58:03 +02:00
Christoph Oelckers 966e6797e4 - fixed: The view path for checking whether the player sprite should be drawn during a portal transition was never set properly in the portal transitioning case. 2016-05-09 23:16:06 +02:00
Christoph Oelckers 2e4b8dd416 - fixed incorrect sign in P_TranslatePortalVXVY 2016-05-09 21:59:13 +02:00
Christoph Oelckers 841a5795ae - savegame version bump for a GZDoom exclusive change (to avoid synchronization problems in the future.) 2016-05-08 09:27:42 +02:00
Chris Robinson 8334189d66 Merge remote-tracking branch 'zdoom/master' 2016-05-05 12:55:16 -07:00
Chris Robinson ba1574e65a Don't define OpenAL redirect macros with the IDE's parser
At least with KDevelop4, macros like this interefere with contextual info by
causing it to show information about the macro itself (where it's defined and
what it defines to), rather than the function (parameters, comments, etc). It
also gets in the way of auto-completion.
2016-05-05 21:00:30 +02:00
Chris Robinson fa46965a71 Check for OpenAL device errors after pausing/resuming the device 2016-05-05 21:00:30 +02:00
Chris Robinson 0b7b78c5d2 Better handle channel configs when monoizing in LoadSound 2016-05-05 21:00:29 +02:00
Chris Robinson e298f8389b Avoid divide-by-0 when the area sound radius is less than the max distance 2016-05-05 21:00:29 +02:00
Chris Robinson 66c61a7c8b Set the appropriate start offset for non-3D sounds too 2016-05-05 21:00:28 +02:00
Chris Robinson 26a8a8a1ba Pause OpenAL processing using ALC_SOFT_pause_device when inactive 2016-05-05 21:00:28 +02:00
Chris Robinson e1c8890c5e Set the appropriate start offset for restarted sounds 2016-05-05 21:00:27 +02:00
Chris Robinson c3cef91a4f Properly sum the channels being downmixed to mono 2016-05-05 21:00:27 +02:00
Chris Robinson 12c9281a7e Avoid redundantly setting DistanceScale 2016-05-05 21:00:26 +02:00
Chris Robinson bf5ac9b476 Use AL_EXT_SOURCE_RADIUS for area sounds 2016-05-05 21:00:26 +02:00
Chris Robinson 55294c5806 Use the correct OpenAL lib name on Linux 2016-05-05 21:00:25 +02:00
Edoardo Prezioso 52995f8fc2 - Fixed missing sector light clamp in DFlicker.
For some reason, this code didn't care about the sector light limits. Found by code inspection.
2016-05-05 21:00:08 +02:00
Christoph Oelckers c193bb7799 - removed the special case 0 in A_SpawnItem, meaning 'in front of the player'.
As it turned out this has been broken for many, many years, so one can assume that most content using this function depends on this special case not working. I could track it down to at least 2008.
2016-05-05 20:12:26 +02:00
Christoph Oelckers 0b833be06e - removed accidentally added GZDoom specials. 2016-05-04 14:37:52 +02:00
Christoph Oelckers 2c88816577 - fixed parameters for warp type 2. 2016-05-04 13:25:26 +02:00
Christoph Oelckers be3b126f7b - fixed: Order of skybox and portal initialization was not well defined. It was always the last item to get initialized that got set. Changed it so that skyboxes cannot override portals at all. 2016-05-03 19:42:53 +02:00
Christoph Oelckers a576243ff2 - fixed: ThrustThing should add to the velocity, not set it. 2016-05-03 10:26:29 +02:00
MajorCooke def785e462 Removed PITCHFLATSPRITE. FLATSPRITE now encompasses its behavior. 2016-05-02 06:32:33 -05:00
MajorCooke 0bf7c3e362 - Removed FlatAngle. This will come back hopefully in another commit sometime in the future. 2016-05-01 17:19:39 -05:00
Randy Heit 4fbe77fb82 Very minor optimization for ACS str(i)cmp
- If the two strings compared both point to the same location in memory,
  then we know they are the same string without having to bother actually
  comparing their contents. Note that the opposite is not neccessarily
  true: If they point to two different locations, they could still match a
  case-sensitive comparison because there are still two ACS string tables:
  the one that belongs to the map's script and the one that belongs to
  everything else.
2016-05-01 16:55:28 -05:00
MajorCooke f41dcc75d1 FlatAngle can now be defined directly via properties. 2016-05-01 16:33:00 -05:00
Christoph Oelckers 65e1589543 - allow specifying actor classes whose graphics to precache through MAPINFO.
- some reorganization of texture precaching so that the renderer can decide what to do with actors.

Just marking the sprite textures loses too much info if more is needed than just loading the images into memory.
2016-05-01 22:47:36 +02:00
Chris Robinson 0d402618a3 Load mono copies of multichannel sounds that are used in 3D 2016-05-01 21:44:03 +02:00
MajorCooke 3ed9551054 Fixed typo. 2016-05-01 14:33:22 -05:00
Christoph Oelckers b443ac8f71 - let Trace() be a bit smarter about checking 3D slopes. If one matches right up with the floor or ceiling at the line where the trace enters a sector, check a second point to see whether we deal with something inside valid sector bounds or not. 2016-05-01 19:30:51 +02:00
MajorCooke 9ba547e6e3 Revert MINSAVEVER and added FlatAngle DECORATE property expression. 2016-05-01 11:38:20 -05:00
Edoardo Prezioso 3aee8a3eee - Fixed a mistake in GiveInventory refactoring.
'give item' stopped working because commit 7b35f32f3d and 6aca7604eb didn't take account that give cheat with zero amount should not touch the item amount.
2016-05-01 17:07:39 +02:00
MajorCooke a8248433e9 - Updated <pitch>/flat/roll/wall sprites submission to 2.9+. (ZDoom compatibility submission. )
- FLATSPRITE: An actor becomes flat as if they were a decal on the floor.
- PITCHFLATSPRITE: A flat sprite tilts up and down based on pitch.
- WALLSPRITE: Similar to a Y billboarded sprite. The degree of the flattening is determined by the FlatAngle property.
- ROLLSPRITE: The sprite of the actor is affected by the Roll property.
2016-05-01 08:45:50 -05:00
Edoardo Prezioso a17ec55d0d - Fixed drop style gameinfo inconsistency.
The gameinfo option was ignored when deciding the initial spawn height position.
2016-05-01 11:30:09 +02:00
Randy Heit 7d03ed4dc7 Use floating point node bounding boxes 2016-04-30 22:37:02 -05:00
Randy Heit 265783e1f6 Use doubles for intermediates in the nodebuilder's FindMapBounds() 2016-04-30 21:28:41 -05:00
Christoph Oelckers f387199442 - extended the voxeldef parser to allow negative numbers where appropriate. 2016-04-30 14:33:15 +02:00
Christoph Oelckers 86b647ed41 - added map name display to IDMYPOS. 2016-04-30 13:03:08 +02:00
Christoph Oelckers 2161ad2c4b - fixed: P_GetMapColorForKey did not check for keys that worked as an alias defined through their species. 2016-04-30 12:48:51 +02:00
Christoph Oelckers c3759646e7 - merged FWarpTexture and FWarp2Texture, making the choice of effect a parameter of the WarpBuffer function.
Ideally the warping shouldn't be a property of the texture class itself but an effect processor that can get added to a texture. Unfortunately the current setup will not allow this, requiring some significant refactoring of texture access first.
2016-04-30 12:36:55 +02:00
Randy Heit a95c6b9644 Draw upper/lower textures on two-sided portal lines 2016-04-29 21:54:29 -05:00
Randy Heit 09730bff73 Fix incorrect texture mapping vectors for slopes 2016-04-29 20:35:55 -05:00
Christoph Oelckers 8309d8f634 - fixed coordinate typo. 2016-04-29 23:14:04 +02:00
MajorCooke b9687b4a57 Compiler fix 2016-04-29 06:33:38 -05: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
Randy Heit f3d273c94f Fixed: Tiled midtextures could go up past the ceiling when a 3D floor is in view 2016-04-28 22:06:57 -05:00
Randy Heit 8f3921190f Keep values in floats longer for visplane drawing 2016-04-28 21:21:49 -05:00
Randy Heit 96228ca15f Trying to fix some rounding, not sure it's actually correct yet 2016-04-28 21:14:48 -05:00
Christoph Oelckers 3bbb5c7237 - moved the texture warping into templated subfunctions, so that the same code can be used for true color buffers as well. 2016-04-28 18:17:18 +02:00
Christoph Oelckers af2a1769d8 - use the FP2005 method to calculate xtoviewangle, because it is far more straightforward than the old version. 2016-04-28 16:27:28 +02:00
Christoph Oelckers ef98757c7c - replaced finesine for texture warping with a smaller custom table, based on the old 2005 FP code, but fixes the generation of the sine table.
- removed all remnants of finesine and deleted tables.c and tables.h.
2016-04-28 15:59:37 +02:00
Christoph Oelckers 9f0c5d5909 -let's better be cautious about precision and use the CRT sin and cos functions for rotated plane textures. 2016-04-28 14:49:59 +02:00
Christoph Oelckers 027b8d29b8 - make FieldOfView a real angle and remove all uses of finetangent. 2016-04-28 13:59:06 +02:00
Christoph Oelckers f301cf7c57 - don't use finetangent for generating xviewtoangle. 2016-04-28 13:03:48 +02:00
Christoph Oelckers 26f54b0ba4 - eliminated tantoangle and cleaned up r_tables.h 2016-04-28 12:18:33 +02:00
Christoph Oelckers 8171637a57 - removed the last remaining uses of the finesine table from the rendering code. 2016-04-28 11:37:02 +02:00
Randy Heit ae7d048057 Store FTransform in visplane_t, not just a pointer
- The transform values passed to R_CheckPlane might live on the stack, so
  it's not safe to only store a pointer to them.
2016-04-27 23:07:25 -05:00
Randy Heit 44adff459a Remove halfviewwidth
- Why I thought I needed this variable in addition to centerx has
  long ago left my memory.
2016-04-27 22:49:36 -05:00
Randy Heit 31d842a894 Store FTransform in visplanes instead of converting to fixed_t 2016-04-27 22:17:33 -05:00
Randy Heit ac69ed3361 Minimal wallmost changes
- Add comments
- Fixed: When WallMost() finds a line entirely above the screen, it should
  set the most array to 0, not -1.
2016-04-27 22:17:33 -05:00
MajorCooke 6f11a65893 - Converted rollIntensity from int to double.
- It was already a double in the save version serialization so nothing had to be changed there.
2016-04-27 12:58:18 -05:00
MajorCooke 64d01a3bb1 Forgot to undo this. 2016-04-27 10:26:06 -05:00
MajorCooke 0fc7055f51 - Fixed: Quakes with rolling were not unique; they borrowed from any other quakes that didn't have rolling, thus preventing the rolling from falling off properly. 2016-04-27 10:13:30 -05:00
Christoph Oelckers 38d92b23b9 - fixed: ACS's GetSectorCeilingZ and GetSectorFloorZ expected integer coordinates. 2016-04-27 15:41:22 +02:00
Christoph Oelckers 3fd0d27efa - removed some leftover fixed point handling from PType. 2016-04-27 15:35:01 +02:00
Randy Heit a14c0c8063 Fix a couple missing structs in vissprite_t 2016-04-27 08:13:22 -05:00
Christoph Oelckers 3a17d6aa78 - fixed savegame compatibility. 2016-04-27 13:47:30 +02:00
MajorCooke 762d186657 Finished interpolation. 2016-04-27 13:42:16 +02:00
MajorCooke be9b25e760 Use ViewRoll instead of CamRoll, and removed CamRoll entirely. Begin work on interpolation. 2016-04-27 13:42:15 +02:00
MajorCooke c972caa9f3 - Added rollIntensity and rollWave to A_QuakeEx.
- Instead of moving the camera around, it rolls the camera.
- This only has an effect in GZDoom.
2016-04-27 13:42:15 +02:00
MajorCooke 660aff562d - Added support for THRU flags on bullets and rails.
- ALLOWTHRUFLAGS must be used on the puffs, added for the sake of compatibility with older mods. This applies to the following:
-- Bullets: THRUACTORS, THRUSPECIES
-- Rails: Same as bullets, but includes THRUGHOST.
2016-04-27 13:38:27 +02:00
Christoph Oelckers 262f3575ae - added a "custom" flag to drawmugshot so that the user-specified image can be forced to be used. 2016-04-27 13:16:35 +02:00
Christoph Oelckers ebca8cc5b0 - added a portable config file option, for now only on Windows: If the engine finds a file named [GAMENAME]_portable.ini, it will use that instead of creating a user specific version, so that portable installs can carry their INI along. 2016-04-27 13:04:37 +02:00
Christoph Oelckers 934b1923d0 - fixed: CheckForPushSpecial did not check blocking 3D midtextures. 2016-04-27 12:37:38 +02:00
Christoph Oelckers 044bf4ada6 - fixed: P_CheckPosition must initialized tm.floorterrain. 2016-04-27 12:08:22 +02:00
Christoph Oelckers f5afa30ee6 - added GetAngle(bool relative, int target) DECORATE function. 2016-04-27 11:52:52 +02:00
Randy Heit d970be48f9 Use floating point xscale in R_RenderFakeWall() 2016-04-26 23:30:16 -05:00
Randy Heit a029c7b664 Fix unneeded fixed_t height in R_3D_AddHeight() 2016-04-26 23:11:27 -05:00
Randy Heit ee43c4ff95 Fixed: Accidentally left in /65536.0 in WallMost() 2016-04-26 23:00:41 -05:00
Christoph Oelckers 8bda356412 - fixed crash in slope drawing: Several overlooked occurences of fixed point math in R_CalcTiltedLighting. Slopes are still completely broken, though. 2016-04-27 04:08:06 +02:00
Christoph Oelckers a26d81e060 - fixed incomplete float conversion in R_RenderFakeWallRange. 2016-04-27 02:28:45 +02:00
Christoph Oelckers fab38d092b - fixed: P_LineOpening could miss a 3D floor if an actor was centered right against its side.
- restored the original 3D floor code to retrieve the current floor in P_CheckPosition. The portal aware version was a bit too strict and could place the actor on the wrong side when moving at high speeds.
2016-04-27 02:13:35 +02:00
Chris Robinson 6e25d3f618 Use a background thread for processing OpenAL streams 2016-04-26 06:12:56 -07:00
Chris Robinson 204d0c8572 Don't try to define __try/__except on non-MSVC systems
They didn't do anything anyway, and can clash with other compilers since they
may be used internally (macros and keywords starting with __ are for compiler
use).
2016-04-26 05:55:18 -07:00
Christoph Oelckers 172290224b - make modes 2 and 3 of Teleport_NoFog compatible with Eternity by defaulting to mode 1 when no line is available. 2016-04-25 01:01:28 +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 31845cd16b - fixed two fixed/float mixups. 2016-04-24 10:24:43 +02:00
Randy Heit e96ed6bf8d Add FBaseCVar::GetHumanString()
- For most cvars, this is equivalent to calling GetGenericRep() to get a
  string.
- For float cvars, it uses %g instead of %H, because %H is generally more
  information than is needed.
2016-04-23 22:30:08 -05:00
Randy Heit fc54dd1ff0 Use %H when converting float cvars to strings to avoid information loss 2016-04-23 22:08:49 -05:00
Randy Heit 3a0d046f7e Fix rendering with SW 2D: modf usage was backwards 2016-04-23 21:29:40 -05:00
Randy Heit 96a0bee651 Quiet two more warnings from GCC 2016-04-23 21:00:35 -05:00
Randy Heit 3cabd5f0ed Fix compilation with GCC
- GCC is pickier than Visual C++. GCC requires that structs with constructors, etc that are
  used in a union must be defined outside the union. VC++ lets you do it inline.
2016-04-23 20:58:15 -05:00
Randy Heit 991f49e321 Avoid copying vissprite_t in R_DrawPSprites() 2016-04-23 20:42:14 -05:00
Randy Heit b8e3e1f095 Remove BAM_FACTOR from FAngle, because it takes up physical space in the struct 2016-04-23 17:27:36 -05:00
Christoph Oelckers 565bab8bd3 - removed some unnecessary temporary variables. 2016-04-23 22:55:44 +02:00
Christoph Oelckers f420ccd287 - made Teleport_NoFog compatible with Hexen and Eternity.
ZDoom defaulted to Boom's (buggy) angle adjustment.
Changed it so that
 * Mode 0 is like Hexen, performing no adjustment at all. This still should match all known maps using this special.
 * Mode 1 remains unchanged.
 * Mode 2 replicates Boom's broken angle adjustment and is used in the xlat file.
 * Mode 3 implements the correct angle adjustment that Boom originally intended.

 (Note: Should some map require something different it should be handled with compatibility.txt instead of reverting this back to the broken way it was before.)
2016-04-23 21:32:40 +02:00
Christoph Oelckers eaabb5e986 - fixed vissprite_t &operator= declaration. 2016-04-23 15:51:46 +02:00
MajorCooke 6bba84458c - Rail spawned actor trails now set their targets to the shooter and transfer pitch. 2016-04-23 08:19:59 -05:00
Christoph Oelckers 5fcdb7b80d - bump savegame version for today's changes. 2016-04-23 14:20:40 +02:00
Christoph Oelckers 3c13d8085b - removed unused R_PointToDist2 and R_PointToAngle2 functions. 2016-04-23 13:55:50 +02:00
Christoph Oelckers 2447f7bc38 - renamed FTransform access functions. 2016-04-23 13:40:02 +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 35a6994d0a - remove the 'F' prefix from the floating point access function to the sidedef texture info, now that the fixed point versions are gone. 2016-04-23 10:55:55 +02:00
Christoph Oelckers be8d1b46a7 - remove the deleted functions, now that they are no longer needed. 2016-04-23 10:51:58 +02:00
Christoph Oelckers 4d4f31fd83 - floatified sidedef texture info and fixed two bugs involving this data. 2016-04-23 09:41:59 +02:00
Randy Heit f1b3f59bcc Renderer floatification: Use floating point for wall scale and yrepeat 2016-04-22 23:12:53 -05:00
Randy Heit 1f97488945 Renderer floatification: Use floating point for decals 2016-04-22 23:12:53 -05:00
Randy Heit cb0fe38dfe Renderer floatification: "fix for signed divide" isn't needed when using xs_RoundToInt 2016-04-22 23:12:53 -05:00
Randy Heit b2b3e50c5c Renderer floatification: Use floating point for geometry Zs 2016-04-22 23:12:53 -05:00
Randy Heit 3ef5a678d5 Renderer floatification: Use floating point for texturemids and Y scales 2016-04-22 23:12:53 -05:00
Randy Heit 4a1cc61822 Renderer floatification: Restore playersprite rendering 2016-04-22 23:12:27 -05:00
Randy Heit ec8d038c99 Renderer floatification: Use floats for lighting values 2016-04-22 23:10:34 -05:00
Randy Heit 4416d88eb2 Renderer floatification: Use floating point for visibility values 2016-04-22 23:10:02 -05:00
Randy Heit ded3f92452 Commence renderer floatification 2016-04-22 23:09:13 -05: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 382a6e8b9f - link actors to touching line portals, for use by the renderer. 2016-04-21 22:59:07 +02:00
Edoardo Prezioso afa3009f93 - Fixed a GCC/Clang compiler error and a warning. 2016-04-21 16:11:03 +02:00
Edoardo Prezioso 6cfd82f500 - Simplify more, found by code inspection. 2016-04-21 16:03:33 +02:00
Edoardo Prezioso 6aca7604eb - Clean the code by using AActor::GiveInventory.
This fixes also a bug in FraggleScript GiveInventory, which tried to access the 'SaveAmount' member of 'ABasicArmorBonus' with the wrong cast.
2016-04-21 16:02:43 +02:00
Edoardo Prezioso 7b35f32f3d - Added the 'GiveInventory' method to the actor.
This will help cleaning up the item giving code. Returns a bool, in case the pickup failure might turn to be interesting in the future.
2016-04-21 15:59:23 +02:00
Edoardo Prezioso ad9b9479ec - Fixed erroneous P_UndoPlayerMorph calls.
In some places, P_UndoPlayerMorph was called with the 'force' argument placed in the 'unmorphflag' parameter, so that 'forced' unmorphs would be not completely forceful.

I hope no mod relied on this weirdness...
2016-04-21 11:25:08 +02:00
Christoph Oelckers 27cc3d6289 - fixed: ACS's GetActorLightLevel didn't check 3D floors. 2016-04-21 11:17:28 +02:00
Christoph Oelckers ba7260c176 - fixed overflow issue with large damage values in P_RadiusAttack. 2016-04-21 10:51:41 +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 3532dd9ea1 - fixed coordinate correctness issues with P_CheckFor3DFloor/CeilingHit. 2016-04-20 13:28:19 +02:00
Randy Heit 60966f472f Revert "Revert "Remove "action" from Actor functions that don't actually need it""
- This reverts commit 06216d733e.
- I don't know what I was thinking. Since stateowner is always available
  to the wrapper function, and this code is only generated for the wrapper
  function, it's a nonissue. The state is already located before calling
  any function that uses it.
2016-04-19 21:09:15 -05:00
Randy Heit 06216d733e Revert "Remove "action" from Actor functions that don't actually need it"
- This reverts commit 39df62b20e.
- Anything that needs to lookup a state also needs stateowner. See
  FxMultiNameState::Emit(). I will need to be more selective when
  de-actionifying functions.
2016-04-19 20:56:43 -05:00
Randy Heit 05843d3b13 Use "%#g" when disassembly floating point constants
- With "%g", there would be no decimal point if the number had no
  fractional part, making the output indistinguishable from integers.
2016-04-19 20:48:12 -05:00
Randy Heit 5d3e413d42 Make A_Stop an action function again
- A_Stop takes no parameters, so it should be an action function to avoid
  creating the wrapper when called.
2016-04-19 20:46:30 -05:00
Randy Heit 39df62b20e Remove "action" from Actor functions that don't actually need it
- An actor function really only needs to be an action function if:
  1. It can be called with no parameters specified, either because it takes
     none or because all its parameters are optional. This lets SetState()
     call it directly without creating a wrapper function for it.
  2. It wants access to the callingstate or stateowner parameters. Most
     functions don't care about them, so passing them is superfluous.
2016-04-19 20:28:49 -05:00
Christoph Oelckers 322b9fc0ae - wrap access to portal properties into sector_t:: member functions. 2016-04-19 11:35:28 +02:00
Randy Heit c795f29cc4 Reduce calling overhead for A_SetUser* functions by making them non-action functions 2016-04-18 23:18:34 -05:00
Randy Heit e83bc53678 Add atan2, which was conspicuously absent, to the VM
- DECORATE now has atan2(y,x) and VectorAngle(x,y) functions. They are
  identical except for the order of their parameters. The returned angle
  is in degrees (not radians).
2016-04-18 23:06:17 -05:00
Christoph Oelckers 69cbb7a382 - fixed: The pitch calculation did not check the calling actor's height when retrieving the position to calculate the pitch from. 2016-04-19 00:52:08 +02:00
Christoph Oelckers d2735d7632 - fixed: Trace considered any water surface a hit if nothing else was found. 2016-04-18 18:31:19 +02:00
Christoph Oelckers 5e822fd60b - fixed: The starting position of sight checks was inconsistent in different parts of p_sight.cpp. 2016-04-18 16:46:56 +02:00
Edoardo Prezioso 8dee0be9ab - Fixed the morphed player actor friendliness.
It wasn't inherited from the original player actor object.
2016-04-18 16:30:13 +02:00
nashmuhandes a30eb4d709 Fixed a potential NULL assignment in FOptionMenuItemSafeCommand::Activate 2016-04-18 16:30:13 +02:00
nashmuhandes 6bfdd10a5c Show the command label when choosing a SafeCommand (like Reset2Defaults) in the menu. 2016-04-18 16:30:12 +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 961a4c8524 - optimized sector portal checks.
All the PortalBlocks* functions were turned into real function calls which for such a frequent check should be avoided. So now any linked portal sets a flag in the attached sectors so that it isn't necessary to check the skybox pointer each time which makes the functions subject to inlining again.
2016-04-18 13:40:09 +02:00
Christoph Oelckers 42e88ef120 - removed sector_t::FloorDisplacement and CeilingDisplacement.
Using the values these return directly is just as much code.
2016-04-18 13:40:09 +02:00
Christoph Oelckers c30d5d42a2 - fixed: UpdateSectorRenderList may not be called when spawning mapthings.
At this time the portals have not been initialized yet and doing this here would trash the cached previous coordinate.
2016-04-18 13:40:08 +02:00
Christoph Oelckers 8c1eb201eb - optimized P_PointInSubsector.
It costs more to convert the floating point coordinate for each node check than to convert it once up front and only use fixed point math afterward.
2016-04-18 13:40:08 +02:00
Randy Heit c5c032911c Let the temporary vissprite be stack local 2016-04-17 20:59:08 -05:00
Randy Heit 66c4bc1fee Fixed various problems when drawing psprites in a camera texture
- When the camera texture for a player view was rendered, its psprites
  would overwrite the ones stored for hardware acceleration.
  * Use a temporary vissprite in R_DrawPSprite() until it's known that it
    will be accelerated.
  * Do not write to any of the VisPSprites*[] arrays until it's known that
    the sprite will be accelerated.
2016-04-17 20:55:07 -05:00
Randy Heit bf629d2590 Use a range instead of strict equality when deciding head sounds
- See http://forum.zdoom.org/viewtopic.php?f=7&t=51583
2016-04-17 20:14:25 -05:00
Christoph Oelckers 2661a94fe9 - call UpdateSectorRenderList from LinkToWorld as well, because this can be called from outside the actor's Tick function. 2016-04-18 01:35:37 +02:00
Christoph Oelckers 89b2cc45a2 - reverted P_CreateSecNodes to the regular FBlockLinesIterator.
This got accidentally committed. Even if this gets extended to reach through portals it needs to be done differently. FMultiBlockLinesIterator can't guarantee to get every sector that's being touched.
2016-04-18 00:02:07 +02:00
Christoph Oelckers 54d78df267 - added a new sector list to AActor that collects all portal-linked sectors the actor's center is in. (Inspired by Eternity's solution to the same problem.)
This is for rendering the sprite properly in all areas the actor touches. The original thinglist is not sufficient for this and Boom's touching thinglist has other purposes and collects too much data.
This new list will only get filled in when the actor is actually crossing a portal plane, for the normal sector thinglist will still be used.
This piggybacks on the msecnode_t code which has been extended to be able to handle more than one list by passing the sector's membert pointers as parameters.
2016-04-17 23:48:04 +02:00
Christoph Oelckers f66202aef1 - fixed: If due to portal transitions, the chasecam cannot be interpolated, the entire view interpolation must be disabled for the current frame. 2016-04-17 18:42:54 +02:00
Christoph Oelckers 08514de768 - fixed A_WraithFX2 which had an incomplete floating point conversion. 2016-04-17 18:19:46 +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 f27c762319 - fixed: The Heresiarch's check for full rotation of its balls depended on BAM semantics so it should still be checked as such to ensure consistent behavior. 2016-04-17 12:28:35 +02:00
Christoph Oelckers a199fe1825 - fixed: loading polyobjects from a savegame was incomplete. 2016-04-17 12:04:32 +02:00
Christoph Oelckers a1e8d83724 - added SetMusicVolume ACS function. 2016-04-17 10:56:46 +02:00
Christoph Oelckers 5e73cdc670 - deleted leftover label in trace code. 2016-04-17 10:41:13 +02:00
Christoph Oelckers bc2a5b3f16 - fixed typo in automap background position calculation. 2016-04-17 10:19:56 +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 7ac0cfbbb9 - added support for angle changing portals to P_AimCamera. 2016-04-16 22:54:47 +02:00
Christoph Oelckers e7c0fd26ba - restored an accidentally deleted line in the Heresiarch code. 2016-04-16 21:28:08 +02:00
Christoph Oelckers 0f6a567055 - added portal-awareness to the railgun trail.
This required some changes to the Trace function because it turned out that the original was incapable of collecting the required information:

* actors are now also linked into blockmap blocks on both sides if they occupy the boundary of a sector portal.
* Trace will no longer set up parallel traces in all parts connected with sector portal, but only use one trace and relocate that on the actual boundary.
2016-04-16 19:41:33 +02:00
Christoph Oelckers eb30bf6e14 - fixed: Offsetting a vector by portals did not properly adjust the trace after crossing a portal. 2016-04-16 00:17:12 +02:00
Christoph Oelckers cd75a46917 - fixed incorrect use of 'frac' in Trace's EnterLinePortal function.
How did this go wrong...?
2016-04-15 22:22:38 +02:00
Christoph Oelckers 6dfb4bdd41 - changed floor and ceiling movers so that portal planes do not block movement of the opposite plane, even if they are on the wrong side of it.
This fixes the cross-portal lift to the blue key in Vaporware.
2016-04-15 20:42:40 +02:00
Christoph Oelckers b73c6e847a - fixed: A_CheckRange calculated the square twice, resulting in a far too large value that got checked. 2016-04-15 18:46:31 +02:00
Christoph Oelckers 24776edd13 - fixed one of the most glaring omissions in the portal code: The wall clipper completely ignored portals when deciding how to treat a sector boundary, and ended up merging portal with non-portal planes.
This check is only active for linedef based portals, due to the large amount of maps that did it wrong with thing based portals.
Although it may well be that there are some maps that abuse this omission for linedef portals as well, these are better handled with a compatibility option if the need arises.

The main reason this was added is to streamline and optimize the portal handling between renderers in ZDoom and GZDoom. For that both need to show the same general behavior and for linedef portals it is also important to handle the same as in Eternity.
2016-04-15 16:39:58 +02:00
Christoph Oelckers 94cec02acc - fixed: FPNGTexture must readjust the file pointer after deciding to skip the tRNS chunk. 2016-04-15 15:15:34 +02:00
Christoph Oelckers ed211ecbab - fixed positioning of portal things
In some situations it can happen that the sector here is not the frontsector of the anchor linedef, because some colinear node line with opposite direction causes this to be positioned on the wrong side. The only remedy here is to explicitly set the correct sector after spawning these things.
2016-04-15 15:02:28 +02:00
Christoph Oelckers f0c2cd2d50 - fixed: 24 bit PNGs with transparent color need to set transpal to true in FPNGTexture::CopyTrueColorPixels. 2016-04-15 10:45:31 +02:00
Christoph Oelckers 77f05a0010 - fixed spawn positions for Korax's missiles. 2016-04-14 00:21:38 +02:00
Christoph Oelckers 0f7fce8bbb - removed portal offsetting from the sprite distance check.
This isn't necessary. When rendering no actors from other groups may ever come into view directly - only when the respective part of the level is rendered through a portal. But at that point the camera is in a position where it's already correctly placed with relation to that actor.
2016-04-13 19:32:54 +02:00
Christoph Oelckers d88a5ac353 - make distancecheck 3D and use the actual view position for calculation. 2016-04-13 10:48:39 +02:00
Christoph Oelckers 45cfea17f5 - removed unused variable. 2016-04-13 10:34:04 +02:00
Christoph Oelckers 21b45fc0eb - fixed: distancecheck as a class property needs to be copied manually to subclasses. 2016-04-12 22:42:02 +02:00
Christoph Oelckers 3f0ed5d252 - added a distancecheck property to AActor that allows a given CVAR to be used as maximum display distance for actors of this type.
This is for WolfenDoom: BOA, which has some scripted sprite distance checks that very negatively affected performance.
2016-04-12 19:44:12 +02:00
Christoph Oelckers e1a683b9ec - fixed minimum damage check in PowerDamage. 2016-04-12 15:49:13 +02:00
Christoph Oelckers 5d528fe317 - fixed: PCD_ENDTRANSLATION was missing a NULL pointer check. 2016-04-12 01:23:12 +02:00
Christoph Oelckers a97f67edb6 - fixed: P_GetMidTexturePosition needs to divide by scale, not multiply, to get the proper offset. 2016-04-11 23:12:35 +02:00
Christoph Oelckers aec1c85c08 - fixed: alpha for patches needs to be multiplied by 65536, not divided by. 2016-04-11 22:21:17 +02:00
Christoph Oelckers ae6df617ba - fixed: The FPathTraverse call in P_UsePuzzleItem was missing the PT_DELTA flag. 2016-04-11 22:10:46 +02:00
Christoph Oelckers e72bfa8add - fixed: For finding the listener's sector the sound code used the wrong coordinate. 2016-04-11 21:02:44 +02:00
Christoph Oelckers 99ca649930 - fixed NULL pointer access in SetAmmoCapacity. 2016-04-11 20:42:43 +02:00
Christoph Oelckers 77bfffaee0 - removed a few __cdecl's from the source. 2016-04-11 12:46:48 +02:00
Christoph Oelckers db86385cf6 - removed STACK_ARGS.
The only reason this even existed was that ZDoom's original VC projects used __fastcall. The CMake generated project do not, they stick to __cdecl.
Since no performance gain can be seen by using __fastcall the best course of action is to just remove all traces of it from the source and forget that it ever existed.
2016-04-11 10:46:30 +02:00
MajorCooke 76f00131ff - Fixed: A_CheckBlock's dropoff check ignored the specifications of NOACTORS and NOLINES due to P_CheckMove blindly failing if P_CheckPosition failed. This lead to false positives such as blocking actors being detected when they shouldn't be. 2016-04-10 20:11:04 +02:00
Christoph Oelckers 76c18820cb - moved the declarations for the lighting thinkers to p_light.cpp.
Aside from the init function they are not needed anywhere else and that could also be placed into this file.
2016-04-10 18:29:23 +02:00
Christoph Oelckers c12a85ee85 - removed some unused content from p_spec.h 2016-04-10 18:14:01 +02:00
alexey.lysiuk 93c334059a Made title text always visible in OS X startup window
Added temporary solution for the same foreground and background colors of the title in OS X startup window
It's used in graphical startup screen, with Hexen style in particular (for example WolfenDoom - Blade of Agony)
Native OS X backend doesn't implement this yet
2016-04-10 14:06:18 +02:00
Christoph Oelckers fe973ba442 - tried to add precompiled headers to fastmath sources as well, but VC++ doesn't seem to want to play along. So I left this stuff in but disabled the precompilation until a solution can be found. 2016-04-10 13:54:42 +02:00
Christoph Oelckers 08b0be11a6 - add the precompiled header file for the previous commit. 2016-04-10 13:10:41 +02:00
Christoph Oelckers 9cc873ecdd - enable use of precompiled headers for MSVC. Thanks to a small CMake script I recently found this could be done non-invasively.
Due to the VC++ 2015 headers being rather bloated (the average include size per source is 400-500kb) this provides a noticable compile speedup, although right now this only covers the game code, so there should be more room for improvement.
2016-04-10 13:08:54 +02:00
Christoph Oelckers 12129b0f07 - added a system-include independent wrapper for Windows's OutputDebugString, so that this can be used more easily in files that cannot include windows.h. 2016-04-10 13:03:44 +02:00
Christoph Oelckers ef08e29d51 - remove windows header #include from gameconfigfile.cpp, because it isn't needed. 2016-04-10 12:33:35 +02:00
Christoph Oelckers d48c0ce25c - fixed some particle positioning errors. 2016-04-10 10:57:48 +02:00
Christoph Oelckers 9a48adf81a - fixed: The software 2D drawer expected its translation pointer to be initialized by ParseDrawTextureTags. Removed the variable from DrawParms and made it and its initialization local to the software rendering code. 2016-04-09 22:56:12 +02:00
MajorCooke c79a1b6a45 thing->floorz --> thing->dropoffz 2016-04-09 22:33:55 +02:00
MajorCooke 8b8c879994 - CBF_DROPOFF Fixes
- Fixed: CBF_DROPOFF didn't actually check the coordinates passed to it for dropoff height values. It only checked to see if it was stuck in lines.
2016-04-09 22:33:54 +02:00
Christoph Oelckers dc72e7f3c2 - removed the check for VA_COPY from CMakeLists.txt.
This is because nothing uses va_copy anymore and it's a mandatory part of C++11, therefore always available.
2016-04-09 22:07:14 +02:00
Christoph Oelckers 1f1a0ca847 - fixed incorrect check for negative damage in APowerProtection::ModifyDamage. 2016-04-09 21:57:35 +02:00
Christoph Oelckers bcebeadedc - fixed: ACS's GetActorPitch needs to convert to a signed angle. 2016-04-09 21:44:09 +02:00
alexey.lysiuk daa112e2ac Fixed OS X compilation after floating point merge
Header files from Carbon framework caused a few symbol conflicts
2016-04-09 20:54:04 +02:00
Christoph Oelckers a827bab576 - refactored the use of tag lists so that they do not have to be passed around between functions.
This means that the varargs functions themselves are now responsible for parsing them into DrawParms.
This was done because DrawTextV made a blanket assumption that every single vararg has the size of a 32 bit integer and caused crashes when anything else was passed. It also failed to eliminate any tag that is incompatible with text display. These will now abort DrawText and trigger an assert.
2016-04-09 20:47:54 +02:00
Christoph Oelckers e2ae7d8f5d - removed the unused x and y parameters from DrawTextureParms. 2016-04-09 12:59:50 +02:00
Christoph Oelckers 43dd759859 - changed DrawTexture so that the parameters get parsed in the varargs function directly and that the virtual function that is getting called gets the fully prepared data.
In order to avoid passing around tag lists, DrawTextV needs to parse everything itself and then pass a fully initialized structure to DrawTexture. This cannot be done if all variants require a varargs tag list.
Apparently the only reason for the old approach was the 'hw' parameter which was never used.
2016-04-09 12:55:12 +02:00
Christoph Oelckers ca317a87ea - started working on tracking portal transitions for railgun shots. 2016-04-09 12:09:06 +02:00
Christoph Oelckers bc7e159be0 - cleaned up ceiling creation and moved the Create function out of the DCeiling class.
- did the same for floors so that FraggleScript no longer needs access to the thinkers themselves.
2016-04-09 12:07:34 +02:00
Christoph Oelckers caae61de4c - removed DMoveCeiling and let FS call DCeiling::Create instead. Made a minor change to DCeiling::Create to keep it compatible, because handling for instantly moving ceilings is a bit different. 2016-04-08 20:44:55 +02:00
Christoph Oelckers 919f99db61 - fixed typo in actor scale assignment when spawning. 2016-04-08 16:52:42 +02:00
Christoph Oelckers 39d03f12b1 - fixed float <-> fixed conversion errors in Fragglescript. 2016-04-08 15:14:26 +02:00
Christoph Oelckers 06dc96b062 - removed 64 bit warnings. 2016-04-08 14:21:20 +02:00
Christoph Oelckers 8535a973cf - made MoveAttached, MoveCeiling and MoveFloor members of sector_t instead of DMover.
- call MoveFloor and MoveCeiling directly in FS's floorheight and ceilingheight functions and remove the dummy thinkers it had to use before.
2016-04-08 14:18:46 +02:00
Christoph Oelckers e505bfd7a3 - took EResult out of DMover and made it an enum class. 2016-04-08 13:59:03 +02:00
Christoph Oelckers fb2234396c - split DSectorEffect::MovePlane into MoveFloor and MoveCeiling.
What was the point of this strange setup anyway? MoveFloor and MoveCeiling were inlines calling the universal MovePlane, which had nothing better to do than a switch/case with two cases - floor and ceiling!
2016-04-08 13:39:08 +02:00
Christoph Oelckers 74c9a7bf67 - fixed angle calculation in AdjustPlayerAngle for portals.
Normally this will adjust relative to the actual direction to the target, but with arbitrary portals that cannot be calculated so using the actual attack angle is the only option.
2016-04-08 13:08:08 +02:00
Christoph Oelckers 7404142edf - fixed incorrect center point calculation. 2016-04-08 12:51:00 +02:00
Christoph Oelckers 58002f7f96 - fixed: an 'if' that gets completely optimized away by a constant 'false' condition should not make the entire function disappear. 2016-04-07 20:31:12 +02:00
Christoph Oelckers 0cbdb9ab72 - handle display of player sprite during portal transition properly.
This checks if the current viewpoint lies on the interpolation path, translated by all active portals.
2016-04-07 19:35:01 +02:00
Christoph Oelckers 47e20aead4 - disallow crossable portals on one-sided linedefs which do not belong to a polyobject.
Sadly the mappers cannot be trusted to use a feature correctly. Despite repeatedly telling that portals on one-sided lines are problematic, everybody seems to do it this way - and then report bugs if it doesn't work. Under such circumstances the only safe option is to block such portals entirely.

See http://forum.zdoom.org/viewtopic.php?f=2&t=51511&p=898522#p898522 for a typical example of the problems this might cause.
2016-04-07 17:13:56 +02:00
Christoph Oelckers 32bbec7cad - fixed: the random offset that gets used when spawning blood applies to both sprites and particles, not just sprites. 2016-04-07 14:14:44 +02:00
Christoph Oelckers 1d286d5bd5 - added APROP_MaxStepHeight + APROP_MaxDropOffHeight. 2016-04-07 13:41:54 +02:00
Christoph Oelckers ddb2f6b6cb - fixed: P_SpawnPlayerMissile still used the angle_t values for offsetting the autoaim traces. 2016-04-07 13:11:23 +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 a1c03c9a62 - fixed: P_AimCamera inverted the pitch. 2016-04-07 12:44:46 +02:00
Christoph Oelckers 790e13e5cb fixed: For sight checks the 'eye' of the seeing thing should be placed at 3/4 height, not half its height. 2016-04-07 12:14:34 +02:00
Christoph Oelckers 7ebb961917 - added weapon bobbing interpolation.
This was so ridiculously simple that I really fail to understand why the previous attempt was so overcomplicated that it just failed for that.
2016-04-07 11:48:23 +02:00
Christoph Oelckers 7f23a91488 - fixed: smooth bobbing uses the full angular range to calculate its position. 2016-04-07 11:14:39 +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 5409ada0e3 let WM_DISPLAYCHANGE and WM_STYLECHANGED call DefWindowProc.
At least on GZDoom it seems to be important on some systems.
2016-04-07 10:26:57 +02:00
Randy Heit 4b10177e46 Make the firelines fudging more "streamlined" 2016-04-06 20:09:42 -05:00
Christoph Oelckers 3923039a1b - fixed: a sight check that starts right on a linedef should ignore that linedef.
Trying to calculate a slope to the target from this linedef's opening will always result in failure because it'd involve a division by zero.
2016-04-07 01:16:07 +02:00
Christoph Oelckers b774fed93e - fixed: P_DrawSplash2's z-velocity was too high.
This code was ported from the 2005 floating point version, at one point it replaced 128 with 0.5, but 128 as a fixed point value needs to be 1/512. as a floating point value.
2016-04-06 18:46:52 +02:00
Christoph Oelckers b93d4a796a - fixed angles for am_rotate. 2016-04-06 17:28:31 +02:00
Randy Heit b796a5fed6 Fixed: segangle is only 16-bits, so AngleToFloat won't work on it directly 2016-04-06 08:45:07 -05:00
Christoph Oelckers 8ad49f5d33 - removed a leftover line from before the floating point conversion in p_user.cpp. 2016-04-06 13:21:17 +02:00
Christoph Oelckers 8cbdbdaf70 - fixed: The PathTraverse and sight checking code may not assume that ceiling(x) == floor(x)+1.
This will fail when a trace starts directly on a block boundary in which case x is a whole number. It should always use 'floor(x)+1' to ensure that the calculated point is at the right or upper edge of a block.
2016-04-06 13:19:09 +02:00
Christoph Oelckers d4a2e9696e - removed 'inline' from P_Teleport declaration. 2016-04-05 22:27:11 +02:00
Christoph Oelckers 1a5a00a76e Merge branch 'floatcvt' 2016-04-05 21:42:09 +02:00
Christoph Oelckers 04b0a13bd3 - some optimization of FPathTraverse:
* we do not really need compatibility PointOnLineSide here. Unlike the movement code it'd only affect some extreme edge cases.
 * removed the special case for very short traces. This was a result of the original and very imprecise PointOnLine functions. Since those no longer get used here and floating point precision is a lot higher there is no need for this kind of treatment.
 * PointOnLine checks for the sides of an actor's bounding box don't need a full PointOnLineSide call, a simple coordinate comparison is fully sufficient, and this can easily be done in the existing switch/case block.
2016-04-05 16:29:07 +02:00
Christoph Oelckers ad13a55f0d - floatified line_t::dx and dy. 2016-04-05 14:03:08 +02:00
Christoph Oelckers f606ba315f - fixed: The return value of sector_t::FindHighestFloorPoint lost its '-' sign during the floating point conversion. 2016-04-05 10:55:13 +02:00
Christoph Oelckers 1d83ea6177 - fixed: ACS's SpawnProjectile and Thing_Projectile2 functions were treated as fixed point even though they are not. 2016-04-05 10:16:48 +02:00
Christoph Oelckers 55cbeb0253 - fixed pitch calculation in P_SeekerMissile with SMF_PRECISE. 2016-04-04 23:07:21 +02:00
Randy Heit d39694a33d Fixed: DoTakeInventory() indicated success when passed an invalid item type 2016-04-04 15:51:03 -05:00
Randy Heit 3c8423d810 Print only one error message when PlayerPawn.Face is not 3 chars long 2016-04-04 15:17:58 -05:00
Randy Heit 57e0c97867 Fixed: DECORATE property error messages fail to show the file information 2016-04-04 15:16:29 -05:00
Randy Heit 6f60253590 Don't waste time looking for variables to (de)init in native classes 2016-04-04 14:57:43 -05:00
Christoph Oelckers 2dff6a08d1 - fixed: P_RadiusAttack passed the wrong radius value to the BlockThingsIterator. 2016-04-04 16:51:25 +02:00
Christoph Oelckers 21692359cc - fixed A_Face angle calculation. 2016-04-04 15:59:59 +02:00
Christoph Oelckers 7586320038 Merge branch 'master' into floatcvt
# Conflicts:
#	src/p_map.cpp
2016-04-04 14:19:34 +02:00
Christoph Oelckers c346ac6143 - fixed: P_TeleportMove must clear the spechits array.
This was accidentally deleted during one round of portal refactoring but is essential to prevent multiple teleport activations in one move.
Fixing this also allowed removing the fudging that was added to work around the issue in P_TryMove.
2016-04-04 14:17:34 +02:00
Christoph Oelckers 32c32ea739 - fixed some initialization problems with sound.
* a position-less sound did not get the listener's position attached.
 * an unattached sound mixed up y and z coordinates.
2016-04-04 12:46:32 +02:00
Christoph Oelckers fadc7d650d - fixed: segplane_t::SetAtHeight initialized the plane normal's Z incorrectly. 2016-04-04 12:02:53 +02:00
Randy Heit 7de8c2b5eb Fixed: || should be && 2016-04-03 21:35:44 -05:00
Randy Heit 77f9643c8f How did this end up wrong? 2016-04-03 20:25:07 -05:00
Randy Heit 17972b5d06 Revert "Add "support" for user string variables in DECORATE"
- This reverts commit c90a1c0c96.
- DECORATE looks to be very dependant on functions that take strings as
  parameters receiving those strings as constants and not as expressions,
  so being able to declare string variables with DECORATE is pretty much
  useless.
2016-04-03 19:15:00 -05:00
Christoph Oelckers fd27c8db9e Merge branch 'master' into floatcvt
# Conflicts:
#	src/dobjtype.cpp
#	src/dobjtype.h
#	src/version.h
2016-04-04 01:21:24 +02:00
Randy Heit c90a1c0c96 Add "support" for user string variables in DECORATE
- This is "support" in the very most basic sense. You can declare them,
  but you can't actually do anything with them, since the decorate parser
  can't handle expressions when it's parsing string arguments. However,
  they seem to be getting properly initialized and destroyed, which is
  what this was added to test. If it doesn't look like too much trouble, I
  might try to turn them into something actually worth something.
2016-04-03 18:10:09 -05:00
Randy Heit 7c8cff64e6 Added code to initialize and destroy string variables in classes
- Will require being able to add strings to non-native classes to actually
  test this.
2016-04-03 17:45:04 -05:00
Randy Heit 15208188de Remove PClass::Extend() 2016-04-03 16:25:08 -05:00
Randy Heit 85c8218441 Added methods for PTypes to serialize their values
- Values are tagged to allow for some measure of changing variable types
  without automatically breaking savegames.
- Use these new methods to serialize the non-native variables in an
  object. This allows for achiving non-ints.
2016-04-03 16:21:48 -05:00
Randy Heit da496bbe62 Use AddField() to add user variables in DECORATE 2016-04-03 16:21:48 -05:00
Randy Heit 806d9d7a95 Add an AddField() override to PClass that extends the default instance 2016-04-03 16:21:47 -05:00
Randy Heit 3357af32e5 Generalize FxArrayElement to work with all numeric elements (not just 32-bit ints) 2016-04-03 16:21:41 -05:00
Randy Heit 0cc2705b99 Added A_LogFloat 2016-04-03 16:12:35 -05:00
Christoph Oelckers 1011e26eb9 - fixed: P_RadiusAttack should not call P_DamageMobj for a damage value of 0.
This could happen if the damage calculations resulted in a value between 0 and 1, which for the actual check was multiplied with the damage parameter of P_RadiusAttack which inflated the fractional value to something that looked like actual damage but was later truncated.
2016-04-03 22:45:54 +02:00
Christoph Oelckers 6d441e25db - partially undid the 'repeated flash state' fix, because it didn't work with the stock weapons. I'm still not sure if a compatibility setting is needed. 2016-04-03 22:31:45 +02:00
Christoph Oelckers 330ca07f69 Merge branch 'master' into floatcvt 2016-04-03 22:11:50 +02:00
Christoph Oelckers 3f5e0c682e - fixed: Due to the iteration limit of 100 in the path traverse code, running a trace was effectively limited to somewhere around 12800 map units. Also added the safer exit condition checks from the sight checking code to FPathTraverse. 2016-04-03 21:41:58 +02:00
Christoph Oelckers 70b8afc5ec - fixed: A_CheckLOF did the trace pitch calculation wrong. 2016-04-03 21:26:57 +02:00
Christoph Oelckers 02a586e6b2 - removed a redundant Vec3Offset call in A_SpawnParticle. 2016-04-03 21:03:49 +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 4e5ba49aca - got rid of secplane_t::fA and fB. All uses could be replaced by other functions. 2016-04-03 19:46:00 +02:00
Christoph Oelckers fc5f98a0be - floatified the sector planes.
This should conclude the floating point conversions for now.
2016-04-03 19:28:53 +02:00
Christoph Oelckers fede16ce68 - fixed PointOnSide checks.
- optimized some ZatPoint calls for floating point planes.
2016-04-03 13:15:02 +02:00
Christoph Oelckers 7a6039b44c - floatified vertex coordinates.
Making these double or float doesn't seem to matter at all performance-wise so they use the more precise double format.
2016-04-03 11:53:31 +02:00
Braden Obrzut 42edd7db22 - Added IfInvulnerable SBARINFO command (modified from Blue-Shadow's pull request) 2016-04-02 23:47:44 -04:00
Braden Obrzut 81f29556bf - Refactored SBarInfo flow control so negatable commands are handled statically.
- Made TArray movable and TDeletingArray a move only type.
2016-04-02 23:43:56 -04:00
Edoardo Prezioso f36489098f - Fixed one GCC/Clang warning. 2016-04-02 23:01:51 +02:00
Edoardo Prezioso 28ac65b25b - Fixed GCC and Clang compilation errors. 2016-04-02 23:01:32 +02:00
Christoph Oelckers 6ffb5fa164 - fixed: Angular interpolation needs to call deltaangle instead of using the difference between two angles to avoid overflow conditions. 2016-04-02 22:12:52 +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 9a07f81269 - renamed all ZatPoint variants that return a fixed point value to ZatPointFixed, to avoid accidental mixup with the floating point variants. 2016-04-02 20:45:32 +02:00
Christoph Oelckers 6a150f7248 - fixed seg vertex adjustment (from a commit that wasn't copied to this branch.) and added viewx etc. to a global header . 2016-04-02 20:24:51 +02:00
Christoph Oelckers 3db90ff4c1 - removed all remaining fixed point methods from AActor.
- removed all calls to fixed point vertex access methods in p_setup.cpp.

# Conflicts:
#	src/p_setup.cpp
2016-04-02 20:14:58 +02:00
Christoph Oelckers 60e25b32a8 - floatified the particles.
This is the last bit of play code that needed to be altered, what's left is the underlying data representations of vertices, linedefs and sectors.

# Conflicts:
#	src/p_setup.cpp
#	src/r_things.cpp
2016-04-02 20:12:08 +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 b3659305ce - fixed typo in line portal interpolation path calculation. 2016-04-02 20:10:32 +02:00
Christoph Oelckers 96a02f922d - removed R_PointToAngle2 call in P_Setup.cpp.
- removed long inactive node saving code in p_writemap.cpp. If this file is ever made operational again it will be with UDMF output.
2016-04-02 20:10:25 +02:00
Christoph Oelckers 046ee3e803 - removed a few leftover FRACUNITs. 2016-04-02 20:07:18 +02:00
Christoph Oelckers bb13590e07 - make viewx etc. global.
- a few minor optimizations.
2016-04-02 20:07:02 +02:00
Christoph Oelckers ccfb2ac233 - fixed quake checks. 2016-04-01 12:58:46 +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 a5e14425aa - fixed angular interpolation of skybox viewpoints. 2016-04-01 11:55:37 +02:00
Christoph Oelckers a93296be80 - removed most of the deleted function declarations. 2016-03-31 21:20:45 +02:00
Christoph Oelckers 6445615b5d - fixed the sound location calculations which got somewhat broken by the constant changes during the conversion. 2016-03-31 21:13:32 +02:00
Christoph Oelckers 8f5ac9b73f - fixed a float/fixed mixup in R_PointOnSideSlow. 2016-03-31 17:44:05 +02:00
Christoph Oelckers 9412ce45d6 - floatified portals.cpp and most of p_maputl.cpp. 2016-03-31 16:52:25 +02:00
Christoph Oelckers 6b065b8074 - floatified FBoundingBox. 2016-03-31 10:38:54 +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 f41afde545 - floatified line_t::bbox. 2016-03-31 01:22:49 +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 1666418510 - fixed incomplete interpolation floatification. 2016-03-30 20:05:29 +02:00
Christoph Oelckers d54a2364b9 - floatified r_interpolate.cpp. 2016-03-30 17:11:31 +02:00
Christoph Oelckers 27bad66f61 - floatified the remaining parts of p_sector.cpp. 2016-03-30 16:51:19 +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 ced30e7bbb - fixed a few oversights.
- switched p_buildmap to use the floating point variants of the linedef/sector init methods.
2016-03-30 11:25:02 +02:00
Christoph Oelckers c2e2910399 - fixed copy/paste error in P_GetFriction resulting in incorrect calculation of movefactor. 2016-03-30 10:08:06 +02:00
Christoph Oelckers 0eb35d6c6e Merge branch 'master' into floatcvt
# Conflicts:
#	src/dobjtype.cpp
#	src/dobjtype.h
2016-03-30 09:47:25 +02:00
Christoph Oelckers 77f2530236 - floatified the sector plane movers and removed some of the ZatPoint conversion cruft. 2016-03-30 09:41:46 +02:00
Randy Heit 1648a71e45 Add support for Name and String types to ACS's GetUserVariable
- Reading one of these types will copy its value into the global ACS string
  table and return the index.
2016-03-29 22:49:12 -05:00
Randy Heit b37ef48e99 Allow ACS's GetUserVariable to access non-user variables
- Since DECORATE already allows reading all declared variables in a class,
  where's the utility in keeping this restriction in ACS?
- Variables must still be numeric types.
- SetUserVariable is still restricted to user variables only.
2016-03-29 22:42:04 -05:00
Randy Heit 35121544b4 Add float support to ACS's Get/SetUserVariable functions
- "Support" means that setting one will convert from fixed point to
  floating point, and reading one will do the reverse.
2016-03-29 22:41:38 -05:00
Randy Heit b6e3358b1c Add A_SetUserVarFloat and A_SetUserArrayFloat 2016-03-29 22:41:37 -05:00
Randy Heit 299019ea15 Add GetValueFloat() for numeric PTypes 2016-03-29 22:41:37 -05:00
Randy Heit feb5ab31cc Add double variants of SetValue() for numeric PTypes 2016-03-29 22:05:25 -05:00
Randy Heit e2711a74e7 Add float user vars for DECORATE
- PClass::Extend now takes alignment into consideration.
2016-03-29 21:48:57 -05:00
Christoph Oelckers ff0b371582 - made the linedef deltas private and only accessible through access functions.
Now everything should be in place to remove the fixed point math from the rest of the play code.
2016-03-29 16:13:16 +02:00
Christoph Oelckers 84d547adfb - fixed: The check if a line is in range of a bounding box must be exclusive.
Unfortunately I picked the one incorrect version of this check (from A_PainShootSkull) when moving it to an inline function.
2016-03-29 13:10:15 +02:00
Christoph Oelckers 25f5e8449a - replaced all direct access to sector plane coefficients with wrapper functions. 2016-03-29 12:40:41 +02:00
Christoph Oelckers c7ae4688a3 - replaced all direct access to vertex coordinates with wrapper functions.
So that code replacement can be done piece by piece and not all at once.
2016-03-29 10:07:06 +02:00
Christoph Oelckers 8d071f85b3 - use float vectors for prediction. 2016-03-29 02:06:05 +02:00
Christoph Oelckers c776a0fb54 - floatification of p_teleport and p_switch.cpp. 2016-03-29 00:31:59 +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 0283df4c42 - restored floating point pusher code. 2016-03-28 22:47:45 +02:00
Christoph Oelckers 9145181b79 Merge branch 'master' into floatcvt 2016-03-28 22:25:36 +02:00
Christoph Oelckers 8c3c18b008 - forgot to add this... 2016-03-28 22:25:12 +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 59920095af - separated pushers into their own file. 2016-03-28 21:57:22 +02:00
Christoph Oelckers 05504b65d2 - floatified p_scroll.cpp
While testing this it became clear that with the higher precision of doubles it has to be avoided at all costs to compare an actor's z position with a value retrieved from ZatPoint to check if it is standing on a floor. There can be some minor variations, depending on what was done with this value. Added isAbove, isBelow and isAtZ checking methods to AActor which properly deal with the problem.
2016-03-28 21:04:46 +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
Christoph Oelckers fd46909b1a - made partial floarting point aliases for EV_DoCeiling so that all the calls in p_lnspec.cpp match the master branch for merging. 2016-03-28 17:41:13 +02:00
Christoph Oelckers b5f333798e - moved all scroller related code into its own file, including the DScroller class definition. 2016-03-28 17:27:55 +02:00
Christoph Oelckers a99ebc2356 - floatified p_sight.cpp. 2016-03-28 16:22:21 +02:00
Christoph Oelckers 5e1c79c050 - floatified the rest of p_mobj_cpp and removed a large part of the conversion cruft from the headers that was needed to keep the code compileable. 2016-03-28 12:03:07 +02:00
Christoph Oelckers 2fff7005ad - floatified more of p_mobj.cpp 2016-03-28 10:01:24 +02:00
Christoph Oelckers 217414cb1c -floatified P_ExplodeMissile and P_XYMovement 2016-03-28 00:55:57 +02:00
Christoph Oelckers 7b256dda3d - did the last remaining bits in p_map.cpp. 2016-03-27 22:49:59 +02:00
Christoph Oelckers 8b4a33794a - floatified P_ChangeSector. 2016-03-27 22:35:58 +02:00
Christoph Oelckers fe744a589c - floatified P_RadiusAttack. 2016-03-27 21:11:17 +02:00
Christoph Oelckers 0baaa3cf63 - floatified P_LineAttack, P_TraceBleed and P_UseLines. 2016-03-27 20:58:01 +02:00
Christoph Oelckers eae6f7e9ea - floatified P_AimLineAttack. 2016-03-27 17:58:18 +02:00
MajorCooke 4eee1c7af1 Fixed: A_FaceMovementDirection was backwards. 2016-03-27 14:21:07 +02:00
Christoph Oelckers 228c447a02 - fixed: A_FireCustomMissile used the player position as offset. 2016-03-27 14:20:14 +02:00
Christoph Oelckers 6ab95da2fc - fixed copy/paste coordinate screwup in moving camera code. 2016-03-27 14:11:46 +02:00
Christoph Oelckers 23d311dd04 - floatified P_CheckSlopeWalk. It should be noted that this function is one place where full double precision is too high and needed to be truncated. 2016-03-27 14:07:35 +02:00
Christoph Oelckers 26ff2f73d7 - floatified P_TryMove and the sliding and bouncing code. 2016-03-27 13:29:58 +02:00
Christoph Oelckers 1877eca2ab - more floatification of p_map, plus some stuff used in those functions. 2016-03-27 01:06:54 +01:00
Christoph Oelckers 6e93264016 - started floatification on p_map.cpp. 2016-03-26 23:19:38 +01:00
Christoph Oelckers 00ea8662b8 - floatification of p_enemy and p_interaction.cpp. 2016-03-26 20:59:35 +01:00
Christoph Oelckers 0c39bdd04c - floatified texture scale values. 2016-03-26 13:37:44 +01:00
Christoph Oelckers dabed04d2a - floatification of p_3dfloors, p_3dmidtex and p_acs.cpp plus some leftovers.
- removed all references to Doom specific headers from xs_Float.h and cmath.h.
2016-03-26 12:36:15 +01:00
Christoph Oelckers 35bb686281 - floatification of sector_t::centerspot. 2016-03-26 09:38:58 +01:00
Christoph Oelckers 30b57fd7b0 - floatification of G_CheckSpot and a few other things. 2016-03-26 09:28:00 +01:00
Christoph Oelckers 696fde69b8 - moved the bot support code from AActor::Tick to a subfunction in the bot sources. No need to pollute a main game file with this stuff. 2016-03-26 01:30:28 +01:00
Christoph Oelckers c2e7858e05 - looks like the oldz parameter in UpdateWaterLevel is not needed at all... 2016-03-26 01:13:36 +01:00
Christoph Oelckers 558e04cb99 - safety commit. 2016-03-26 01:03:02 +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 2cf3b20ea8 - floatified the last remaining AActor member variable 'damagemultiply'. 2016-03-25 16:30:31 +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 2b33601d00 - The fixed_t type for the VM also is not needed any longer and was removed. 2016-03-25 15:50:39 +01:00
Christoph Oelckers 8cdfbeea01 - made AActor::__pos a genuine float vatiable. 2016-03-25 15:43:20 +01:00
Christoph Oelckers 3a598d672e - removed the angle_t type from the VM, now that nothing in the interface requires it anymore. 2016-03-25 14:55:01 +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 a3b687bc4e - renamed PARAM_DANGLE macros to PARAM_ANGLE, now that the old angle_t type is no longer used in the VM interface. 2016-03-25 13:23:07 +01:00
Christoph Oelckers 21340c6eba - floatified the rest of thingdef_codeptr.cpp and got rid of the remaining fixed_t and angle_t parameters in VM-accessed function. The VM should now be free of those types completely. 2016-03-25 12:57:22 +01:00
Christoph Oelckers b70fee8ed8 - changed the means how to control the slowdown of crushing ceilings encountering an obstacle and corrected a few mistakes in the implementation
* there is a new crushing mode 3, which means that the crusher will always slow down if it hits an obstacle.
* crushing mode 1 (Doom mode) will never slow down.
* crushing mode 0 (compatibility) will only slow down for the specials that did so before, and only if both up and downspeed are 8 and the game is not Hexen. The following specials are affected:
  * Ceiling_LowerAndCrush
  * Ceiling_LowerAndCrushDist
  * Ceiling_CrushAndRaise
  * Ceiling_CrushAndRaiseA
  * Ceiling_CrushAndRaiseDist
  * Ceiling_CrushAndRaiseSilentA
  * Ceiling_CrushAndRaiseSilentDist
* Generic_Crusher was fixed to act like in Boom: Not only a speed value of 8 will cause slowdown, but all speed values up to 24.
* Hexen crushing mode will never cause slowdowns because Hexen never did this. (which also makes no real sense, considering that the crusher waits for the obstacle to die.)
2016-03-25 02:08:22 +01:00
Christoph Oelckers f76524f459 - some cleanup on P_RailAttack plus a bit of parameter floatification in thingdef_codeptr.cpp 2016-03-25 00:59:14 +01:00
Christoph Oelckers 4d22b346f4 - floatified the remaining fixed point variables accessible through DECORATE. PROP_FIXED_PARAM is no longer used anywhere. 2016-03-24 23:50:29 +01:00
Christoph Oelckers 7a26318bf0 - floatified friction. 2016-03-24 22:50:03 +01:00
Christoph Oelckers 6c9e5b03c8 - floatified meleerange, pushfactor and radiusdamagefactor, 2016-03-24 21:31:04 +01:00
Christoph Oelckers e077510773 - floatified MaxTargetRange and MeleeThreshold. 2016-03-24 20:56:59 +01:00
Christoph Oelckers c66ff5939d - floatified AActor::bouncefactor and wallbouncefactor. 2016-03-24 20:43:35 +01:00
Christoph Oelckers 8add60ed38 - fixed: Getting the nearest ceiling height failed for height-less actors. 2016-03-24 19:24:33 +01:00
MajorCooke a9ef8cc637 Fixed A_QuakeEx falloff not working properly. 2016-03-24 19:04:51 +01:00
Christoph Oelckers 4874fe2361 Merge branch 'master' into floatcvt 2016-03-24 18:32:47 +01:00
MajorCooke c8ba6f0611 Fixed quake falloff not working in floatcvt branch. 2016-03-24 18:30:23 +01:00
Christoph Oelckers 75bcec411e - fixed: The portal blockmap's AddLineIntercepts methods needs to check the block's range. 2016-03-24 18:26:27 +01:00
Christoph Oelckers deafa0bce0 - fixed: The 'open door in 5 minutes sector type had the order of parameters wrong, due to a bad function prototype. 2016-03-24 18:01:01 +01:00
Christoph Oelckers 41387622f2 - changed angle parameter of FillSimplePoly. 2016-03-24 16:36:43 +01:00
Christoph Oelckers 5bf806e478 - renamed some fixed point stuff in the texture composition code. 2016-03-24 16:16:45 +01:00
Christoph Oelckers 86d1b2955a - floatified most of r_data (The interpolations cannot be done yet.) 2016-03-24 14:11:41 +01:00
Christoph Oelckers 09d8b4af80 - changed I_GetTimeFrac to return a double instead of a fixed_t. 2016-03-24 12:00:21 +01:00
Christoph Oelckers c83ad9df6c - removed special treatment for not using stdint.h with MSVC. Current compiler versions have this file.
- removed use of finesine for creating the player backdrop for the menu display. This mostly uses the code from the old 2.0 floating point version but fixes some of the constants in there which were not correct.
2016-03-24 11:30:11 +01:00
Christoph Oelckers eac0bfeaeb - removed fixed_t and associated utility macros from FraggleScript code. 2016-03-24 09:16:35 +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 6557f3b8c8 - floatified quake and weapon code 2016-03-23 20:45:48 +01:00
Christoph Oelckers 2dbd79cc8d - floatified the return data from Trace(). 2016-03-23 18:07:04 +01:00
Christoph Oelckers 70d87f94f2 Merge branch 'master' into floatcvt
# Conflicts:
#	src/p_acs.cpp
#	src/r_utility.cpp
#	src/thingdef/thingdef_codeptr.cpp
#	src/version.h
2016-03-23 14:15:24 +01:00
MajorCooke b16e696157 - Added offset and angle parameters to A_CheckBlock.
- Includes 2 flags, affixed by CBF_: AbsolutePos, and AbsoluteAngle.
- AbsolutePos: Absolute position of where to check.
- AbsoluteAngle: Angle parameter is used as is, not added onto the actor's current angle.
2016-03-23 14:05:31 +01:00
Christoph Oelckers 0d1fbcf65f - flattened the following commits by Major Cooke:
* Added falloff parameter to A_QuakeEx.
- Treated just like A_Explode's 'fullradiusdamage' parameter, where the quake will fall off from this distance on out to the edge. Default is 0, which means no falloff.
- Credits to MaxED and Michaelis for helping.

* - Added HighPoint parameter to QuakeEx.
- Allows fine tuning of where the quake's maximum or minimum occurs, in tics. This must be a range between [1, duration).
- For up or down scaling quakes, this sets the quake to reach maximum sooner or start minimizing later.
- For both, this indicates when the strongest will occur. Default is 0, or in the middle.

The original commits were nearly impossible to find in the convoluted commit tree, so I think it's preferable to have one clean commit instead.
2016-03-23 14:03:10 +01:00
Christoph Oelckers 7c87479eea - parameter rework of several spawning functions. 2016-03-23 13:31:12 +01:00
Christoph Oelckers f60eac8dc0 - floatified FMapThing, dropoffz and GetBobOffset 2016-03-23 12:21:52 +01:00
Christoph Oelckers f8cf4bcf3d - trimmed down the AActor Spawn interface and removed all non-float variants.
This still needs some cleanup in a few calling functions.
2016-03-23 10:42:41 +01:00
Christoph Oelckers 2a0d5a621a - floatified some stuff in g_shared.
Note: This commit does not handle z-spawn positions correctly.
2016-03-23 00:53:09 +01:00
Christoph Oelckers 301f5abadc - floatified the decal code. 2016-03-22 22:07:38 +01:00
Christoph Oelckers 6b3c0ecbd3 - floatified viewheight variables and some related code. 2016-03-22 18:06:08 +01:00
Christoph Oelckers af427b80bd - did some cleanup and consolidation on damage factor code while converting it all to floating point.
- made armor properties floating point.
2016-03-22 16:35:41 +01:00
Christoph Oelckers 1eb106e2c5 - floatification of some alpha parameters. 2016-03-22 13:35:16 +01:00
Christoph Oelckers a652c061f6 - converted g_strife to full floating point use, except the floor height changing stuff in A_LightGoesOut. 2016-03-22 12:42:27 +01:00
Christoph Oelckers 5a4b974187 - float stuff in g_raven.
- fixed some problems in previous commits.
2016-03-22 02:29:43 +01:00
Christoph Oelckers f3d6ca04fc - some floating point changes in t_func.cpp 2016-03-22 01:19:24 +01:00
Christoph Oelckers cf79e1cb6d - fixed some leftover fixed point remnants in g_hexen.
- made the full-coordinate version of P_SpawnPlayerMissile use float coordinates.
2016-03-22 00:30:56 +01:00
Christoph Oelckers 4155e84a1c - made player_t::crouchoffset and FPlayerStart's coordinates doubles and added a float version of divline_t so that I could complete the conversion of Hexen's game code.
- consolidated the actor based damage factor code which was repeated multiple times in various damage inflicting functions.
2016-03-22 00:06:58 +01:00
Christoph Oelckers c830801da3 - g_hexen almost done except for 3 things that require more extensive changes. 2016-03-21 22:20:10 +01:00
Christoph Oelckers f1602882c8 - added a no-parameter Spawn function for inventory items that never show on the map, because the coordinate and replacement parameters will always be 0 for them.
- started converting g_hexen.

Most importantly this removes CHolyWeave as it is just a specialized version of A_Weave with far more convoluted use of parameters.
2016-03-21 14:00:05 +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 b29058c1ab - converted the last fixed point remnants in g_heretic. 2016-03-21 10:24:52 +01:00
Christoph Oelckers 11e613f578 Merge branch 'master' into floatcvt
# Conflicts:
#	src/g_doom/a_revenant.cpp
2016-03-21 01:28:50 +01:00
Christoph Oelckers a66f9cbf5a - fixed: angular spread for Strife's assault gun was wrong, 2016-03-21 01:26:06 +01:00
Christoph Oelckers 2d2eeb49f0 - make weapon sprite offsets floats. 2016-03-21 01:16:34 +01:00
Christoph Oelckers 1ff4bb419c - made AActor::gravity and FMapThing::gravity floats. 2016-03-21 00:51:19 +01:00
Christoph Oelckers 7ebb96f15c - use one of the new floating point special variables to store the portal plane height of the skybox things. 2016-03-21 00:05:44 +01:00
Christoph Oelckers 289cdfbefd - made AActor::floorclip a double. 2016-03-20 23:42:27 +01:00
Randy Heit f38dbc5055 Use LHS/RHS matching for some simple SAFE_APPENDs 2016-03-20 15:57:02 -05:00
Randy Heit 071a5718cc Use /*X-overwrites-A*/ wherever X = A; appears in the grammar 2016-03-20 15:57:01 -05:00
Randy Heit c0dd39ffd4 Use %token_class to define intconst 2016-03-20 15:57:01 -05:00
Randy Heit 260cf6848f Use LHS and RHS label matching in the grammars where possible 2016-03-20 15:57:01 -05:00
Randy Heit baa6dc0568 Add zcc-parse.c and .h to the ZScript project folder 2016-03-20 15:57:00 -05:00
Christoph Oelckers afa5f22b31 - added two floating point special variables, because the two existing ones are integers and unusable for storing doubles. 2016-03-20 21:51:09 +01:00