Well, I'm remaking Real-time world edit so I can understand how it works
I think I understand, but my source so far is nowhere near as neat as Toenailed's
Here's what I have so far, this checks the space you're in (I just started a few minutes ago, so there might be errors and stuff like that
If you think I'm on the right track, just say so XD (just say if I'm right or wrong, I wanna figure it out on my own so don't tell me what I should do)
And yes I start all codes like this, I jump right in without planning anything and hope it works in the end XD
Update: I got it to work (no dpad check just yet though) XD
Tell me what you think Got it working on my second try (first time I accidentally put a lsr instead of a lsl, that's all that was wrong XD)
Credit to Toenailed for the Text to item routine, I'll add my own later but I was just lazy and really wanted to make sure it worked before I went to bedCode:add r2,pc,#1 bx r2 .thumb ldr r1,CoordinatesPointer ldr r1,[r1] mov r2,#0xA9 lsl r2,#3 neg r2,r2 ldr r3,[r1,r2] lsr r3,#0xC cmp r3,#0x20 blt Exit cmp r3,#0xA0 bgt Exit add r2,#8 ldr r2,[r1,r2] lsr r2,#0xC cmp r2,#0x20 blt Exit cmp r3,#0xA0 bgt Exit lsr r3,#1 lsr r2,#1 sub r3,#0x10 sub r2,#0x10 mov r0,#0 mov r4,#0 Divide1: cmp r3,#16 blt Divide2 sub r3,#16 add r0,#1 b Divide1 Divide2: cmp r2,#16 blt Finish sub r2,#16 add r4,#1 b Divide2 Finish: @r0 holds y box #0x200 @r4 holds x box #0x800 @r3 holds column #0x2 @r2 holds row #0x20 lsl r3,#1 mov r1,#0x20 mul r2,r1 lsl r1,#4 mul r0,r1 lsl r1,#2 mul r4,r1 ldr r1,Map add r1,r4 add r1,r0 add r1,r2 add r1,r3 mov r4,r1 @[texttoItem] = r5 ldr r1, Text mov r5,#0x0 mov r0,#0xC mov r2,#0xF loop: ldrb r3,[r1] add r1,#0x1 cmp r3,#0x3A blt number add r3,#0x9 number: and r3,r2 lsl r3,r0 add r5,r3 sub r0,#0x4 bpl loop strh r5,[r4] Exit: bx lr .arm CoordinatesPointer: .long 0x21C6DEC CheckLocation: .long 0x21EED6C Map: .long 0x21E3124 Text: .long 0x22AF136
Compiled AR code:
L+R
(021EED6C is in there so I can make it work in player houses later)Code:94000130 FCFF0000 023FF090 012FFF11 E0000000 00000098 E28F2001 E12FFF12 6809491F 00D222A9 588B4252 2B200B1B 2BA0DB34 3208DC32 0B12588A DB2D2A20 DC2B2BA0 0852085B 3A103B10 24002000 DB022B10 30013B10 2A10E7FA 3A10DB02 E7FA3401 2120005B 0109434A 00894348 490D434C 18091909 18C91889 490B1C0C 200C2500 780B220F 2B3A3101 3309DB00 40834013 380418ED 8025D5F5 00004770 021C6DEC 021EED6C 021E3124 022AF136 023FF090 E3520003 D2000000 00000000