engine/source/openborscript/axis.c
// Use string property argument to find an
// integer property constant and populate
// varlist->lval.
Use string property argument to find an
integer property constant and populate
varlist->lval.
Use string property argument to find an integer property constant and populate varlist - > lval .
int mapstrings_axis_plane_lateral_property(ScriptVariant **varlist, int paramCount)
{
    #define ARG_MINIMUM     2   // Minimum number of arguments allowed in varlist.
    #define ARG_PROPERTY    1   // Varlist element carrying which property is requested.
    char *propname = NULL;  
    int prop;               
    static const char *proplist[] =
    {
        "x",
        "z"
    };
    if(paramCount < ARG_MINIMUM)
    {
        return 1;
    }
    MAPSTRINGS(varlist[ARG_PROPERTY], proplist, _AXIS_PLANE_LATERAL_END,
               "Property name '%s' is not supported by axis lateral plane.\n");
    return 1;
    #undef ARG_MINIMUM
    #undef ARG_PROPERTY
}
int mapstrings_axis_plane_lateral_property ( ScriptVariant * * varlist , int paramCount ) { #define ARG_MINIMUM      2   // Minimum number of arguments allowed in varlist. #define ARG_PROPERTY     1   // Varlist element carrying which property is requested. char * propname = NULL ; int prop ; static const char * proplist [ ] = { " " , " " } ; if ( paramCount < ARG_MINIMUM ) { return 1 ; } MAPSTRINGS ( varlist [ ARG_PROPERTY ] , proplist , _AXIS_PLANE_LATERAL_END , " \n " ) ; return 1 ; #undef  ARG_MINIMUM #undef  ARG_PROPERTY }
Use string property argument to find an
integer property constant and populate
varlist->lval.
Use string property argument to find an integer property constant and populate varlist - > lval .
// Placeholder for string property name from varlist. // Placeholder for integer constant located by string. // If the minimum argument count // was not passed, then there is // nothing to map. Return true - we'll // catch the mistake in property access // functions. // See macro - will return 0 on fail. // If we made it this far everything should be OK.