\ If we get here then the object ID is 6, 7, 8 or 9, so \ this is an object group (e.g. a tree) LDA #8 \ Set objCount = 8 to act as a counter in the loop STA objCount \ below, so we work through all 8 objects in this object \ group .objc2 LDX objectGroup-6,Y \ Set X = 0, 8, 16 or 24, for Y = 6, 7, 8 or 9 \ \ (or 1, 9, 17, 25 etc., depending on the current group) LDA xGroupObjectHi,X \ Set the object's x-coordinate to the X-th entry in STA xObjectHi,Y \ xGroupObjectHi, which contains the high byte of the \ group object's x-coordinate LDA zGroupObjectHi,X \ Set the object's z-coordinate to the X-th entry in STA zObjectHi,Y \ zGroupObjectHi, which contains the high byte of the \ group object's z-coordinate JMP objc9 \ Jump to objc9 to process this objectName: SetObjectCoords (Part 4 of 11) [Show more] Type: Subroutine Category: 3D geometry Summary: Pre-process the object groups (objects 6, 7, 8 or 9) Deep dive: 3D objectsContext: See this subroutine in context in the source code References: No direct references to this subroutine in this source file
[X]
Variable objCount in workspace Main variable workspace
Temporary storage, used as a loop counter in the object group visibility checks (shares a memory location with the alien variable)
[X]
Label objc9 in subroutine SetObjectCoords (Part 8 of 11)
[X]
Variable objectGroup (category: 3D geometry)
The current group number for object IDs 6, 7, 8 and 9
[X]
Variable xGroupObjectHi (category: 3D geometry)
High byte of the x-coordinate for objects in a group (6 to 9)
[X]
Variable xObjectHi (category: 3D geometry)
High byte of the x-coordinate for an object
[X]
Variable zGroupObjectHi (category: 3D geometry)
High byte of the z-coordinate for objects in a group (6 to 9)
[X]
Variable zObjectHi (category: 3D geometry)
High byte of the z-coordinate for an object