Add definitions for additional regular spaces (green, item, pkmn, minigame) and end space (#21)

This commit is contained in:
xCrystal 2023-10-19 20:38:54 +02:00
parent f2a9f1e116
commit f9f0467d76
10 changed files with 121 additions and 80 deletions

View File

@ -115,9 +115,14 @@ DEF COLL_DOWN_LEFT_BUOY EQU $c5 ; unused
DEF COLL_UP_RIGHT_BUOY EQU $c6 ; unused
DEF COLL_UP_LEFT_BUOY EQU $c7 ; unused
const_def $d0
const COLL_BLUE_SPACE ; $d0
const COLL_RED_SPACE ; $d1
const COLL_GREY_SPACE ; $d2
const COLL_BLUE_SPACE ; $d0
const COLL_RED_SPACE ; $d1
const COLL_GREEN_SPACE ; $d2
const COLL_ITEM_SPACE ; $d3
const COLL_POKEMON_SPACE ; $d4
const COLL_MINIGAME_SPACE ; $d5
const COLL_END_SPACE ; $d6
const COLL_GREY_SPACE ; $d7
DEF NUM_COLL_SPACES EQU const_value - $d0
DEF COLL_FF EQU $ff ; garbage

View File

@ -211,12 +211,12 @@ TileCollisionTable::
db WATER_TILE ; cf
db LAND_TILE ; COLL_BLUE_SPACE
db LAND_TILE ; COLL_RED_SPACE
db LAND_TILE ; COLL_GREEN_SPACE
db LAND_TILE ; COLL_ITEM_SPACE
db LAND_TILE ; COLL_POKEMON_SPACE
db LAND_TILE ; COLL_MINIGAME_SPACE
db LAND_TILE ; COLL_END_SPACE
db LAND_TILE ; COLL_GREY_SPACE
db LAND_TILE ; d3
db LAND_TILE ; d4
db LAND_TILE ; d5
db LAND_TILE ; d6
db LAND_TILE ; d7
db LAND_TILE ; d8
db LAND_TILE ; d9
db LAND_TILE ; da

View File

@ -150,78 +150,78 @@
tilecoll BLUE_SPACE, FLOOR, FLOOR, FLOOR ; 95
tilecoll BLUE_SPACE, FLOOR, FLOOR, FLOOR ; 96
tilecoll BLUE_SPACE, FLOOR, FLOOR, FLOOR ; 97
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 98
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 99
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 9a
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 9b
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 9c
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 9d
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 9e
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 9f
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; a0
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; a1
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; a2
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; a3
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; a4
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; a5
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; a6
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; a7
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; a8
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; a9
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; aa
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; ab
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; ac
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; ad
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; ae
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; af
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; b0
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; b1
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; b2
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; b3
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; b4
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; b5
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; b6
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; b7
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; b8
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; b9
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; ba
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; bb
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; 98
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; 99
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; 9a
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; 9b
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; 9c
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; 9d
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; 9e
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; 9f
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a0
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a1
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a2
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a3
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a4
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a5
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a6
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a7
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a8
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a9
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; aa
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; ab
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; ac
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; ad
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; ae
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; af
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; b0
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; b1
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; b2
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; b3
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; b4
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; b5
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; b6
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; b7
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; b8
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; b9
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; ba
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; bb
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; bc
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; bd
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; be
tilecoll RED_SPACE, FLOOR, FLOOR, FLOOR ; bf
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; c0
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; c1
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; c2
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; c3
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; c4
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; c5
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; c6
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; c7
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; c8
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; c9
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; ca
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; cb
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; cc
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; cd
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; ce
tilecoll END_SPACE, FLOOR, FLOOR, FLOOR ; c0
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; c1
tilecoll ITEM_SPACE, FLOOR, FLOOR, FLOOR ; c2
tilecoll MINIGAME_SPACE, FLOOR, FLOOR, FLOOR ; c3
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; c4
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; c5
tilecoll ITEM_SPACE, FLOOR, FLOOR, FLOOR ; c6
tilecoll MINIGAME_SPACE, FLOOR, FLOOR, FLOOR ; c7
tilecoll END_SPACE, FLOOR, FLOOR, FLOOR ; c8
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; c9
tilecoll ITEM_SPACE, FLOOR, FLOOR, FLOOR ; ca
tilecoll MINIGAME_SPACE, FLOOR, FLOOR, FLOOR ; cb
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; cc
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; cd
tilecoll ITEM_SPACE, FLOOR, FLOOR, FLOOR ; ce
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; cf
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; d0
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; d1
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; d2
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; d3
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; d4
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; d5
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; d6
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; d7
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; d8
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; d9
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; da
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; db
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; dc
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; dd
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; de
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; df
tilecoll END_SPACE, FLOOR, FLOOR, FLOOR ; d0
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; d1
tilecoll ITEM_SPACE, FLOOR, FLOOR, FLOOR ; d2
tilecoll MINIGAME_SPACE, FLOOR, FLOOR, FLOOR ; d3
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; d4
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; d5
tilecoll ITEM_SPACE, FLOOR, FLOOR, FLOOR ; d6
tilecoll MINIGAME_SPACE, FLOOR, FLOOR, FLOOR ; d7
tilecoll END_SPACE, FLOOR, FLOOR, FLOOR ; d8
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; d9
tilecoll ITEM_SPACE, FLOOR, FLOOR, FLOOR ; da
tilecoll MINIGAME_SPACE, FLOOR, FLOOR, FLOOR ; db
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; dc
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; dd
tilecoll ITEM_SPACE, FLOOR, FLOOR, FLOOR ; de
tilecoll MINIGAME_SPACE, FLOOR, FLOOR, FLOOR ; df
tilecoll GREY_SPACE, FLOOR, FLOOR, FLOOR ; e0
tilecoll GREY_SPACE, FLOOR, FLOOR, FLOOR ; e1
tilecoll GREY_SPACE, FLOOR, FLOOR, FLOOR ; e2

View File

@ -374,4 +374,4 @@ $~~~~$<c>then always returns PLAYERMOVEMENT_FINISH but often is overwritten by c
11) The space script loads the value of ``wCurSpaceNextSpace`` into ``wCurSpace``, loads the new space data to ``wCurSpaceData[]``, and decreases ``wSpacesLeft``.
- If ``wSpacesLeft`` is non-0, **go back to 6)**.
12) ``hCurBoardEvent`` is set to ``BOARDEVENT_END_TURN``. ``CheckBoardEvent`` does nothing in this state. In the first subsequent ``HandleMap`` iteration where no other kind of event triggers causing ``PlayerEvents`` to return early, ``hCurBoardEvent`` is set to ``BOARDEVENT_DISPLAY_MENU``.
13) Go back to 3)
13) **Go back to 3)**

View File

@ -14,6 +14,37 @@ RedSpaceScript::
.not_landed
end
GreenSpaceScript::
scall ArriveToRegularSpaceScript
iftrue .not_landed
scall LandedInRegularSpaceScript
.not_landed
end
ItemSpaceScript::
scall ArriveToRegularSpaceScript
iftrue .not_landed
scall LandedInRegularSpaceScript
.not_landed
end
PokemonSpaceScript::
scall ArriveToRegularSpaceScript
iftrue .not_landed
scall LandedInRegularSpaceScript
.not_landed
end
MinigameSpaceScript::
scall ArriveToRegularSpaceScript
iftrue .not_landed
scall LandedInRegularSpaceScript
.not_landed
end
EndSpaceScript::
end
GreySpaceScript::
scall ArriveToRegularSpaceScript
iftrue .not_landed

View File

@ -376,9 +376,14 @@ CheckBoardEvent:
.SpaceScripts:
table_width 2, .SpaceScripts
dw BlueSpaceScript ; COLL_BLUE_SPACE
dw RedSpaceScript ; COLL_RED_SPACE
dw GreySpaceScript ; COLL_GREY_SPACE
dw BlueSpaceScript ; COLL_BLUE_SPACE
dw RedSpaceScript ; COLL_RED_SPACE
dw GreenSpaceScript ; COLL_GREEN_SPACE
dw ItemSpaceScript ; COLL_ITEM_SPACE
dw PokemonSpaceScript ; COLL_POKEMON_SPACE
dw MinigameSpaceScript ; COLL_MINIGAME_SPACE
dw EndSpaceScript ; COLL_END_SPACE
dw GreySpaceScript ; COLL_GREY_SPACE
assert_table_length NUM_COLL_SPACES
CheckTrainerEvent:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 384 B

View File

@ -1 +1 @@
<EFBFBD>€€ €°<EFBFBD><EFBFBD>΅Α΅ΑΑ €€°€Δ<02> ΅Α<> ° Α<C2A0>΅Α<CE85>
ÿ€€Â€°Ã<EFBFBD>¡±¡¡¡À€°€À<02>¡°Á€€€Â°Ã<C2B0>¡±¡¡