Beispiel #1
0
 public unsafe static CellType GetCellType(this Trinity.Storage.LocalMemoryStorage storage, long CellID)
 {
     //int idx;
     //int size;
     //byte* ptr = storage.GetLockedUnsafeCellLocation(CellID, out size, out idx);
     //if (ptr == null)
     //    throw new Exception(string.Format("Cell #{0} doesn't exist.", CellID));
     //CellType ret = (CellType)(*ptr);
     //storage.ReleaseCellLock(CellID, idx);
     //return ret;
     return((CellType)storage.GetCellType(CellID));
 }
Beispiel #2
0
 public unsafe static bool IsSSSPCell(this Trinity.Storage.LocalMemoryStorage storage, long CellID)
 {
     //int idx;
     //int size;
     //byte* ptr = storage.GetLockedUnsafeCellLocation(CellID, out size, out idx);
     //if (ptr == null)
     //    throw new Exception(string.Format("Cell #{0} doesn't exist.", CellID));
     //bool ret = *ptr == (byte)CellType.SSSPCell;
     //storage.ReleaseCellLock(CellID, idx);
     //return ret;
     return(storage.GetCellType(CellID) == (ushort)CellType.SSSPCell);
 }