![]() |
Routines |
| Prev: F8E2 | Up: Map | Next: F939 |
|
The rest of shift_flat_piece. Once the start-up is over this is the bit-reversed table build_bit_reverse builds: bit_reverse_table + n holds n with its bits reversed, 256 bytes over the end of shift_flat_piece and all of shift_slope_piece, which have done their work by then. The game reads it with LD B,$F9 and the byte in C, to mirror the ship (mirror_ship_sprite), the left-climbing landscape steps (blit_mirror_two, blit_mirror_one) and other sprites (draw_ship, blit_mirrored_left_clip).
|
||||
| bit_reverse_table | F900 | INC B | One byte more than the width | |
| bit_reverse_table_0 | F901 | CALL shift_byte_high | Shift the bytes in | |
| F904 | CALL shift_byte_low_0 | |||
| F907 | CALL pad_right_checker_0 | |||
| F90A | DJNZ bit_reverse_table_0 | |||
| F90C | INC D | Take out the spill of the next row's byte | ||
| F90D | LD A,(DE) | |||
| F90E | DEC D | |||
| F90F | EXX | |||
| F910 | DEC HL | |||
| F911 | XOR (HL) | |||
| F912 | LD (HL),A | |||
| F913 | LD A,(pieces_left) | And put the first byte's low part in the last byte, rotating | ||
| F916 | CALL pad_right_checker_1 | |||
| F919 | LD A,(scratch_count) | The next pair of rows | ||
| F91C | DEC A | |||
| F91D | LD (scratch_count),A | |||
| F920 | JR NZ,shift_flat_piece_1 | |||
| F922 | CALL next_shift_0 | The next shift, 48 bytes further on | ||
| F925 | EXX | |||
| F926 | LD DE,$0030 | |||
| F929 | ADD HL,DE | |||
| F92A | EXX | |||
| F92B | POP HL | |||
| F92C | JR NZ,shift_flat_piece_0 | |||
| F92E | LD A,$5C | Two bytes of the copies mended | ||
| F930 | LD ($EB34),A | |||
| F933 | LD A,$40 | |||
| F935 | LD ($EC30),A | |||
| F938 | RET | |||
| Prev: F8E2 | Up: Map | Next: F939 |