Prev: 7441 Up: Map Next: 74C6
74A0: Erase off-screen tank shell
Erases the tank shell sprite when it goes off-screen and removes it from the game.
erase_tank_shell_offscreen 74A0 LD BC,($8B0A) Load shell position from previous_object_coordinates, shell sprite sprite_missile.
74A4 LD HL,$8431
74A7 LD A,C Calculate sprite frame offset from X position: (X AND 6) << 2.
74A8 AND $06
74AA SLA A
74AC SLA A
74AE LD D,$00
74B0 LD E,A
74B1 ADD HL,DE
74B2 LD ($8B0E),HL Add offset to sprite address, store to render_sprite_ptr. Load erase sprite sprite_erasure.
74B5 LD HL,$82F5
74B8 LD DE,$0100 Render erase sprite and remove shell.
74BB LD A,$01
74BD LD BC,$0008
74C0 CALL render_object
74C3 JP remove_tank_shell Remove shell.
Prev: 7441 Up: Map Next: 74C6