#define IsValidMaterialIndex(%0) \ (%0 >= 0 && %0 < MAX_OBJECT_INDEX)