Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2014-05-23 21:07:18

pisunmosh
Member
Registered: 2014-03-01
Post 13/16

Problem with warps

For example, at 18589 in Pokemon Yellow lies warp to the upper Pewter city's house. I want, for example, move it 2 tiles up. Data between 18589 & 1858D is 36 0D 1D, where 36 is the number of map, I believe, and OD and 1D are coordinates, am I wrong?
I read information from here but...I'm asking for a help.

Last edited by pisunmosh (2014-05-23 22:36:27)

Offline

#2 2014-05-23 23:43:29

Pokemonking
Member
From: Sinnoh
Registered: 2013-04-13
Post 487/543
Website

Re: Problem with warps

They are values not numbers.

Offline

#3 2014-05-24 02:26:16

comet
Member
Registered: 2012-04-09
Post 449/679

Re: Problem with warps

Values are numbers.


You'll want to take a look at Pewter City's warp data in Red/Blue: https://github.com/iimarckus/pokered/bl … ercity.asm

There are two parts to warps. The first is what spots you can warp out of the map from.

db $d, $1d, $0, PEWTER_HOUSE_1

Format is y, x, warp_id, warp_map.

The second part is what spots you warp back into. When you leave the Pewter house, you end up here:

EVENT_DISP PEWTER_CITY_WIDTH, $d, $1d ; PEWTER_HOUSE_1

EVENT_DISP is a macro that takes the width and coordinate and spits out the corresponding address for that block on the map.

;\1 = Map Width
;\2 = Rows above (Y-blocks)
;\3 = X movement (X-blocks)
EVENT_DISP: MACRO
    dw ($C6EF + (\1) + ((\1) + 6) * ((\2) >> 1) + ((\3) >> 1)) ; Ev.Disp
    db \2,\3    ;Y,X
    ENDM

The formula is pretty simple, even if it doesn't look that way. Subtract (w+6) for each block (2 steps) up.

Last edited by comet (2014-05-24 02:41:59)

Offline

Board footer

Powered by FluxBB