Well. I managed to get all the animations rendering. Looks pretty neat.
Layer.frameIndex should probably be named layerIndex, but it is not really used anyway. Otherwise, the original code worked perfectly. Good job!
I'm curious as to how the frame rate is determined, but I'm sure it is all customized at the engine level.
I looked closely at the bitmap code to figure out what was going on with shadows.
First, BMPs were over-reading data. Took me a while to figure out this was going on.
imageMeta.scanLineByteWidth is too large and was being used to get the amount of data that needed to be read. I'm not sure what this property is actually used for, but the amount of data being read was 3-4 times past the end of the BMP for all BMPs.
Instead of doing this, I calculate the pitch and multiply the height by that to get the amount of data to read. Then, I iterate over the height and write the row using the pitch.
For the palette, I check if the image is a shadow, and set it to copy the first two colors.
Commit: Shadow fixCommit: Merged method implementations that needed the shadow fix.
The only problem left is that the shadows are blue and lack transparency. I think the shadow palette must be handled at the engine level, ignoring the BMP palette. There doesn't appear to be any other explanation.
I also want to extend BitmapFile so that I can read the actual pixel color values in a usable format. The "pixels" property is the packed bytes and not easy to work with. Currently, I'm using a middleman to read the utility's output and load time is about
60 seconds 4 seconds to read all images
when I don't render each one to the screen after loading .