Prev: 90CD Up: Map Next: 910A
90EC: Place an object on the screen, or free it
Used by the routines at update_attacker, update_rocket_part and draw_rocket.
Remembers the object in current_object. An object marked to be freed (bit 4 of +$10) is freed now. One with bit 3 of +$10 set has it cleared and is not placed this pass. Otherwise prepare_draw works out where on the screen it is (or frees it when it is far from the view), with its sprite and colour, and steer_to_view turns an attacker that is off the screen back towards the view.
Input
IX The object
place_object 90EC LD (current_object),IX Remembered for the routines after the update
90F0 BIT 4,(IX+$10) To be freed
90F4 JR Z,place_object_0
90F6 LD (IX+$00),$FF
90FA RET
place_object_0 90FB BIT 3,(IX+$10) Skip one placing
90FF RES 3,(IX+$10)
9103 RET NZ
9104 CALL prepare_draw Place it, and steer it back if it is off the screen
9107 JP steer_to_view
Prev: 90CD Up: Map Next: 910A