mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 01:11:28 +00:00
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:
parent
abd1523477
commit
d8ce0f042d
5 changed files with 10 additions and 5 deletions
|
@ -106,6 +106,7 @@ enum actionparams
|
||||||
ACTION_VIEWTYPE,
|
ACTION_VIEWTYPE,
|
||||||
ACTION_INCVAL,
|
ACTION_INCVAL,
|
||||||
ACTION_DELAY,
|
ACTION_DELAY,
|
||||||
|
ACTION_FLAGS,
|
||||||
ACTION_PARAM_COUNT,
|
ACTION_PARAM_COUNT,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -116,6 +117,7 @@ struct action
|
||||||
// can be initialized by passing a table with numeric indices (con.action).
|
// can be initialized by passing a table with numeric indices (con.action).
|
||||||
int16_t startframe, numframes;
|
int16_t startframe, numframes;
|
||||||
int16_t viewtype, incval, delay;
|
int16_t viewtype, incval, delay;
|
||||||
|
uint16_t flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct move
|
struct move
|
||||||
|
|
|
@ -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
|
// increase by 3, because atomic GRP adds 1, and Shareware adds 2
|
||||||
#ifdef LUNATIC
|
#ifdef LUNATIC
|
||||||
// Lunatic
|
// Lunatic
|
||||||
# define BYTEVERSION_EDUKE32 306
|
# define BYTEVERSION_EDUKE32 309
|
||||||
#else
|
#else
|
||||||
// Non-Lua build
|
// Non-Lua build
|
||||||
# define BYTEVERSION_EDUKE32 306
|
# define BYTEVERSION_EDUKE32 309
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#define BYTEVERSION_13 27
|
//#define BYTEVERSION_13 27
|
||||||
|
|
|
@ -135,6 +135,7 @@ ffi.cdef[[
|
||||||
struct action {
|
struct action {
|
||||||
int16_t startframe, numframes;
|
int16_t startframe, numframes;
|
||||||
int16_t viewtype, incval, delay;
|
int16_t viewtype, incval, delay;
|
||||||
|
uint16_t flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct move {
|
struct move {
|
||||||
|
|
|
@ -1898,7 +1898,7 @@ The value to add the actor's _current frame_ on each frame advance. May be --1,
|
||||||
0, or 1.
|
0, or 1.
|
||||||
// In the wild, sometimes other values, too.
|
// 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
|
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
|
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
|
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).
|
// TODO: the above can be more precise. State in terms of floor(delay/4).
|
||||||
|
|
||||||
|
`[6] flags` (default: 0)::
|
||||||
|
|
||||||
.Equivalent `action` definitions
|
.Equivalent `action` definitions
|
||||||
==========
|
==========
|
||||||
Each of the following calls return an action with the same public members:
|
Each of the following calls return an action with the same public members:
|
||||||
|
|
|
@ -1961,8 +1961,8 @@ local Couter = {
|
||||||
move = sp1 * tok.identifier * (sp1 * tok.define)^-2 -- hvel, vvel
|
move = sp1 * tok.identifier * (sp1 * tok.define)^-2 -- hvel, vvel
|
||||||
/ function(...) Define.composite(LABEL.MOVE, ...) end,
|
/ function(...) Define.composite(LABEL.MOVE, ...) end,
|
||||||
|
|
||||||
-- startframe, numframes, viewtype, incval, delay:
|
-- startframe, numframes, viewtype, incval, delay, flags:
|
||||||
action = sp1 * tok.identifier * (sp1 * tok.define)^-5 -- ACTION_PARAM_COUNT
|
action = sp1 * tok.identifier * (sp1 * tok.define)^-6 -- ACTION_PARAM_COUNT
|
||||||
/ function(...) Define.composite(LABEL.ACTION, ...) end,
|
/ function(...) Define.composite(LABEL.ACTION, ...) end,
|
||||||
|
|
||||||
-- action, move, flags...:
|
-- action, move, flags...:
|
||||||
|
|
Loading…
Reference in a new issue