2023-08-06 10:35:09 +00:00
|
|
|
@table(Name, Operator) scene_operator_table:
|
2023-07-19 15:09:41 +00:00
|
|
|
{
|
2023-08-06 10:35:09 +00:00
|
|
|
{ Invalid, "###" }
|
|
|
|
{ Not, "!" }
|
|
|
|
{ Equal, "=" }
|
|
|
|
{ Equals, "==" }
|
|
|
|
{ NotEquals, "!=" }
|
|
|
|
{ GreaterThanOrEquals, ">=" }
|
|
|
|
{ LessThanOrEquals, "<=" }
|
|
|
|
{ Greater, ">" }
|
|
|
|
{ Less, "<" }
|
|
|
|
{ Add, "+" }
|
|
|
|
{ Minus, "-" }
|
|
|
|
{ Multiply "*" }
|
|
|
|
{ Divide, "/" }
|
2023-07-19 15:09:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@table_gen
|
|
|
|
{
|
2023-08-06 10:35:09 +00:00
|
|
|
`enum scene_operator`;
|
|
|
|
`{`;
|
|
|
|
@expand(scene_operator_table s) `S_Operator_$(s.Name),`;
|
|
|
|
`};`;
|
2023-07-19 15:09:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@table_gen
|
|
|
|
{
|
2023-08-06 10:35:09 +00:00
|
|
|
`inline scene_operator S_OperatorFromString(string String)`;
|
2023-07-19 15:09:41 +00:00
|
|
|
`{`;
|
2023-08-06 10:35:09 +00:00
|
|
|
`scene_operator Result = S_Operator_Invalid;`;
|
|
|
|
`if(0) {}`;
|
|
|
|
@expand(scene_operator_table s) `else if(AreEqual(String, StrLit("$(s.Operator)")))$(=>40) { Result = S_Operator_$(s.Name); }`;
|
|
|
|
`return(Result);`;;
|
|
|
|
`}`;
|
2023-07-19 15:09:41 +00:00
|
|
|
}
|