View Single Post
#100
January 13th, 2011 (6:31 AM).
 knizz Join Date: Aug 2007 Posts: 192
Quote:
 Originally Posted by NintendoBoyDX 0x02036E4B holds the Y coordinate of the player 0x02036E4D holds the X coordinate of the player
As I said once in another thread there is an array of npc-data at 02036E38. Every npc uses 0x24 bytes. The first (n)pc is usually the player (but it can be changed with a variable I mentioned somewhere in this thread.)
0x02036E38 + 0x10 = 0x02036E48 X of the tile the NPC is leaving
0x02036E38 + 0x12 = 0x02036E4A Y of the tile the NPC is leaving
0x02036E38 + 0x14 = 0x02036E4C X of the tile the NPC is entering
0x02036E38 + 0x16 = 0x02036E4E Y of the tile the NPC is entering

Quote:
 Originally Posted by NintendoBoyDX 0x0203F3A8 holds the current player map (byte) 0x0203F3A9 holds the current player map bank(byte) 0x0203F3AA holds the last map the player was at (byte) 0x0203F3AB holds the last map bank the player was at (byte) 0x0203F3AC holds the map the player was at 2 maps beforehand (byte) 0x0203F3AD holds the map bank the player wast at 2 maps beforehand (byte)
If it's true ... thank you a lot. Afaik the current map & bank is also stored at 02031DBC (mapnumbers_mem1) and 02031DB4 (mapnumbers_mem2).

Quote:
 Originally Posted by NintendoBoyDX One more question, does anyone know where the whiteout and win-battle routines are?
Yup. 08054BC8 for whiteout.

Code:
```08054BC8 sub_08054BC8:                           @ CODE XREF: sub_080566A4+26p
08054BC8                 PUSH    {R4,LR}
08054BCA                 LDR     R0, =unk_081A654B
08054BCC                 BL      script_start2
08054BD0                 LDR     R0, =saveblock1
08054BD2                 LDR     R4, [R0]
08054BD4                 MOVS    R0, 0x290
08054BDA                 BL      sub_08054C04
08054BDE                 MOVS    R1, R0
08054BE0                 MOVS    R0, R4
08054BE2                 BL      sub_0809FDD8
08054BE6                 BL      sp_00_heal_pokemon
08054BEA                 BL      sub_08054DD8
08054BEE                 BL      whiteout_mem1
```080554BC whiteout_mem1:                          @ CODE XREF: sub_08054BC8+26p