| 469 | } |
| 470 | |
| 471 | void ScriptEngine::exportScriptEngine(json& j) |
| 472 | { |
| 473 | auto& dat = m_pVM->getDATFile(); |
| 474 | |
| 475 | // Walk the symtable and find any non-const integer without any flags |
| 476 | // Just like the original! |
| 477 | |
| 478 | json& symbols = j["globals"]; |
| 479 | |
| 480 | for (auto& sym : dat.getSymTable().symbols) |
| 481 | { |
| 482 | // Only flat integers |
| 483 | if (sym.properties.elemProps.flags == 0 && sym.properties.elemProps.type == Daedalus::EParType_Int) |
| 484 | { |
| 485 | // Write arrays in order |
| 486 | for (int32_t i : sym.intData) |
| 487 | symbols.push_back({sym.name, i}); |
| 488 | } |
| 489 | } |
| 490 | } |
| 491 | |
| 492 | void ScriptEngine::importScriptEngine(const json& j) |
| 493 | { |
no test coverage detected