public void load() { //Palettes int palCount = ROM.LZ77_GetDecompressedSize(PalFile.getContents()) / 512; palettes = new Palette[palCount]; LZFile PalFileLz = new LZFile(PalFile, LZFile.CompressionType.LZ); for (int i = 0; i < palCount; i++) { palettes[i] = new FilePalette(new InlineFile(PalFileLz, i * 512, 512, "Palette " + i)); } //Graphics graphics = new Image2D(GFXFile, 256, false); //Map16 map16 = new Map16Tilemap(Map16File, 32, graphics, palettes, Map16TileOffset, Map16PaletteOffset); Overrides = new short[map16.getMap16TileCount()]; Map16Buffer = map16.render(); /* * TilemapEditorTest t = new TilemapEditorTest(); * t.load(map16); * t.Show(); */ //Tile Behaviors loadTileBehaviors(); //Objects loadObjects(); /* // Finally, load overrides * if (overrideFlag) * { * UseOverrides = true; * OverrideBitmap = Properties.Resources.tileoverrides; * * Overrides = new short[Map16.Length]; * EditorOverrides = new short[Map16.Length]; * * for (int idx = 0; idx < Map16.Length; idx++) * { * Overrides[idx] = -1; * EditorOverrides[idx] = -1; * } * }*/ }
public void load() { //Palettes int palCount = ROM.LZ77_GetDecompressedSize(PalFile.getContents()) / 512; palettes = new Palette[palCount]; for(int i = 0; i < palCount; i++) palettes[i] = new FilePalette(new InlineFile(PalFile, i*512, 512, "Palette "+i, null, InlineFile.CompressionType.LZComp)); //Graphics graphics = new Image2D(GFXFile, 256, false); //Map16 map16 = new Map16Tilemap(Map16File, 32, graphics, palettes, Map16TileOffset, Map16PaletteOffset); Overrides = new short[map16.getMap16TileCount()]; Map16Buffer = map16.render(); /* TilemapEditorTest t = new TilemapEditorTest(); t.load(map16); t.Show(); */ //Tile Behaviors loadTileBehaviors(); //Objects loadObjects(); /* // Finally, load overrides if (overrideFlag) { UseOverrides = true; OverrideBitmap = Properties.Resources.tileoverrides; Overrides = new short[Map16.Length]; EditorOverrides = new short[Map16.Length]; for (int idx = 0; idx < Map16.Length; idx++) { Overrides[idx] = -1; EditorOverrides[idx] = -1; } }*/ }