![]() |
Routines |
29194 | LD HL,32752 | 32752 holds the bike's momentum |
29197 | LD A,(HL) | Pick this up in A |
29198 | SUB 7 | Is it time for the bike to come to rest? |
29200 | JR NC,29223 | Jump if not |
29202 | LD L,237 | HL=32749 (ERIC's status flags) |
29204 | BIT 7,(HL) | Is ERIC standing on the saddle of the bike? |
29206 | JR Z,29210 | Jump if not |
29208 | LD (HL),16 | Set bit 4 at 32749: ERIC is falling and will not land on his feet |
29210 | LD H,211 | 211=bike |
29212 | CALL 25012 | Update SRB for the bike's current animatory state and location |
29215 | DEC A | A=animatory state of bike resting on floor |
29216 | LD L,18 | Remove the address of this routine from bytes 17 and 18 of the bike's buffer |
29218 | LD (HL),0 | |
29220 | JP 24880 | Update SRB for the bike's new animatory state |
29223 | LD (HL),A | Set the bike's remaining momentum at 32752 |
29224 | LD HL,(54016) | E=bike's x-coordinate, A=bike's animatory state |
29227 | LD A,L | |
29228 | LD E,H | |
29229 | CALL 28672 | Check for walls, closed doors or ALBERT in the bike's path |
29232 | LD L,237 | HL=32749 (ERIC's status flags) |
29234 | JR NC,29242 | Jump if ALBERT's not impeding the bike's progress |
29236 | BIT 7,(HL) | Is ERIC standing on the saddle of the bike? |
29238 | JR Z,29252 | Jump if not |
29240 | LD (HL),16 | Set bit 4: ERIC is falling and will not land on his feet |
29242 | JR NZ,29252 | Jump if there are no walls or closed doors in the bike's path |
29244 | BIT 7,(HL) | Is ERIC standing on the saddle of the bike? |
29246 | JR Z,29210 | Jump if not |
29248 | LD (HL),64 | Set bit 6: ERIC has hit a wall or closed door while standing on the saddle of the bike |
29250 | JR 29210 | |
29252 | LD H,211 | 211=bike |
29254 | CALL 29264 | Update SRB for the bike and move it one space forward |
29257 | LD A,(32749) | 32749 holds ERIC's status flags |
29260 | RLCA | Is ERIC standing on the saddle of the bike? |
29261 | RET NC | Return if not |
29262 | LD H,210 | 210=ERIC |
29264 | CALL 25012 | Update SRB for the character's current animatory state and location |
29267 | RLCA | |
29268 | RRCA | |
29269 | JR C,29273 | Jump if the character is facing right |
29271 | DEC E | |
29272 | DEC E | |
29273 | INC E | Now E=x-coordinate in front of character |
29274 | JP 31723 | Update SRB for the character's new location and scroll the screen if necessary |