Routines |
Prev: ED9A | Up: Map | Next: EE5B |
Used by the routines at PlayerControls_Kempston and PlayerControls.
|
||||||||
Handler_LaddersAscending | EE08 | LD A,(IX+$11) | Jump to Handler_LaddersDescending_1 if *IX+11 is equal to 03. | |||||
EE0B | CP $03 | |||||||
EE0D | JR Z,Handler_LaddersDescending_1 | |||||||
EE0F | LD C,(IX+$00) | C=*IX+00. | ||||||
EE12 | LD B,(IX+$01) | B=*IX+01. | ||||||
EE15 | LD HL,($5BD8) | HL=*ReferenceLadders. | ||||||
Handler_LaddersAscending_Loop | EE18 | LD A,(HL) | Return if *HL is equal to FF. | |||||
EE19 | CP $FF | |||||||
EE1B | RET Z | |||||||
EE1C | INC HL | Increment HL by one. | ||||||
EE1D | CP C | Jump to Action_LadderAscend if A is equal to C. | ||||||
EE1E | JR Z,Action_LadderAscend | |||||||
EE20 | INC HL | Increment HL by one. | ||||||
EE21 | JR Handler_LaddersAscending_Loop | Jump to Handler_LaddersAscending_Loop. | ||||||
Action_LadderAscend | EE23 | LD A,(HL) | A=*HL. | |||||
EE24 | INC HL | Increment HL by one. | ||||||
EE25 | DEC A | Decrease A by two. | ||||||
EE26 | DEC A | |||||||
EE27 | CP B | Jump to Handler_LaddersAscending_Loop if A is not equal to B. | ||||||
EE28 | JR NZ,Handler_LaddersAscending_Loop | |||||||
EE2A | LD (IX+$13),A | Write A to *IX+13. | ||||||
EE2D | ADD A,$05 | A+=05. | ||||||
EE2F | LD (IX+$12),A | Write A to *IX+12. | ||||||
EE32 | INC HL | Increment HL by one. | ||||||
EE33 | LD A,(IX+$11) | Jump to AnimateAscending if *IX+11 is equal to 03. | ||||||
EE36 | CP $03 | |||||||
EE38 | JR Z,AnimateAscending | |||||||
Write the frame after the player sprite we actually want (92) to be the active frame. This is because the first thing to occur is to subtract 06 from it, so it'll then be correct.
|
||||||||
EE3A | LD (IX+$06),$98 | Write 98 to *IX+06 (*PlayerSpriteID). | ||||||
EE3E | LD (IX+$11),$03 | Write 03 to *IX+11. | ||||||
This entry point is used by the routine at Handler_LaddersDescending.
|
||||||||
AnimateAscending | EE42 | LD A,(IX+$06) | Decrease *IX+06 (*PlayerSpriteID) by 06. | |||||
EE45 | SUB $06 | |||||||
EE47 | LD (IX+$06),A | |||||||
EE4A | CP $7A | Jump to SkipResetAscendingFrame if the frame is within the boundaries of the frames available for this animation (frame ID 7A is the first frame of the next animation). | ||||||
EE4C | JR NZ,SkipResetAscendingFrame | |||||||
Reset the climbing-up player sprite to the first frame in the animation.
|
||||||||
EE4E | LD (IX+$06),$92 | Write 92 to *IX+06 (*PlayerSpriteID). | ||||||
SkipResetAscendingFrame | EE52 | LD (IX+$05),$01 | Write 01 to *IX+05 (*F236). | |||||
EE56 | LD (IX+$02),$03 | Write 03 to *IX+02 (*F233). | ||||||
EE5A | RET | Return. |
Prev: ED9A | Up: Map | Next: EE5B |