Index = NewObject ( objectmap, Name ) Add a new object to the objectmap called Name and return it's index.
0001 function objectmap = NewObject ( objectmap, Name ) 0002 % Index = NewObject ( objectmap, Name ) 0003 % Add a new object to the objectmap called Name and return it's index. 0004 0005 Index = length ( objectmap.Objects ) + 1; 0006 if length(Name) > 31 0007 Name = Name(1:31); 0008 end 0009 objectmap.Objects(Index) = DefaultObject ( Name ); 0010 objectmap.NumberOfObjects = length ( objectmap.Objects ); 0011 return 0012 0013