Skip to navigation

Aviator on the BBC Micro

3D geometry: SetObjectCoords (Part 7 of 11)

Name: SetObjectCoords (Part 7 of 11) [Show more] Type: Subroutine Category: 3D geometry Summary: Pre-process feeding and flying aliens (objects 31, 32 and 33) Deep dive: 3D objects
Context: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
.objc6 \ If we get here then the object ID is 31, 32 or 33 LDX alienSlot-30,Y \ If the slot for alien Y contains a negative number, BMI objc7 \ then the slot is empty, so jump to objc11 via objc7 \ to return from the subroutine LDA alienState,X \ If the alien's state is >= 27, then it is heading for CMP #27 \ Acornsville, so jump to objc9 to process this object BCS objc9 LDA alienObjectId,X \ Set A to the object ID for this alien BPL objc5 \ If A is positive, jump to objc5 to set the object \ coordinates and process this object .objc7 JMP objc11 \ Jump to objc11 to move on to the next alien in the \ group (for object 30) or return from the subroutine \ (for objects 31 to 33) .objc8 JMP objc12 \ Jump to objc12 to return from the subroutine