581 |
* complexity inside the sampler engines which provide the actual script |
* complexity inside the sampler engines which provide the actual script |
582 |
* functionalities. |
* functionalities. |
583 |
*/ |
*/ |
584 |
#define DECLARE_VMINT(basePtr, T_struct, T_member) ( \ |
#define DECLARE_VMINT(basePtr, T_struct, T_member) ( \ |
585 |
(VMRelPtr) { \ |
/* Disable offsetof warning, trust us, we are cautios. */ \ |
586 |
(void**) &basePtr, \ |
_Pragma("GCC diagnostic push") \ |
587 |
offsetof(T_struct, T_member), \ |
_Pragma("GCC diagnostic ignored \"-Winvalid-offsetof\"") \ |
588 |
false \ |
(VMRelPtr) { \ |
589 |
} \ |
(void**) &basePtr, \ |
590 |
) \ |
offsetof(T_struct, T_member), \ |
591 |
|
false \ |
592 |
|
} \ |
593 |
|
_Pragma("GCC diagnostic pop") \ |
594 |
|
) \ |
595 |
|
|
596 |
/** |
/** |
597 |
* Same as DECLARE_VMINT(), but this one defines the VMIntRelPtr and |
* Same as DECLARE_VMINT(), but this one defines the VMIntRelPtr and |
607 |
* @see ScriptVM::builtInConstIntVariables() |
* @see ScriptVM::builtInConstIntVariables() |
608 |
*/ |
*/ |
609 |
#define DECLARE_VMINT_READONLY(basePtr, T_struct, T_member) ( \ |
#define DECLARE_VMINT_READONLY(basePtr, T_struct, T_member) ( \ |
610 |
(VMRelPtr) { \ |
/* Disable offsetof warning, trust us, we are cautios. */ \ |
611 |
(void**) &basePtr, \ |
_Pragma("GCC diagnostic push") \ |
612 |
offsetof(T_struct, T_member), \ |
_Pragma("GCC diagnostic ignored \"-Winvalid-offsetof\"") \ |
613 |
true \ |
(VMRelPtr) { \ |
614 |
} \ |
(void**) &basePtr, \ |
615 |
) \ |
offsetof(T_struct, T_member), \ |
616 |
|
true \ |
617 |
|
} \ |
618 |
|
_Pragma("GCC diagnostic pop") \ |
619 |
|
) \ |
620 |
|
|
621 |
/** @brief Built-in VM 8 bit integer array variable. |
/** @brief Built-in VM 8 bit integer array variable. |
622 |
* |
* |
716 |
* @param expr - new value to be assigned to this variable |
* @param expr - new value to be assigned to this variable |
717 |
*/ |
*/ |
718 |
void assignExpr(VMExpr* expr) OVERRIDE {} |
void assignExpr(VMExpr* expr) OVERRIDE {} |
719 |
|
|
720 |
|
virtual ~VMDynVar() {} |
721 |
}; |
}; |
722 |
|
|
723 |
/** @brief Dynamically executed variable (of integer data type). |
/** @brief Dynamically executed variable (of integer data type). |