Commit graph

6671 commits

Author SHA1 Message Date
Randy Heit
b1098ede93 Restore "direct" call optimization for DECORATE 2016-02-18 22:05:16 -06:00
Randy Heit
ade780d810 Redo ACustomInventory::CallStateChain to check return types 2016-02-18 22:05:10 -06:00
Randy Heit
b8a16600ac Braces around ACTION_RETURN used in an if are no longer optional 2016-02-18 21:39:13 -06:00
Randy Heit
b2ccd0bd28 Use action function return value to make state jumps happen
- The A_Jump family of action functions now return the state to jump
  to (NULL if no jump is to be taken) instead of jumping directly.
  It is the caller's responsibility to handle the jump. This will
  make it possible to use their results in if statements and
  do something other than jump.
- DECORATE return statements can now return the result of a function
  (but not any random expression--it must be a function call). To
  make a jump happen from inside a multi-action block, you must
  return the value of an A_Jump function. e.g.:
    { return A_Jump(128, "SomeState"); }
- The VMFunction class now contains its prototype instead of storing
  it at a higher level in PFunction. This is so that
  FState::CallAction can easily tell if a function returns a state.
- Removed the FxTailable class because with explicit return
  statements, it's not useful anymore.
2016-02-18 20:39:40 -06:00
coelckers
02474dd1aa Merge pull request #571 from edward-san/fast-math-nonmsvc
- Apply the fast math flags for non-MSVC, too.
2016-02-19 01:50:28 +01:00
Edoardo Prezioso
f338e5f1c4 - Apply the fast math flags for non-MSVC, too.
Move the fast flags string creation in the main cmake file and use it where needed.
2016-02-18 23:13:02 +01:00
coelckers
d61ae910b4 Merge pull request #569 from edward-san/pain-hotfix
- Revert unneeded change to the frame letter.
2016-02-18 00:24:18 +01:00
Edoardo Prezioso
f650bbfe15 - Revert unneeded change to the frame letter. 2016-02-18 00:17:07 +01:00
coelckers
1382a7af8a Merge pull request #568 from edward-san/decorate-vanilla
- More decorate fixes.
2016-02-17 21:59:45 +01:00
Christoph Oelckers
884a265d4a - refactored P_FindFloorCeiling to be portal aware and cleaned up its interface.
A big problem with this function was that some flags required setting up some variables before calling it and others did not. It will now set everything up itself so all initializations to AActor::floorz and ceilingz that were made before these calls (which were all identical to begin with) could be removed and the internal initialization logic streamlined.
2016-02-17 21:57:52 +01:00
Edoardo Prezioso
db6f534df5 - Fixed wrong Pain Elemental missile sequence. 2016-02-17 21:53:23 +01:00
Edoardo Prezioso
4ccbc65f7b - Fixed mismatching Mancubus missile sequence. 2016-02-17 21:44:33 +01:00
coelckers
854f348f8e Merge pull request #567 from Gaerzi/patch-1
fix duration according to vanilla
2016-02-17 17:09:29 +01:00
Gaerzi
ec88a30a00 fix duration according to vanilla 2016-02-17 16:08:40 +01:00
Christoph Oelckers
bd09664d85 Merge branch 'master' into portal 2016-02-17 12:37:11 +01:00
Christoph Oelckers
f2125ea420 - this needs a return value... 2016-02-17 12:36:56 +01:00
Christoph Oelckers
022ab95817 Merge branch 'master' into portal 2016-02-17 11:46:24 +01:00
Christoph Oelckers
5a779cc1f4 Merge branch 'master' of https://github.com/rheit/zdoom 2016-02-17 11:43:03 +01:00
Christoph Oelckers
42c6245a50 - restored A_CountdownArg to what it looked like before the scripting branch.
The new version did not work as expected anymore.
2016-02-17 11:42:45 +01:00
Christoph Oelckers
10a3d75556 - reviewed and adjusted ZatPoint calls in p_map.cpp. 2016-02-17 11:39:14 +01:00
Christoph Oelckers
6e4cf9699a Merge branch 'portal' of https://github.com/rheit/zdoom into portal 2016-02-17 02:21:46 +01:00
Christoph Oelckers
0948448988 - some more checking and refactoring of ZatPoint calls.
- removed Plane/Floor/CeilingAtPoint functions because they are overkill for the problem they were meant to solve. Calling ZatPoint with adjusted coordinates created with AActor::PosRelative is just as easy in the few places where this is needed.
- made P_HitWater and P_CheckSplash portal aware.
2016-02-17 02:21:26 +01:00
Christoph Oelckers
5611df1f3e - fixed the portal aware ceiling and floor functions. 2016-02-17 00:31:29 +01:00
Christoph Oelckers
fd7e6ae604 - fixed copy&paste error in LowestFloorAt. 2016-02-16 23:11:20 +01:00
Christoph Oelckers
8d53f6176e - fixed conditions for PortalBlocksView. Created a new function PortalBlocksSight that's relevant for playsim-related sight checks. 2016-02-16 22:57:03 +01:00
Christoph Oelckers
93b3982c62 Merge branch 'zmaster' into portal 2016-02-16 22:05:50 +01:00
Christoph Oelckers
6d8879f302 - missing #includes. 2016-02-16 22:04:32 +01:00
Christoph Oelckers
ae02b2fcaf - added NextHighestCeiling/NextLowestFloorAt functions. Not tested yet! 2016-02-16 21:00:34 +01:00
Christoph Oelckers
5fd6ccb970 - fixed incorrect #include. 2016-02-16 20:53:52 +01:00
Randy Heit
0f70d10521 Add 'float' and 'state' as possible return types for action functions 2016-02-16 12:09:00 -06:00
Christoph Oelckers
1b88052bba - started refactoring ZatPoint calls which need to be portal aware.
To summarize, anything that just works with map geometry doesn't need to bother, as does the renderer. (i.e. nearly all r_* files, p_floor.cpp, p_ceiling.cpp et.al)
But all calls that are somehow related to actor positions need to be made aware of potential portal transitions:

 * added FloorAtPoint, CeilingAtPoint and PlaneAtPoint methods to sector_t, which can be used to calculate a plane's height with relation to a given actor, even if that actor is on the other side of a portal.
 * added HighestCeilingAt and LowestFloorAt methods which traverse all ceiling/floor portals until they find an impassable plane.
2016-02-16 16:40:53 +01:00
Christoph Oelckers
45108e9bb8 - added two missing files to CMakeLists.txt. 2016-02-16 12:52:45 +01:00
Christoph Oelckers
22e8678903 - refactored P_CollectConnectedGroups to avoid frequent heap allocations for the common cases
* the temporary checking arrays are now static
 * the array that gets the returned values only starts allocating memory when the third touched sector group is found. The most common cases (no touched portal and one touched portal) can be handled without accessing the heap.

- did some streamlining of AActor::LinkToSector:

 * there's only now version of this function that can handle everything
 * moved the FIXMAPTHINGPOS stuff into a separate function.
 * removed LinkToWorldForMapThing and put all special handling this function did into P_PointInSectorBuggy.
2016-02-16 12:51:10 +01:00
Christoph Oelckers
b9037ef3ee - added a check to detect self-referencing sectors in the portal setup code because those are problem cases. 2016-02-15 21:49:46 +01:00
Christoph Oelckers
f24bf7e622 - separated FCheckPosition and its FPortalGroupTable substructure into its own header because this was creating too many dependencies on other headers with FCheckPosition in p_local.h and FPortalGroupTable in portals.h. 2016-02-15 13:40:31 +01:00
Christoph Oelckers
5664cee2e5 - fixed: The check for leftover portal sectors was not correct. It only checked the sectors the portal thing was in and those were already processed in the first phase.
- improved: If there's an offset mismatch, do not print group numbers as they are utterly meaningless. Instead look for a sector in each group and report those.
- added a copyright notice and some comments to portals.cpp.
2016-02-15 12:35:40 +01:00
Christoph Oelckers
afc631b537 - this wasn't saved for last night's commit. 2016-02-15 09:25:48 +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
0dce22ce85 - some portal considerations. 2016-02-14 21:02:18 +01:00
Christoph Oelckers
5af53c0e62 - fixed a few more sector movers which calculated their movement at (0,0) instead of inside the sector. 2016-02-14 18:53:00 +01:00
Christoph Oelckers
126c80d597 - create the portal group table. 2016-02-14 18:16:59 +01:00
Christoph Oelckers
c338b9cde3 - some more portal preparation . 2016-02-14 16:26:27 +01:00
Christoph Oelckers
d5a1004c41 - some preparations for portal stuff:
* set up linked sector portals so that everything that will eventually have to be considered is present, even though the software renderer currently can't handle those adequately.
* tag all skybox things with a type so that they can easily be distinguished at run time.
* fill in the linked portal types in xlat/eternity.txt.
2016-02-14 13:12:03 +01:00
Christoph Oelckers
993a840630 - bring formatting in line with GZDoom's version of this function. 2016-02-14 12:33:47 +01:00
Christoph Oelckers
a5f6c6c747 Updated console font by GFD. 2016-02-14 09:27:20 +01:00
Christoph Oelckers
e42dbb5087 Merge branch 'master' of https://github.com/rheit/zdoom
# Conflicts:
#	src/sound/oalsound.cpp
2016-02-13 14:56:03 +01:00
Christoph Oelckers
340faef1ec - fixed a few 64-bit warnings. 2016-02-13 13:37:28 +01:00
coelckers
71f230dc08 Merge pull request #561 from alexey-lysiuk/openal_numsources
Handle inability of OpenAL to return number of sources
2016-02-13 12:44:56 +01:00
alexey.lysiuk
ce8b2974a3 Handle inability of OpenAL implementation to return number of available sources
OpenAL specification doesn't require alcGetIntegerv() to return meaningful values for ALC_MONO_SOURCES and ALC_MONO_SOURCES.
At least Apple's OpenAL implementation returns zeroes, although it can generate reasonable number of sources.
2016-02-13 11:11:02 +02:00