View Single Post
  #218    
Old March 15th, 2012, 07:09 PM
droomph's Avatar
droomph
mmm gurl that 90s
Community Supporter
 
Join Date: Sep 2011
Location: bar'jách
Age: 17
Gender: Male
Nature: Impish
Quote:
Originally Posted by SwiftSign View Post
Especially if it's a one of pokemon, so there can't be more than one, so there is no trouble in accidentally hatching a normal pokemon instead. Anything to identify where the egg is would be a great start ><.
I don't know what you mean by "identify where the egg is", but every Party Pokémon is 100 bytes long, meaning you just take variable 0x8004 into a register and
Code:
ldr rd, #0x02024284
mul rm, #0x64
add rm, #0x20
add rd, rm
it, and so on.

Or maybe something like this, but with str instead of ldr: (it's far from finished)
Spoiler:
Code:
species
;select Pokemon slot (r0); zero-indexed
;return Species (r0); ROM number
	push {lr}
	bl pval
	mov r1, 0x18
	mov r2, r0
	bl mod
	mov r1, 0x5
	cmp r0, r1
	bls first
	mov r1, 0x7
	cmp r0, r1
	bls second
	mov r1, 0x8
	cmp r0, r1
	bls third
	mov r1, 0xA
	cmp r0, r1
	beq third
	mov r1, 0xB
	cmp r0, r1
	bls fourth
	mov r1, 0xD
	cmp r0, r1
	bls second
	mov r1, 0xE
	cmp r0, r1
	beq third
	mov r1, 0x10
	cmp r0, r1
	beq third
	mov r1, 0x11
	cmp r0, r1
	bls fourth
	mov r1, 0x13
	cmp r0, r1
	bls second
	mov r1, 0x14
	cmp r0, r1
	beq third
	mov r1, 0x16
	cmp r0, r1
	beq third
	mov r1, 0x17
	bls fourth	
first
	ldr r2, .PARTY
	mov r1, 0x64
	mul r0, r1
	add r2, r0
	ldr r0, [r2, 0x20]
	pop {pc}
second
	ldr r2, .PARTY
	mov r1, 0x64
	mul r0, r1
	add r2, r0
	ldr r0, [r2, 0x2C]
	pop {pc}
third
	ldr r2, .PARTY
	mov r1, 0x64
	mul r0, r1
	add r2, r0
	ldr r0, [r2, 0x38]
	pop {pc}
fourth
	ldr r2, .PARTY
	mov r1, 0x64
	mul r0, r1
	add r2, r0
	ldr r0, [r2, 0x44]
	pop {pc}
.PARTY
	= 0x20244EC
__________________
did u no there r 21 letters in the alphabet
o i forgot 5
uraqt



Last edited by droomph; March 15th, 2012 at 07:21 PM.
Reply With Quote