this.tileAddress = HackModule.toRegPointer(hm.rom.readMulti( 0x2F125B + (num * 4), 4)); this.tilesChanged = tileAddress > 0x3001ff;
        private boolean readTiles()        {            this.tileAddress = HackModule.toRegPointer(hm.rom.readMulti(                0x2F125B + (num * 4), 4));            this.tilesChanged = tileAddress > 0x3001ff;            // System.out.println(            // "About to read tileset #"            // + num            // + " tiles from 0x"            // + Integer.toHexString(tileAddress));            byte[] buffer = new byte[28673]; // int[] to decompress into            int[] tmp;            if ((tmp = hm.decomp(tileAddress, buffer, 28673))[0] != 28673)            {                System.out.println("Error bad compressed data on tileset #"                    + num + " tiles. (" + tmp[0] + ")");                // if (tmp[0] < 0)                // return false;            }            tileOldCompLen = tmp[1];            tiles = new byte[1024][8][8];            tileloop: for (int t = 0; t < 1024; t++)            {                try                {                    read4BPPArea(this.tiles[t], buffer, t * 32, 0, 0);                }                catch (ArrayIndexOutOfBoundsException e)                {                    break tileloop;                    // if the array has ended, there's nothing left to do                }            }            if (tmp[0] == 28673)                return true;            else                return false;        }