if(entries.ContainsKey(s)){//TODO: is this a proper behaviour?
entries[s]=data;
}else{
entries.Add(s,data);
}
}
//reset local data
modelName=string.Empty;
prevToken=string.Empty;
spriteNames.Clear();
}
break;
}elseif(token=="overridepalette"){
data.OverridePalette=true;
}elseif(token=="angleoffset"){
SkipWhitespace(true);
token=StripTokenQuotes(ReadToken());
if(token!="="){
General.ErrorLogger.Add(ErrorType.Error,"Error in "+sourcefilename+" at line "+GetCurrentLineNumber()+": expected '=', but got '"+token+"'");
break;
}
floatangleOffset=0;//90?
token=StripTokenQuotes(ReadToken());
if(!ReadSignedFloat(token,refangleOffset)){
// Not numeric!
General.ErrorLogger.Add(ErrorType.Error,"Error in "+sourcefilename+" at line "+GetCurrentLineNumber()+": expected AngleOffset value, but got '"+token+"'");
}
data.AngleOffset=Angle2D.DegToRad(angleOffset);
}elseif(token=="scale"){
SkipWhitespace(true);
token=StripTokenQuotes(ReadToken());
if(token!="="){
General.ErrorLogger.Add(ErrorType.Error,"Error in "+sourcefilename+" at line "+GetCurrentLineNumber()+": expected '=', but got '"+token+"'");
break;
}
floatscale=1.0f;
token=StripTokenQuotes(ReadToken());
if(!ReadSignedFloat(token,refscale)){
// Not numeric!
General.ErrorLogger.Add(ErrorType.Error,"Error in "+sourcefilename+" at line "+GetCurrentLineNumber()+": expected Scale value, but got '"+token+"'");