![]() |
Routines |
25856 | LD HL,32745 | Set 32745 to 0 to indicate that ERIC will no longer be midstride after this movement |
25859 | LD A,(HL) | |
25860 | LD (HL),0 | |
25862 | DEC L | Set 32744 (keypress response delay counter) equal to the previous contents of 32745 |
25863 | LD (HL),A | |
25864 | LD HL,44131 | Point HL at byte 99 of ERIC's buffer |
25867 | CALL 25108 | Update SRB for ERIC's current location |
25870 | LD L,99 | Pick up ERIC's next animatory state in A (from byte 99 of his buffer) and his next location in DE (from bytes 100 and 101) |
25872 | LD A,(HL) | |
25873 | INC L | |
25874 | LD D,(HL) | |
25875 | INC L | |
25876 | LD E,(HL) | |
25877 | CALL 25008 | Update ERIC's animatory state and location and update SRB |
25880 | CALL 27026 | Update display area |
25883 | CALL 65106 | Make a walking sound effect |
25886 | LD HL,44128 | Point HL at byte 96 of ERIC's buffer |
25889 | LD A,(32512) | A=X: column at far left of screen (0-64) |
25892 | BIT 7,(HL) | Is ERIC facing left? |
25894 | LD L,98 | |
25896 | JR Z,25907 | Jump if so |
25898 | CP 64 | Is the far right end of the skool on screen? |
25900 | RET Z | Return if so |
25901 | SUB (HL) | A=X-x (x=ERIC's x-coordinate) |
25902 | CP 234 | Is ERIC's screen x-coordinate 22? |
25904 | RET NZ | Return if not |
25905 | JR 25820 | Otherwise scroll the screen left 8 columns |
25907 | AND A | Is the far left end of the skool on screen (X=0)? |
25908 | RET Z | Return if so |
25909 | SUB (HL) | A=X-x (x=ERIC's x-coordinate) |
25910 | CP 247 | Is ERIC's screen x-coordinate 9? |
25912 | RET NZ | Return if not |
25913 | JP 25810 | Otherwise scroll the screen right 8 columns |