Jump to content

Inserting an Animation


Recommended Posts

i have no idea what that error message means

show me your frames

// Constructor accepting file path to a serialized dump that contains
// relative references to the frame data as a binary dump and the
// sheets as PNG images
@SuppressWarnings("unchecked")
public PortableClassAnimation(File path) throws Exception {
	String parent = path.getParent() + File.separator;
	ObjectInputStream serializedStream = null;
	List<File> sheetPaths = null;
	File frameDataPath;
	try {
		serializedStream = new ObjectInputStream(new FileInputStream(path));
		frameDataPath = (File)serializedStream.readObject();
		sheetPaths = (List<File>)serializedStream.readObject();
		name = (int[])serializedStream.readObject();
		sectionData = (byte[])serializedStream.readObject();
		rightToLeftOAM = (byte[])serializedStream.readObject();
		leftToRightOAM = (byte[])serializedStream.readObject();
		byte[] palette_data = (byte[])serializedStream.readObject();
		palettes = new Palette[4];
		for (int i = 0; i < 4; ++i) {
			palettes[i] = new Palette(palette_data, i * 32, 32);
		}
	} catch (Exception e) {
		throw new Exception(
			"PCA: Stream error in File constructor\n" +
			"(Failed to read serialized file)"
		);
	} finally {
		try { serializedStream.close(); }
		catch (Exception e2) {}
	}

something is screwing up when it tries to read either your frames or your binary data

Edited by Camtech
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...