CON: Add an optional sixth parameter, a flags bitfield, to action definitions. Bump BYTEVERSION.

git-svn-id: https://svn.eduke32.com/eduke32@5849 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-09-06 02:15:28 +00:00
parent abd1523477
commit d8ce0f042d
5 changed files with 10 additions and 5 deletions

View file

@ -106,6 +106,7 @@ enum actionparams
ACTION_VIEWTYPE,
ACTION_INCVAL,
ACTION_DELAY,
ACTION_FLAGS,
ACTION_PARAM_COUNT,
};
@ -116,6 +117,7 @@ struct action
// can be initialized by passing a table with numeric indices (con.action).
int16_t startframe, numframes;
int16_t viewtype, incval, delay;
uint16_t flags;
};
struct move

View file

@ -53,10 +53,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// increase by 3, because atomic GRP adds 1, and Shareware adds 2
#ifdef LUNATIC
// Lunatic
# define BYTEVERSION_EDUKE32 306
# define BYTEVERSION_EDUKE32 309
#else
// Non-Lua build
# define BYTEVERSION_EDUKE32 306
# define BYTEVERSION_EDUKE32 309
#endif
//#define BYTEVERSION_13 27

View file

@ -135,6 +135,7 @@ ffi.cdef[[
struct action {
int16_t startframe, numframes;
int16_t viewtype, incval, delay;
uint16_t flags;
};
struct move {

View file

@ -1898,7 +1898,7 @@ The value to add the actor's _current frame_ on each frame advance. May be --1,
0, or 1.
// In the wild, sometimes other values, too.
[[action_delay]] `[5] delay`::
[[action_delay]] `[5] delay` (default: 0)::
Roughly, the number of <<totalclock,`gv.totalclock`>> time units (120 per
second) after which a frame is advanced, at a granularity of one game tic (30
per second, corresponding to a `delay` difference of 4).footnote:[The reason
@ -1907,6 +1907,8 @@ code increments its hidden ``action tics'' counter by four (= 120/30).]
// TODO: the above can be more precise. State in terms of floor(delay/4).
`[6] flags` (default: 0)::
.Equivalent `action` definitions
==========
Each of the following calls return an action with the same public members:

View file

@ -1961,8 +1961,8 @@ local Couter = {
move = sp1 * tok.identifier * (sp1 * tok.define)^-2 -- hvel, vvel
/ function(...) Define.composite(LABEL.MOVE, ...) end,
-- startframe, numframes, viewtype, incval, delay:
action = sp1 * tok.identifier * (sp1 * tok.define)^-5 -- ACTION_PARAM_COUNT
-- startframe, numframes, viewtype, incval, delay, flags:
action = sp1 * tok.identifier * (sp1 * tok.define)^-6 -- ACTION_PARAM_COUNT
/ function(...) Define.composite(LABEL.ACTION, ...) end,
-- action, move, flags...: