Prev: B224 Up: Map Next: B27A
B267: The update routine for a conveyor that carries things forwards in V (graphic 68)
Object template 8, and CONVEYOR_PLUS_U, CONVEYOR_MINUS_V and CONVEYOR_MINUS_U for the other three directions (graphics 69, 70 and 71, templates 9 to 11). A conveyor never moves itself: it only sets its own step, two units a turn, every turn (the room builder copies no steps from the templates). What stands on it is carried by the collision code: when something lands on anything, and has no step of its own in U or V, it takes the step of the thing it has landed on (ADJ_DZ_FOR_OBJ_INTERSECT).
The same code copies the lander's Z step into the conveyor's, which is how a conveyor knows something has landed on it: this routine then beeps (HIGH_BEEP) and clears it.
Measured in the simulator in room $0D, a ring of the four: standing on graphic 68, he went up two units in V every turn.
Input
IX the conveyor
CONVEYOR_PLUS_V B267 LD (IX+$0A),$02 its step: two units in V
This entry point is used by the routines at CONVEYOR_PLUS_U, CONVEYOR_MINUS_V and CONVEYOR_MINUS_U.
CONVEYOR B26B CALL DRAW_AT_L16_D9 the drawing nudge
B26E LD A,(IX+$0B) something has landed on it: a beep
B271 AND A
B272 CALL NZ,HIGH_BEEP
B275 XOR A and its Z step cleared; no redraw, as nothing about it changes
B276 LD (IX+$0B),A
B279 RET
Prev: B224 Up: Map Next: B27A