diff --git a/constants/collision_constants.asm b/constants/collision_constants.asm index 58afa46f6..8bc69733c 100644 --- a/constants/collision_constants.asm +++ b/constants/collision_constants.asm @@ -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 diff --git a/data/collision/collision_permissions.asm b/data/collision/collision_permissions.asm index 1f0c579f0..564c6813c 100644 --- a/data/collision/collision_permissions.asm +++ b/data/collision/collision_permissions.asm @@ -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 diff --git a/data/tilesets/board_debug_1_collision.asm b/data/tilesets/board_debug_1_collision.asm index 181c22064..c7fc2d998 100755 --- a/data/tilesets/board_debug_1_collision.asm +++ b/data/tilesets/board_debug_1_collision.asm @@ -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 diff --git a/data/tilesets/board_debug_1_metatiles.bin b/data/tilesets/board_debug_1_metatiles.bin index 1c5604c19..ccd37cf62 100755 Binary files a/data/tilesets/board_debug_1_metatiles.bin and b/data/tilesets/board_debug_1_metatiles.bin differ diff --git a/docs/develop/index.md b/docs/develop/index.md index ead54c4bd..c8dfef521 100755 --- a/docs/develop/index.md +++ b/docs/develop/index.md @@ -374,4 +374,4 @@ $~~~~$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) \ No newline at end of file +13) **Go back to 3)** \ No newline at end of file diff --git a/engine/board/spaces.asm b/engine/board/spaces.asm index 332b9fb5b..dd6db1dbc 100755 --- a/engine/board/spaces.asm +++ b/engine/board/spaces.asm @@ -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 diff --git a/engine/overworld/events.asm b/engine/overworld/events.asm index e79e9ecdb..28a99b631 100644 --- a/engine/overworld/events.asm +++ b/engine/overworld/events.asm @@ -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: diff --git a/gfx/tilesets/board_debug_1.png b/gfx/tilesets/board_debug_1.png index fcc0008fb..94f098e87 100755 Binary files a/gfx/tilesets/board_debug_1.png and b/gfx/tilesets/board_debug_1.png differ diff --git a/gfx/tilesets/spaces/fixed_spaces.png b/gfx/tilesets/spaces/fixed_spaces.png index 0e07d546a..2299ebb6b 100755 Binary files a/gfx/tilesets/spaces/fixed_spaces.png and b/gfx/tilesets/spaces/fixed_spaces.png differ diff --git a/maps/DebugLevel5_Map1.blk b/maps/DebugLevel5_Map1.blk index 306556501..78eb58a63 100755 --- a/maps/DebugLevel5_Map1.blk +++ b/maps/DebugLevel5_Map1.blk @@ -1 +1 @@ - \ No newline at end of file +€ÁÀ°Á \ No newline at end of file