summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Diagonal-stairs.md57
-rw-r--r--Sideways-stairs-with-diagonal-movement.md65
-rw-r--r--Tutorials.md2
3 files changed, 66 insertions, 58 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.
-
-![Screenshot](screenshots/diagonal-stairs.png)
-
-## 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
-```
diff --git a/Sideways-stairs-with-diagonal-movement.md b/Sideways-stairs-with-diagonal-movement.md
new file mode 100644
index 0000000..6b4dec3
--- /dev/null
+++ b/Sideways-stairs-with-diagonal-movement.md
@@ -0,0 +1,65 @@
+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. ROM hacks have already [implemented sideways stairs](https://www.pokecommunity.com/showthread.php?t=378934) in Gen 3; 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.
+
+![Screenshot](screenshots/diagonal-stairs.png)
+
+
+## TOC
+
+
+## 1. Define the constants
+
+Edit [constants/collision_constants.asm](../blob/master/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.
+
+Now edit [constants/map_object_constants.asm](../blob/master/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
+```
diff --git a/Tutorials.md b/Tutorials.md
index 63ee8cd..3a12021 100644
--- a/Tutorials.md
+++ b/Tutorials.md
@@ -97,7 +97,7 @@ Tutorials may use diff syntax to show edits:
- [Running Shoes](Running-Shoes)
- [Rock Climb](Rock-Climb)
- [Dive](Dive)
-- [Diagonal stairs](Diagonal-stairs)
+- [Sideways stairs with diagonal movement](Sideways-stairs-with-diagonal-movement)
- [Automatic battle weather on certain maps](Automatic-battle-weather-on-certain-maps)
- [Puddles that splash when you walk](Puddles-that-splash-when-you-walk)
- [Use G/S SGB palettes for maps](Use-GS-SGB-palettes-for-maps)