View Single Post
  #100    
Old January 13th, 2011 (06:31 AM).
knizz's Avatar
knizz
 
Join Date: Aug 2007
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+26p
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
08054BD8                 ADDS    R4, R4, R0
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
08054BF2                 BL      load_warp_map
08054BF6                 POP     {R4}
08054BF8                 POP     {R0}
08054BFA                 BX      R0
08054BFA @ End of function sub_08054BC8
Code:
080554BC whiteout_mem1:                          @ CODE XREF: sub_08054BC8+26p
080554BC                 PUSH    {LR}
080554BE                 LDR     R0, =mapnumbers_mem1
080554C0                 BL      whiteout (=080BFCD0)
080554C4                 POP     {R0}
080554C6                 BX      R0
080554C6 @ End of function whiteout_mem1
__________________
Firered IDA 6.5 DB: https://www.dropbox.com/s/hvvmxxoo1dkmdzc/firered.idb
VBA-M with lua scripting support
Reply With Quote