Fork me on GitHub
Prev: 7113 Up: Map Next: 7155
7128: Render ship or helicopter body sprite
Updates the object's position in the viewport array and renders the sprite.
render_ship_or_helicopter 7128 LD HL,($5F60) Load current_slot_ptr, navigate back to current slot, update [X, Y, D] values.
712B DEC HL
712C LD D,(HL)
712D DEC HL
712E LD (HL),B
712F DEC HL
7130 LD (HL),C
7131 LD ($8B0C),BC Store current position.
7135 LD HL,$82C5 render_sprite_ptr = all_ff (all $FF): render_object will use this to clear the full 8-row body area, including the 2 blade rows where the rotor was drawn.
7138 LD ($8B0E),HL
713B CALL ld_enemy_sprites Get body sprite pointer.
713E LD BC,$0018 Set frame size=$18, default attributes=$0E.
7141 LD E,$0E
7143 LD A,D If object type is OBJECT_SHIP, load ship attributes via ld_attributes_ship.
7144 AND $07
7146 CP $02
7148 CALL Z,ld_attributes_ship
714B LD A,$03 Render sprite: width=3 tiles, height=8 pixels.
714D LD D,$08
714F CALL render_object
7152 JP operate_viewport_slots
Prev: 7113 Up: Map Next: 7155