Exemple #1
0
        public static byte[] readLinearBigBlockData(int hierLevel, int bigTileIndex, int tileSize)
        {
            //if tileSize == -1, try read it from config
            if (tileSize == -1)
            {
                tileSize = ConfigScript.isBlockSize4x4() ? 16 : 4;
            }

            int wordSize = ConfigScript.isUseSegaGraphics() ? 2 : 1;
            int size     = ConfigScript.getBigBlocksCount(hierLevel) * tileSize * wordSize;

            byte[] bigBlockIndexes = new byte[size];
            var    bigBlocksAddr   = ConfigScript.getBigTilesAddr(hierLevel, bigTileIndex);

            for (int i = 0; i < size; i++)
            {
                bigBlockIndexes[i] = Globals.romdata[bigBlocksAddr + i];
            }
            return(bigBlockIndexes);
        }