BananaMpq.Layer.AdtRelated.ChunkLiquid.ParseExistsTable C# (CSharp) 메소드

ParseExistsTable() 개인적인 메소드

private ParseExistsTable ( byte mh2oChunk, SMLiquidInstance instance ) : void
mh2oChunk byte
instance SMLiquidInstance
리턴 void
        private unsafe void ParseExistsTable(byte* mh2oChunk, SMLiquidInstance* instance)
        {
            if (instance->existsTable != 0 && UseExistsTable(instance->liquidObjectId, instance->liquidType))
            {
                var table = mh2oChunk + instance->existsTable;
                ExistsTable = new bool[TilesPerRow, TilesPerRow];
                for (int x = MinX; x < MaxX; x++)
                {
                    for (int y = MinY; y < MaxY; y++)
                    {
                        int index = y*(MaxX - MinX) + x;
                        ExistsTable[y, x] = (table[index/8] & (1 << (index & 7))) != 0;
                    }
                }
            }
            else
            {
                ExistsTable = FullExistsTable;
            }
        }