private void LoadSpreadsheet( byte[] table, string path, params string[] tileColumns ) { Spreadsheet ss = new Spreadsheet( path ); int[] tileCIDs = new int[tileColumns.Length]; for ( int i = 0; i < tileColumns.Length; ++i ) tileCIDs[i] = ss.GetColumnID( tileColumns[i] ); int featureCID = ss.GetColumnID( "FeatureMask" ); for ( int i = 0; i < ss.Records.Length; ++i ) { DataRecord record = ss.Records[i]; byte fid = (byte) record.GetInt32( featureCID ); for ( int j = 0; j < tileCIDs.Length; ++j ) { int itemID = record.GetInt32( tileCIDs[j] ); if ( itemID <= 0 || itemID >= table.Length ) continue; table[itemID] = fid; } } }
public DataRecord( Spreadsheet ss, object[] data ) { m_Spreadsheet = ss; m_Data = data; }