176177178179180181182183184185186
if (swapxy) { index = i + j * size; } else { index = (i * size) + j; } heightData[index] = dis.readUnsignedShort(); } } dis.close(); } else { DataInputStream dis = new DataInputStream(bis);
192193194195196197198199200201202
index = i + j * size; } else { index = (i * size) + j; } if (format == RawHeightMap.FORMAT_16BITBE) { heightData[index] = dis.readUnsignedShort(); } else { heightData[index] = dis.readUnsignedByte(); } } }