Condition Flags
and Parameter Types
Flags
- 0: (No flags) This flag (or rather lack
of flags) tells MMF not to bother with events with this
condition until a run-time event is generated by a call
of callRunTimeFunction(rdPtr,
RFUNCTION_GENERATEEVENT, Condition Code, 0). Calling
this will cause MMF to stop what it's doing and
immediately test events (and execute if conditions are
all true) containing the specified condition.
- EVFLAGS_ALWAYS: This flag tells MMF to
test events (and execute if conditions are all true) with
this condition (assuming all conditions for the event use
the EVFLAGS_ALWAYS flag) every program loop.
- EVFLAGS_ALWAYS+EVFLAGS_NOTABLE: These
flags tell MMF to test events (and execute if conditions
are all true) with this condition (assuming all
conditions for the event use the EVFLAGS_ALWAYS flag)
every program loop. In addition, conditions with these
flags can be negated.
Parameter Types
- PARAM_EXPRESSION: This parameter type
tells MMF to get a number (either an integer or a float)
from the user.
- PARAM_COMPARISON: This parameter type
tells MMF to get a number and a comparison type from the
user. The condition routine in this case should return a
long value to be compared to the value entered by the
user. MMF handles the actual comparison.
- PARAM_EXPSTRING: This parameter type
tells MMF to get a string from the user. To the condition
routine, MMF passes a pointer to the string.
- PARAM_CMPSTRING: This parameter type
tells MMF to get a string and a comparison type from the
user. The condition routine in this case should return a
pointer (type-catsed as a long) to the string to be
compared to the value entered by the user. MMF handles
the actual comparison.
- PARAM_TIME: This parameter type tells
MMF to get a time from the user using the seconds/minutes
selector. To the condition routine, MMF passes a long
value representing the selected time in milliseconds.
- PARAM_CMPTIME: This parameter type tells
MMF to get a time value and a comparison type from the
user. The condition routine in this case should return a
long value (the time in milliseconds) to be compared to
the time entered by the user. MMF handles the actual
comparison.
- PARAM_BORDER: This parameter type tells
MMF to get borders from the user using the border
selector. To the condition routine, MMF passes a value
with the selected border flags:
#define BORDER_LEFT 1
#define BORDER_RIGHT 2
#define BORDER_TOP 4
#define BORDER_BOTTOM 8
- PARAM_PLAYER: This parameter type tells
MMF to get a player from the user using the player
selector. To the condition routine, MMF passes a short
value containing a number from 0 to 3.
- PARAM_KEY: This parameter type tells MMF
to get a key from the user by asking the user to press a
key. To the condition routine, MMF passes a short value
containing the virtual key code of the chosen key.
- PARAM_SPEED: This parameter type tells
MMF to get a speed from the user using the speed selector.
To the condition routine, MMF passes a short value
containing a number from 0 to 100.
- PARAM_POSITION: This parameter type
tells MMF to get an (x,y) position from the user using
the position selector. To the condition routine, MMF
passes a long value with the hiword containing the X fram
position and a loword containing the Y frame position.
- PARAM_JOYDIR: This parameter type tells
MMF to get a joystick state from the user using the
joystick state selector. To the condition routine, MMF
passes a short value with each byte set equal to:
DIRID_S: south
DIRID_N: north
DIRID_E: east
DIRID_W: west
FIRE1: fire button one
FIRE2: fire button two
- PARAM_ZONE: This parameter type tells
MMF to get a zone from the user using the zone selector.
To the condition routine, MMF passes a pointer to a short
rectangle structure:
typedef
{
short left;
short top;
short right;
short bottom;
} SRECT;
- PARAM_COLOUR: This parameter type tells
MMF to get a color from the user using the color selector.
To the condition routine, MMF passes a long value
containing the RGB value of the color.
- PARAM_NEWDIRECTION: This parameter type
tells MMF to get a direction from the user using the
direction selector. To the condition routine, MMF passes
a long value containing a number from 0 to 31 indicating
the chosen direction.
- PARAM_CLICK: This parameter type tells
MMF to get a click type from the user using the click
type selector. To the condition routine, MMF passes a
long value whose low-order bytes represents the button (0
= left, 1 = middle, 2 = right) with the PARAMCLICK_DOUBLE
(0x0100 or 256) flag set for double-clicks.
- PARAM_FILENAME: This parameter type
tells MMF to get a file path from the user using the file
selector. To the condition routine, MMF passes a pointer
to the pathname. You can set the title and filter for the
file selector. Consult the MMF SDK help files on how to
do that.
Back to Main Page