You are not logged in.
Pages: 1
I searched about Flight Data in Red\Blue.
I didn't found a topic about it.So I tested a bit & created one topic about.
http://hax.iimarck.us/topic/3240/Well, actually I'm testing that infamous part 2 and the peds' places as well as the other events such as warps, signposts etc. are misplaced, plus, sometimes the tiles are glitched-up.
The first byte has something to do with the Y & X position, of that I'm sure, but I must somehow refresh the original position of the map somehow:
example: if I move the flight position + 2 X down, then map & events are placed 2 tiles\blocks down as well.the second if changed glitches up the map tiles.
3rd and 4th does apparently nothing.
5th is always 00.
Can someone, if I'm not so annoying, let me understand how that works and how it can work correctly?
Last edited by 80C (Today 21:32:02)
RB 0x01:
ld a, [$D71A]
ld b, a
ld [$D35E], a
ld hl, $6448
@6398:
ldi a, [hl]
inc hl
cp a, b
jr z, @63A1 ;; Notice: Map has to be found! Possible source of bugs.
inc hl
inc hl
jr @6398
@63A1:
ldi a, [hl]
ld h, [hl]
ld l, a
ld de, $D35F
ld c, $06
@63A9:
ldi a, [hl]
ld [de], a
inc de
dec c
jr nz, @63A9
xor a, a
ld [$D367], a
ld [$D4E2], a
ld [$D4E3], a
ld a, $FF
ld [$D42F], a
ret
So the first structure is [Map No][0x00][2b Pointer to 6b structure in RB 0x01].
RB 0x00:
@0CAA:
ld a, [$FF00 + $B8]
push af
ld a, [$D52B]
ld [$FF00 + $B8], a
ld [$2000], a
ld a, [$D35F]
ld e, a
ld a, [$D360]
ld d, a
ld hl, $C508
ld b, $05
@0CC2:
push hl
push de
ld c, $06
@0CC6:
push bc
push de
push hl
ld a, [de]
ld c, a
call $0F1D
pop hl
pop de
pop bc
inc hl
inc hl
inc hl
inc hl
inc de
dec c
jr nz, @0CC6
pop de
ld a, [$D369]
add a, $06
add a, e
ld e, a
jr nc, @0CE4
inc d
@0CE4:
pop hl
ld a, $60
add a, l
ld l, a
jr nc, @0CEC
inc h
@0CEC:
dec b
jr nz, @0CC2
ld hl, $C508
ld bc, $0000
ld a, [$D363]
and a, a
jr z, @0CFF
ld bc, $0030
add hl, bc
@0CFF:
ld a, [$D364]
and a, a
jr z, @0D09
ld bc, $0002
add hl, bc
@0D09:
ld de, $C3A0
ld b, $12
@0D0E:
ld c, $14
@0D10:
ldi a, [hl]
ld [de], a
inc de
dec c
jr nz, @0D10
ld a, $04
add a, l
ld l, a
jr nc, @0D1D
inc h
@0D1D:
dec b
jr nz, @0D0E
pop af
ld [$FF00 + $B8], a
ld [$2000], a
ret
This is where the second structure is read. So we see [2b pointer upper left block in WRAM][event Y coordinate][event X coordinate][even Y block quarter (bool)][even X block quarter (bool)].
Also, why did your threads disappear just as I was replying?
cYa,
Tauwasser
Last edited by Tauwasser (2013-04-09 22:48:18)
Offline
Also, why did your threads disappear just as I was replying?
cYa,
Tauwasser
Since more than 1 person said I'm useless, I won't post or help anyone until those people admit I'm not so useless.
Many of my "useless" question gave useful answers, not only for me, but for everyone else, and made many searches easier, so I deleted 117 of my 119 topics & posts & now some useful things & contents are lost forever unless I restore it, such as town map editing details, palette\convertion, sources and so on.
Oh, and now I'm learning asm, so I guess we'll see something not so "useless" this time.
Hurt me again and Pokemon Grape & my topics will fall somewhere where nobody wants.
I am not very active on this forum. I only pop in from time to time.
Offline
Apparently we are not appreciating his genius as he sees fit.
Offline
when r u stupid going to release this unwanted hack
And this post in his Pokemon Grape topic by aveneour probably isn't the kind of post he wants to see.
“To live is the rarest thing in the world. Most people exist, that is all.” ― Oscar Wilde
Offline
Tauwasser wrote:Also, why did your threads disappear just as I was replying?
cYa,
Tauwasser
80C wrote:Since more than 1 person said I'm useless, I won't post or help anyone (...)
(...) so I deleted 117 of my 119 topics & posts & now some useful things & contents are lost forever unless I restore it, such as town map editing details, palette\convertion, sources and so on.
Now these important topics I deleted are restored.
The other near-100 posts weren't so important.
(...) Hurt me again and Pokemon Grape & my topics will fall somewhere where nobody wants.
This won't happen.
Pokemon Grape's topic is still here but needs edit since I deleted everything but I hadn't got time to restore the storyline & the credits since I was made dumb and unable to edit\delete posts.
The topics are now here again.
I left this forum.
Offline
@Tauwasser
I haven't understood fully the second part of the flight data.
If I change the X block, also the peds got moved... and they're placed in wrong places as well as events.
How to avoid this?
I left this forum.
Offline
The X block flag has to match with the X event position. Else, you will move the events by a block quarter.
cYa,
Tauwasser
Offline
ehm... I didn't used disassemble to try changing the flight data, I used hex editor.
Could you show me how operates the bytes in the 2nd part of the flight data?
I have here an example, this is about Pallet town, it's between 0x647C & 0x6480:
2B C7 06 05 00
I left this forum.
Offline
Pages: 1