Talk:Pokémon data substructures (Generation III): Difference between revisions

no edit summary
(Nevermind I figured it out)
No edit summary
Line 24: Line 24:
Using little endian. This means for every word (two bytes), you reverse the order of the bytes. The encryption and decryption will work as long as you keep the order the same for the key and the data.
Using little endian. This means for every word (two bytes), you reverse the order of the bytes. The encryption and decryption will work as long as you keep the order the same for the key and the data.
[[User:Twigpi|Twigpi]] 14:01, 29 October 2007 (UTC)
[[User:Twigpi|Twigpi]] 14:01, 29 October 2007 (UTC)
== Location ==
It's not a signed value that has the sign bit ignored. Some non-ASM research tells me that the eight bit is actually part of another value -- the monster's origin game. Wether to read it from the [[List of locations by index number (GBA)|GBA]] or the [[List of locations by index number (GCN)|Gamecode]] list depends on this value. Technically speaking:
{| border=1 cellspacing=0
| 0
| 1
| 2
| 3
| 4
| 5
| 6
| 7
| 0
| 1
| 2
| 3
| 4
| 5
| 6
| 7
|-
| colspan=7 | Level met
| colspan=4 | Original game
| colspan=4 | Pokeball
| colspan=1 | Trainer gender
|}
Or, in C speak:
<pre>u32 Level:7
u32 OriginGame:4;
u32 Pokeball:4;
u32 TrainerGender:1;</pre>
115

edits