| 11 | namespace crown |
| 12 | { |
| 13 | void LuaStack::push_args(const ArgType::Enum *arg_types, const Arg *args, u32 num) |
| 14 | { |
| 15 | for (u32 i = 0; i < num; ++i) { |
| 16 | switch (arg_types[i]) { |
| 17 | case ArgType::NIL: push_nil(); break; |
| 18 | case ArgType::INT: push_int(args[i].int_value); break; |
| 19 | case ArgType::BOOL: push_bool(args[i].bool_value); break; |
| 20 | case ArgType::FLOAT: push_float(args[i].float_value); break; |
| 21 | case ArgType::STRING: push_string(args[i].string_value); break; |
| 22 | case ArgType::STRING_ID: push_string_id(StringId32(args[i].string_id_value)); break; |
| 23 | case ArgType::POINTER: push_pointer((void *)args[i].pointer_value); break; |
| 24 | case ArgType::FUNCTION: push_function(args[i].cfunction_value); break; |
| 25 | case ArgType::UNIT: push_unit(args[i].unit_value); break; |
| 26 | case ArgType::ID: push_id(args[i].id_value); break; |
| 27 | case ArgType::VECTOR3: push_vector3(args[i].vector3_value); break; |
| 28 | case ArgType::QUATERNION: push_quaternion(args[i].quaternion_value); break; |
| 29 | case ArgType::MATRIX4X4: push_matrix4x4(args[i].matrix4x4_value); break; |
| 30 | default: CE_FATAL("Unknown argument type"); break; |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | bool LuaStack::is_vector3(int i) |
| 36 | { |
no test coverage detected