diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2019-02-10 12:41:44 -0500 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2019-02-10 12:41:44 -0500 |
| commit | 866bc620a9b0b91eaf3dffa6537c7086d1bd888e (patch) | |
| tree | 473d2016fc2e61ea5971e9482c93c3bcdbdef880 /Diagonal-stairs.md | |
| parent | d5abe7fbc2a946c075a239afab514732a95aab42 (diff) | |
Name and formatting
Diffstat (limited to 'Diagonal-stairs.md')
| -rw-r--r-- | Diagonal-stairs.md | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/Diagonal-stairs.md b/Diagonal-stairs.md deleted file mode 100644 index 1c1377d..0000000 --- a/Diagonal-stairs.md +++ /dev/null @@ -1,57 +0,0 @@ -All the stairs in Gen 1 and 2 only go upwards. Gen 3 had a few that go downwards, like the ones descending towards Trainer Tower in FRLG, but it took until Gen 4 with its true 3D maps for sideways stairs to be introduced. This tutorial shows how to implement them in pokecrystal. - -(The code for this feature was adapted from [Pokémon Brass](https://github.com/WasabiRaptor/Pokemon-Brass/).) - -[Here](https://github.com/Rangi42/pokecrystal/commit/756a1a712daf5dfd018313cb2f851e8d5e4e8f47) are all the changes needed to implement diagonal stairs, applied to a copy of pokecrystal. You can `clone` [Rangi42/pokecrystal](https://github.com/Rangi42/pokecrystal/tree/diagonal-stairs) and `checkout` the `diagonal-stairs` branch to test it for yourself. - - - -## 1 Define the constants - -edit constants/collision_constants.asm -```diff -; collision data types (see data/tilesets/*_collision.asm) -; TileCollisionTable indexes (see data/collision_permissions.asm) - COLL_FLOOR EQU $00 -... - COLL_DOWN_WALL EQU $b3 ; unused -+COLL_DIAGONAL_STAIRS_RIGHT EQU $d0 -+COLL_DIAGONAL_STAIRS_LEFT EQU $d1 - COLL_FF EQU $ff ; garbage - -; collision data type nybbles - LO_NYBBLE_GRASS EQU $07 - HI_NYBBLE_TALL_GRASS EQU $10 -... - HI_NYBBLE_SIDE_WALLS EQU $b0 - HI_NYBBLE_UNUSED_C0 EQU $c0 -+HI_NYBBLE_DIAGONAL_STAIRS EQU $d0 -``` -the collision constants will let us apply the diagonal step to the player once it is programmed - -edit constants/map_object_constants.asm -```diff -; StepTypesJumptable indexes (see engine/overworld/map_objects.asm) - const_def - const STEP_TYPE_00 ; 00 - const STEP_TYPE_SLEEP ; 01 -... - const STEP_TYPE_17 ; 17 - const STEP_TYPE_18 ; 18 - const STEP_TYPE_SKYFALL_TOP ; 19 -+ const STEP_TYPE_NPC_DIAGONAL_STAIRS -+ const STEP_TYPE_PLAYER_DIAGONAL_STAIRS - -... -; DoPlayerMovement.DoStep arguments (see engine/overworld/player_movement.asm) - const_def - const STEP_SLOW ; 0 - const STEP_WALK ; 1 - const STEP_BIKE ; 2 - const STEP_LEDGE ; 3 - const STEP_ICE ; 4 - const STEP_TURN ; 5 - const STEP_BACK_LEDGE ; 6 - const STEP_WALK_IN_PLACE ; 7 -+ const STEP_DIAGONAL_STAIRS -``` |
