| 1568 | } |
| 1569 | |
| 1570 | void MapEditor::ApplyScriptParams(const ScriptParamMap& spm, int id) { |
| 1571 | if (id == LEVEL_PARAM_ID) { |
| 1572 | if (!testScriptParamsEqual(spm, scenegraph_->level->script_params().GetParameterMap())) { |
| 1573 | SceneGraph::ApplyScriptParams(scenegraph_, spm); |
| 1574 | QueueSaveHistoryState(); |
| 1575 | } |
| 1576 | } else { |
| 1577 | Object* obj = scenegraph_->GetObjectFromID(id); |
| 1578 | if (obj) { |
| 1579 | const ScriptParamMap& new_spm = spm; |
| 1580 | ScriptParamMap::iterator iter; |
| 1581 | |
| 1582 | if (!testScriptParamsEqual(new_spm, obj->GetScriptParamMap())) { |
| 1583 | obj->SetScriptParams(new_spm); |
| 1584 | QueueSaveHistoryState(); |
| 1585 | } |
| 1586 | } |
| 1587 | } |
| 1588 | } |
| 1589 | |
| 1590 | OGPalette* MapEditor::GetPalette(int id) { |
| 1591 | Object* obj = scenegraph_->GetObjectFromID(id); |
nothing calls this directly
no test coverage detected