Pokédex data structure (Generation III): Difference between revisions

(The way Pokedex data is stored in the game (not descriptions))
 
Line 52: Line 52:


In the [[Generation III]], there's a size page on the Pokédex, which uses data from the Pokédex to create a silhouette of the Pokémon standing next to the trainer. The size of both the trainer and Pokémon are determined by this formula:
In the [[Generation III]], there's a size page on the Pokédex, which uses data from the Pokédex to create a silhouette of the Pokémon standing next to the trainer. The size of both the trainer and Pokémon are determined by this formula:
<br/>
<code>
<code>
x = (y &times; 256/z)&amp;&amp;&amp; pixels
x = (y &times; 256/z)   pixels
</code>
</code>
Where y is the sprite size (64 pixels in our case) and z is the appropriate scale in hex and x rounded down is the size of silhouette. The game then resized the sprite in a way similar a computer would do (without anti-aliasing of course).
<br/>
The offset determines where exactly the silhouette will be placed. For example if <b>Pokémon offset</b> = 10 then the silhouette of the Pokémon will be 10 pixels from the top and 10 pixels from the left. (for some reason, that cannot be exactly simulated outside of the game).
Where y is the sprite size (64 pixels in our case) and z is the appropriate scale in hex and x rounded down is the size of silhouette. The game then resized the sprite in a way similar a computer would do (without anti-aliasing of course).<br/>
The offset determines where exactly the silhouette will be placed. For example if <b>Pokémon offset</b> = 10 then the silhouette of the Pokémon will be 10 pixels from the top and 10 pixels from the left. (for some reason, that cannot be exactly simulated outside of the game).<br/>
If <b>Offset +/-</b> is equal to 0xFF then the actual <b>Pokémon offset</b> will be equal to -(256 - <b>Pokémon offset</b>), otherwise the actual <b>Pokémon offset</b> stays the same.
If <b>Offset +/-</b> is equal to 0xFF then the actual <b>Pokémon offset</b> will be equal to -(256 - <b>Pokémon offset</b>), otherwise the actual <b>Pokémon offset</b> stays the same.


[[Category:Structures]]
[[Category:Structures]]
[[Category:Game mechanics]]
[[Category:Game mechanics]]
79

edits