void InitClassMap(FClassMap &themap, SpawnMap &thedata) { themap.Clear(); SpawnMap::Iterator it(thedata); SpawnMap::Pair *pair; int error = 0; while (it.NextPair(pair)) { PClassActor *cls = NULL; if (pair->Value.classname != NAME_None) { cls = PClass::FindActor(pair->Value.classname); if (cls == NULL) { Printf(TEXTCOLOR_RED "Script error, \"%s\" line %d:\nUnknown actor class %s\n", pair->Value.filename.GetChars(), pair->Value.linenum, pair->Value.classname.GetChars()); error++; } themap.Insert(pair->Key, cls); } else { themap.Remove(pair->Key); } } if (error > 0) { I_Error("%d unknown actor classes found", error); } thedata.Clear(); // we do not need this any longer }
void ClearStrifeTypes() { StrifeTypes.Clear(); }