Commit graph

7213 commits

Author SHA1 Message Date
Randy Heit
e7b9e7e955 Rename A_Int/A_Bool/A_State to int/bool/state
- This is an effort to emphasize that these are just type casts. Now they
  look like function-style casts with no action function styling.
  They do no magic joojoo at all. The only reason they exist is because
  the DECORATE parser can only parse return statements that call a
  function, so these satisfy that requirement. i.e. *return int(666);* is
  identical to *return 666;* (if the parser could handle the latter).
2016-02-20 22:05:17 -06:00
Randy Heit
cab39973df Add PARAM_STATE_NOT_NULL for the A_Jump* functions
- Now that state jumps are handled by returning a state, we still need a
  way for them to jump to a NULL state. If the parameter processed by this
  macro turns out to be NULL, Actor's 'Null' state will be substituted
  instead, since that's something that can be jumped to.
2016-02-20 21:52:29 -06:00
Randy Heit
5e298173f7 Redo ACTION_RETURN macros so they can be treated like return statements 2016-02-20 21:34:58 -06:00
Randy Heit
81314a6cd6 Revert "- fixed a few occurences where ACTION_RETURN_* eliminated the side effect of its argument when no return value was requested."
This reverts commit 7ede77c1d2.
2016-02-20 21:27:42 -06:00
Christoph Oelckers
26967bd0ee - migrated P_PlayerStartStomp to FMultiThingIterator.
Note: This replaces AActor::intersects with a direct calculation. Although that function could be adjusted it'd mean some redundant distance calculations which are easily avoided.
2016-02-21 00:21:42 +01:00
Christoph Oelckers
f8a8d8eed2 - fixed use of wrong position variable in P_TeleportMove's thing iterator. 2016-02-21 00:21:42 +01:00
Christoph Oelckers
58fcd8d742 - implemented the FMultiBlockThingsIterator and converted P_TeleportMove to use it. 2016-02-21 00:21:41 +01:00
m-x-d
d2630dee8c Fixed: warp and warp2 texture effects now work for NPo2 textures. 2016-02-20 21:45:09 +01:00
MaxED
1ba526d4de Added #region / #endregion handling (should affect all text lumps, let me know if there are text lumps unaffected by this). 2016-02-20 21:45:08 +01:00
nukeykt
4b0aac9816 Backport OPL2 KSL table fix from MAME v0.150. 2016-02-20 20:08:02 +01:00
John Palomo Jr
92697659be Expose SafeCommand confirmation string to language. 2016-02-20 20:04:30 +01:00
John Palomo Jr
c557c463e4 Converted all of the strings in menudef into language strings. 2016-02-20 20:04:29 +01:00
alexey.lysiuk
7b49d9d92c Fixed crash when accessing undefined user variable
Presence of DECORATE user variable was not checked before attempting to read or write its value from ACS
2016-02-20 20:02:32 +01:00
Christoph Oelckers
b8f8daf1c1 - fixed:In P_ChangeSector, floorOrCeil==2 means that only 3D midtextures moved. This means that
* no 3D floor movement can take place
 * no portal changes can occur.
2016-02-20 15:52:19 +01:00
Edoardo Prezioso
166687d971 - Added optional 'z' parameter to the 'warp' CCMD.
Now it's possible to warp above 3dfloors.
2016-02-20 13:32:27 +01:00
Christoph Oelckers
7ede77c1d2 - fixed a few occurences where ACTION_RETURN_* eliminated the side effect of its argument when no return value was requested.
This macro should not be used on function calls that actually perform an action aside from calculating the return value!
2016-02-20 13:13:53 +01:00
Edoardo Prezioso
85fbcf0428 - Improve CMake messages for zlib/jpeg/bzip2/gme.
* Report the include location if they're external libraries;
* Remove unneeded include location messages from zipdir.
2016-02-20 11:38:30 +01:00
Edoardo Prezioso
d1502b1086 - Simplify expressions inside some else/endif.
We aren't bound to old cmake anymore.
2016-02-20 11:38:30 +01:00
Edoardo Prezioso
3dcc6d0330 [fmod] Improve the checks for fmod 4.44.
- The FMOD 4.44 linux package contains both 32 and 64-bit versions, with the folder name without the '64' suffix for 64-bit.
- Add minor version '61' so that the latest FMOD package (at the time of this commit) can be detected and compiled successfully.
2016-02-20 11:38:29 +01:00
Edoardo Prezioso
ef76ab87e7 [gdtoa] The C compiler is used, not C++. 2016-02-20 11:38:29 +01:00
Edoardo Prezioso
cb9fa6af6c [gme] Enable all the USE_GME_* by default.
Change these options to be just internal variables, not changeable from outside by the user.
2016-02-20 11:38:29 +01:00
Edoardo Prezioso
0ea39f2dfd [dumb] Check the C compiler, not C++.
Simplify the 'endif' expression, too.
2016-02-20 11:38:29 +01:00
Edoardo Prezioso
a7df6ad42d - Simplify CMake 'else() if(..)' to 'elseif(..)'. 2016-02-20 11:38:29 +01:00
galtgendo
71f66aa912 look for gme header in the proper location
[EP] Cherry-picked from gzdoom fork.
2016-02-20 11:38:29 +01:00
Randy Heit
c3432a1ddb Fix CustomInventory never succeeding
- A != should have been ==.
2016-02-19 22:09:35 -06:00
Christoph Oelckers
cfbb3bcbb2 - completed work on P_FindFloorCeiling and all functions it calls.
Note: The debug output is left in so that in cases of an error it can still be used.
2016-02-20 02:22:10 +01:00
Christoph Oelckers
d876a95152 - set floor and ceiling sector when it comes from a 3D floor.
There's code in p_mobj.cpp which needs this to pick the correct plane.
2016-02-20 02:22:09 +01:00
Christoph Oelckers
6132f6971a - added support for FFCF_NOPORTALS and FFCF_3DRESTRICT to FindNextLowestFloorAt and FindNextHighestCeilingAt
- use these functions in P_GetFloorCeiling instead of duplicating all this code.
- removed some debug CCMDs.
2016-02-20 02:22:09 +01:00
Christoph Oelckers
dc37f78566 - fixed: Old portal data must be deleted before loading a new level. 2016-02-20 02:22:09 +01:00
Christoph Oelckers
cb0e7c6ca5 - fixed some issues with P_FindFloorCeiling rework. 2016-02-20 02:22:08 +01:00
Randy Heit
4770dc2dfb Fix improper detection of if statements returning 2016-02-19 16:38:30 -06:00
Randy Heit
80d49d6bb9 Fix crash when parsing an empty action list for DECORATE 2016-02-19 16:31:53 -06:00
Christoph Oelckers
28799c4b51 - some logic fixes in FMultiBlockLinesIterator. 2016-02-19 16:13:36 +01:00
Christoph Oelckers
02d7572343 - some header dependency cleanup so that it is no longer needed to include portal.h to get the inline functions. Portal.h has been reduced of most dependencies now so that including it is cheap and can be done in other headers.
- some consolidation in p_map.cpp. PIT_CheckLine and PIT_FindFloorCeiling had quite a bit of redundancy which has been merged.
- Ĩontinued work on FMultiBlockLinesIterator. It's still not completely finished.
2016-02-19 14:08:41 +01:00
Christoph Oelckers
15040c955e Merge branch 'master' into portal 2016-02-19 10:40:07 +01:00
Christoph Oelckers
3841a5f626 - implemented FMultiBlockLinesIterator for checking a position across portals. This is not fully tested yet. 2016-02-19 10:39:40 +01:00
Randy Heit
a31bd78abe Fix definitions of A_State/A_Int/A_Bool
- These aren't action functions, so PARAM_ACTION_PROLOGUE is
  inappropriate.
2016-02-19 00:29:19 -06:00
Randy Heit
cb0fd5967f Oops. Had FxCastStateToBool backwards. 2016-02-18 22:53:18 -06:00
Randy Heit
a399f40e5f Support casting states to booleans
- This is so that you can call an A_Jump-type function from inside an if
  statement and do something other than jump if the jump condition was
  met. e.g.

    {
        if (A_Jump(128, "Foo"))
	{
            A_Log("The function would have jumped");
	}
	else
	{
	    A_Log("The function would not have jumped");
	}
    }
2016-02-18 22:40:04 -06:00
Randy Heit
aa58c5f519 Declare VMFunction::Proto to the garbage collector 2016-02-18 22:26:37 -06:00
Randy Heit
eace79ccad Add some functions for use with DECORATE return
- Since DECORATE's return statement can only return the results of
  function calls (I do not want to spend the time necessary to make it
  return arbitrary expressions), here are three functions to get around
  this limitation:
  * A_State - Returns the state passed to it. You can simulate A_Jump
    functions with this.
  * A_Int - Returns the int passed to it.
  * A_Bool - Returns the bool passed to it.
- e.g. If you want to return the number 3, you use this:

    return A_Int(3);

  If you want to jump to a different state, you use this:

    return A_State("SomeState");
2016-02-18 22:15:03 -06:00
Randy Heit
fbbaae781b Merge remote-tracking branch 'origin/master' 2016-02-18 22:05:40 -06:00
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