vn/code/vn_scene.md

35 lines
989 B
Markdown
Raw Normal View History

@table(Name, Operator) scene_operator_table:
2023-07-19 15:09:41 +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
{
`enum scene_operator`;
`{`;
@expand(scene_operator_table s) `S_Operator_$(s.Name),`;
`};`;
2023-07-19 15:09:41 +00:00
}
@table_gen
{
`inline scene_operator S_OperatorFromString(string String)`;
2023-07-19 15:09:41 +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
}