Prev: 7546 Up: Map Next: 758A
754C: Operate fuel station
Processes fuel station rendering with animated lights. Blinks every 4 frames by toggling attribute bit 2 (TICK_MASK_FUEL_BLINK).
  • Stores position for rendering
  • Checks if fuel station is within viewport
  • Blink animation: attributes = base + (tick AND $04), toggles every 4 frames
  • Renders 2-tile wide, 25-pixel tall sprite
operate_fuel 754C LD ($8B0A),BC Store position to previous_object_coordinates and object_coordinates. Set height=$19.
7550 LD ($8B0C),BC
7554 LD D,$19
7556 LD A,B Check if Y+$19 is off-screen (boundary check).
7557 ADD A,$19
7559 AND $90
755B CP $90
755D CALL Z,handle_fuel_off_viewport If off-screen, return to main loop.
7560 LD BC,($8B0A)
7564 LD A,B
7565 AND $88
7567 CP $88
7569 JP Z,operate_viewport_slots Load fuel sprite sprite_fuel, get sprite pointer.
756C LD A,B
756D AND $87
756F CP $87
7571 JP Z,operate_viewport_slots
7574 LD HL,$8A86
7577 LD BC,$0000 Set frame size=0, calculate animated attributes from tick.
757A LD A,($5EEF)
757D AND $04
757F ADD A,$0B
7581 LD E,A
7582 LD A,$02 Render fuel station: width=2.
7584 CALL render_sprite
7587 JP operate_viewport_slots
Prev: 7546 Up: Map Next: 758A