All pastes #826181 Raw Edit

Something

public text v1 · immutable
#826181 ·published 2007-12-21 01:24 UTC
rendered paste body
            UnmanagedExposed.Coll* coll = (UnmanagedExposed.Coll*)room.pColl;

            int posX = ((int)coll->dwPosGameX - (level.dwPosX * 5));
            int posY = ((int)coll->dwPosGameY - (level.dwPosY * 5));

            int sizeX = (int)coll->dwSizeGameX;
            int sizeY = (int)coll->dwSizeGameY;

            this.CollisionGraph = new UInt16[sizeX, sizeY];

            UInt16* data = coll->pMapStart;

            for (int y = 0; y < sizeY; y++)
            {
                for (int x = 0; x < sizeX; x++)
                {
                    this.CollisionGraph[x, y] = *data;

                    data++;
                }
            }

            this.Position = new Position(posX, posY, sizeX, sizeY);