![]() |
Routines |
| Prev: C61D | Up: Map | Next: C68D |
|
Used by the routine at MovePlayer.
Gives the player a speed of three along the direction that it faces, after adding any speed that something else has pushed it with, which comes from the two bytes of the object that hold the push. Those bytes are also where arches write the nudge into a doorway. NudgeObjectsToArch uses SetPlayerSpeed_JumpByFacing with a different table.
|
||||||||
|
Add the doorway nudges.
|
||||||||
| SetPlayerSpeed | C66A | LD A,(IX+$09) | Fetch the speed along the x axis. | |||||
| C66D | ADD A,(IX+$0E) | Add the adjustment along x. | ||||||
| C670 | LD (IX+$09),A | Store the speed along the x axis. | ||||||
| C673 | LD A,(IX+$0A) | Fetch the speed along the y axis. | ||||||
| C676 | ADD A,(IX+$0F) | Add the adjustment along y. | ||||||
| C679 | LD (IX+$0A),A | Store the speed along the y axis. | ||||||
| C67C | XOR A | Write 00 to the adjustments along x and y. | ||||||
| C67D | LD (IX+$0E),A | |||||||
| C680 | LD (IX+$0F),A | |||||||
|
Jump by the facing direction.
|
||||||||
| C683 | LD BC,$C68D | Take the table of the four routines that add the speed, WalkingRoutines. | ||||||
|
This entry point is used by the routine at NudgeObjectsToArch.
|
||||||||
| SetPlayerSpeed_JumpByFacing | C686 | CALL GetFacingDirection | Call GetFacingDirection to find out which way the player is facing. | |||||
| C689 | LD L,A | Use the direction as the index into the table. | ||||||
| C68A | JP RunGame_JumpViaTable | Jump to RunGame_JumpViaTable to run the routine for the direction. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: C61D | Up: Map | Next: C68D |