Thread: [Tutorial] HackMew's Knowledge
View Single Post
  #36    
Old June 19th, 2009 (10:32 AM).
Full Metal's Avatar
Full Metal Full Metal is offline
C(++) Developer.
Silver Tier
 
Join Date: Jan 2008
Location: In my mind.
Age: 19
Gender: Male
Nature: Timid
Posts: 805
Send a message via Windows Live Messenger to Full Metal
Hey hackmew I tried to add the trainer id into the asm as well....
it is A instead of C right?
I did something wrong though the script freezes before the guy even faces player
which is weird cuz i called the asm after faceplayer, then called buffernumber 0x1 LASTRESULT (for the secret id) and buffernumber 0x2 (for the trainerid)
the music keeps playing so i think it's my problems with asm.
well anwyays here's my attempt for FireRed.
Spoiler:

.text
.align 2
.thumb
.thumb_func
.global lesson1

main:
push {r0-r1, lr}
ldr r0, .PLAYER_DATA
ldr r0, [r0]
ldr r1, .VAR
ldrh r0, [r0, #0xC]
strh r0, [r1]
pop {pc}
push {lr}
ldr r0, .PLAYER_DATA
ldr r0, [r0]
ldr r1, .VAR2
ldrh r0, [r0, #0xA]
strh r0, [r1]
pop {r0-r1, pc}

.align 3
.PLAYER_DATA:
.word 0x02024EA4
.VAR:
.word 0x0201E8C2 + (0x800D * 2)
.VAR2:
.word 0x0201E8C2 + (0x8001 * 2)

i haven't tried debugging it just yet....
__________________

★ full metal.

I like to push it,
and push it,
until my luck is over.
Reply With Quote