jetpac | Routines |
Prev: 752d | Up: Map | Next: 75d1 |
|
||||||||
753c | call $72ef | Update Actor position direction | ||||||
753f | call $7309 | Read Left/Right input | ||||||
7542 | bit 3,a | Walk RIGHT | ||||||
7544 | jr z,$75ad | |||||||
7546 | bit 4,a | Walk LEFT | ||||||
7548 | jp z,$75bf | |||||||
754b | ld (ix+$05),$00 | else set Jetman X speed to zero | ||||||
754f | call $735e | Read THRUST button | ||||||
7552 | bit 1,a | Walk off platform if thrusting | ||||||
7554 | jr z,$757f | |||||||
7556 | call $75e8 | Platform collision check (returns E) | ||||||
7559 | bit 2,e | Leave platform if bit-2 is reset | ||||||
755b | jr z,$757f | |||||||
755d | bit 3,e | Redraw Jetman if bit-3 is reset | ||||||
755f | jp z,$7492 | |||||||
7562 | ld a,(ix+$05) | Jetman X speed | ||||||
7565 | and a | |||||||
7566 | jp nz,$7492 | Redraw Jetman if X speed > 0 | ||||||
7569 | bit 6,(ix+$00) | Jetman leaves a platform, either left or right based on the value of bit-6. The X position is dec/inc appropriately, and the Redraw Jetman routine is called. Note also that the X speed is set to max walking speed, but this instruction might be irrelevant as hacking the speed value has no noticeable effect. | ||||||
756d | jr z,$7575 | |||||||
756f | dec (ix+$01) | |||||||
7572 | jp $7492 | |||||||
7575 | inc (ix+$01) | |||||||
7578 | ld (ix+$05),$20 | |||||||
757c | jp $7492 | |||||||
Jetman leaves a platform by thrusters or by walking.
|
||||||||
757f | ld a,(ix+$00) | Jetman direction | ||||||
7582 | and $c0 | Reset FLY and WALK bits | ||||||
7584 | or $01 | Now set movement to FLY | ||||||
7586 | ld (ix+$00),a | Update Jetman direction to be flying | ||||||
7589 | ld hl,($5d01) | HL=Jetman Y,X position | ||||||
758c | push ix | |||||||
758e | ld ix,$5d48 | IX=Jetman thruster animation object | ||||||
7592 | ld a,(ix+$00) | Jump if thrusters are already being animated | ||||||
7595 | and a | |||||||
7596 | jr nz,$75a2 | |||||||
7598 | ld (ix+$00),$03 | else set thrusters to be animating? | ||||||
759c | ld ($5d49),hl | |||||||
759f | call $685d | Update actor movement states | ||||||
75a2 | pop ix | Restore IX to Jetman object | ||||||
75a4 | dec (ix+$02) | Jetman Y position -= 2 | ||||||
75a7 | dec (ix+$02) | |||||||
75aa | jp $7492 | Redraw Jetman | ||||||
Jetman walks right.
|
||||||||
75ad | inc (ix+$01) | Jetman X position += 1 | ||||||
75b0 | res 6,(ix+$00) | Jetman direction is right | ||||||
75b4 | res 6,(ix+$04) | Jetman moving direction to right | ||||||
75b8 | ld (ix+$05),$20 | Set Jetman X speed to maximum | ||||||
75bc | jp $754f | Loop back, checking again for THRUST input | ||||||
Jetman walks left.
|
||||||||
75bf | dec (ix+$01) | Jetman X position -= 1 | ||||||
75c2 | set 6,(ix+$00) | Jetman direction is left | ||||||
75c6 | set 6,(ix+$04) | Jetman moving direction to left | ||||||
75ca | ld (ix+$05),$20 | Set Jetman X speed to maximum | ||||||
75ce | jp $754f | Loop back, checking again for THRUST input |
Prev: 752d | Up: Map | Next: 75d1 |