ROM:0809D448 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
ROM:0809D448
ROM:0809D448
ROM:0809D448 check_national_dex
ROM:0809D448 PUSH {LR}
ROM:0809D44A LDR R0, =0x3005D90 ; Load DMA-Pointer-Area
ROM:0809D44C LDR R0, [R0] ; Get the first DMA save pointer
ROM:0809D44E LDRB R0, [R0,#0x1A] ; load the byte from r0+0x1a
ROM:0809D450 CMP R0, #0xDA ; if it isn't 0xDA => no nationaldex
ROM:0809D452 BNE loc_809D484
ROM:0809D454 LDR R0, =0x4046
ROM:0809D456 BL get_var ; load value of var 0x4046
ROM:0809D45A LSL R0, R0, #0x10
ROM:0809D45C LDR R1, =0x3020000
ROM:0809D45E CMP R0, R1
ROM:0809D460 BNE loc_809D484 ; if it isn't 0x302 => no national dex
ROM:0809D462 LDR R0, =0x896
ROM:0809D464 BL check_flag ; get national-dex-flag
ROM:0809D468 LSL R0, R0, #0x18
ROM:0809D46A CMP R0, #0
ROM:0809D46C BEQ loc_809D484 ; if it isn't set => no nationaldex
ROM:0809D46E MOV R0, #1 ; if the execution isn't canceled up to
ROM:0809D46E this point the function returns #1
ROM:0809D46E we have the national-dex. =)
ROM:0809D470 B loc_809D486
ROM:0809D470 ; ---------------------------------------------------------------------------
ROM:0809D472 DCB 0
ROM:0809D473 DCB 0
ROM:0809D474 dword_809D474 DCD 0x3005D90
ROM:0809D478 dword_809D478 DCD 0x4046
ROM:0809D47C dword_809D47C DCD 0x3020000
ROM:0809D480 dword_809D480 DCD 0x896
ROM:0809D484 ; ---------------------------------------------------------------------------
ROM:0809D484
ROM:0809D484 loc_809D484
ROM:0809D484
ROM:0809D484 MOV R0, #0 ; otherwise return 0
ROM:0809D486
ROM:0809D486 loc_809D486
ROM:0809D486 POP {R1}
ROM:0809D488 BX R1
ROM:0809D488 ; End of function check_national_dex
ROM:0809D488
ROM:0809D488 ; ---------------------------------------------------------------------------