use nested map for SDF names to save stack space.

Update semantics of the SDF array to (row, column) form to match
the picker space

Fix #674
This commit is contained in:
2025-03-05 09:24:50 -06:00
committed by Celtic Minstrel
parent 3d48cb14e7
commit 90d5e1b778
8 changed files with 52 additions and 38 deletions

View File

@@ -968,10 +968,10 @@ void readScenarioFromXml(ticpp::Document&& data, cScenario& scenario) {
} else if(type == "sdf") {
int row, col;
edit->GetAttribute("row", &row);
if(row < 0 || row >= scenario.sdf_names.size())
if(row < 0 || row >= SDF_ROWS)
throw xBadVal(type, "row", std::to_string(row), edit->Row(), edit->Column(), fname);
edit->GetAttribute("col", &col);
if(col < 0 || col >= scenario.sdf_names[0].size())
if(col < 0 || col >= SDF_COLUMNS)
throw xBadVal(type, "col", std::to_string(col), edit->Row(), edit->Column(), fname);
edit->GetText(&scenario.sdf_names[row][col]);
} else if(type == "graphics") {