Shiny Quagsire

I'm Still Alive, Elsewhere

Age 21
Male
Hoenn Safari Zone
Seen 5 Days Ago
Posted April 17th, 2017
700 posts
10.5 Years
For the longest time hackers have wondered how those magical Emerald animations have worked. Well, it turns out it's a bit more complicated than we thought. There are three (or possibly more) tables used for Emerald's animations: One for changing between the two frames, one for rotation/scaling, and a third for deciding how to rotate and scale. More on that further down.

So the first table has been discovered a while back as a simple animation table, in the usual format for most animations. Nothing to special about it, other than it decides how the two frames are "flip-flopped" between each other. The next two, however, are an interesting pair of tables.

The first is the actual scaling/rotation animation table, located at 60AA88. Unlike most animations, it doesn't actually use a simple script-like byte interface; It instead uses ASM to do it's job. Now, obviously writing out code for each and every Pokemon's animation is a bit difficult, and takes up a large amount of space, so instead of doing an individual animation for each Pokemon, they reused them, and they have it narrowed down to about 150 different and unique animations. For most people this might be a bit of a dead end, but this does confirm that there is the possibility of changing animations.

Now obviously if we have a table with less animations than Pokemon we're going to have to have a sort of "index" deciding which animations go where. Luckily, there is such an index, located at 3299EC for front sprites and 60A8C8 for back sprites, both of which contains a single byte for every Pokemon, deciding which animation is used where, meaning that we can change different Pokemon's animations, provided that we know which one we want to use.

As of now that's all I've discovered. If anyone has anything they'd like to contribute feel free to help.