View Single Post
  #6    
Old April 24th, 2011 (4:51 AM).
TSK's Avatar
TSK TSK is offline
Swimming in shinies
 
Join Date: Jun 2007
Nature: Timid
Posts: 160
Quote:
Originally Posted by shiny quagsire View Post
Quick question: Does this work for fire red?
(Sorry for the bump, I don't think my little addition deserves a thread of it's own.)

As it is describred in the OP this does not work for FR, mostly because the location where the coördinates are stored changes dynamically. I wrote a little ASM to fix that though:

Spoiler:
Code:
.text
.align 2
.thumb
.thumb_func
.global editcoords

main:
	push {r0-r2, lr}
		
	ldr r0, .POINTER
	ldr r1, [r0] 

	ldr r2, .VAR2
	ldrh r2, [r2]
	strh r2, [r1]

	add r1, r1, #0x2

	ldr r2, .VAR3
	ldrh r2, [r2]
	strh r2, [r1]

	pop {r0-r2, pc}


.align 2
.POINTER:
	.word 0x03005008
.VAR2:
	.word 0x020370BC
.VAR3:
	.word 0x020370BE


Usage of the above ASM is as follows:

Code:
setvar 0x8002 0xA
setvar 0x8003 0xB
callasm 0xLOCATION + 1
This will move the camera Coördinates to location (A, B).

Just use the above instead of the writebytetooffset commands in the OP and it will work for Fire Red.
SilverCurrent is on indefinite hiatus.
Reply With Quote