.screenBufferRow13 EQUB &FF, &FF, &FF, &FF, &FF, &7F, &FF, &FF \ These values are workspace EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF \ noise and have no meaning EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &12 EQUB &FE, &FE, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &FF, &FF, &FF, &FF, &FF, &7F, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FFName: screenBufferRow13 [Show more] Type: Subroutine Category: Screen buffer Summary: The screen buffer for character row 13Context: See this subroutine on its own page References: This subroutine is called as follows: * bufferRowAddrHi calls screenBufferRow13 * bufferRowAddrLo calls screenBufferRow13.objPolygonAddrLo EQUB LO(objPolygon000) \ Object type 0: Robot (polygons 0 to 26) EQUB LO(objPolygon001) EQUB LO(objPolygon002) EQUB LO(objPolygon003) EQUB LO(objPolygon004) EQUB LO(objPolygon005) EQUB LO(objPolygon006) EQUB LO(objPolygon007) EQUB LO(objPolygon008) EQUB LO(objPolygon009) EQUB LO(objPolygon010) EQUB LO(objPolygon011) EQUB LO(objPolygon012) EQUB LO(objPolygon013) EQUB LO(objPolygon014) EQUB LO(objPolygon015) EQUB LO(objPolygon016) EQUB LO(objPolygon017) EQUB LO(objPolygon018) EQUB LO(objPolygon019) EQUB LO(objPolygon020) EQUB LO(objPolygon021) EQUB LO(objPolygon022) EQUB LO(objPolygon023) EQUB LO(objPolygon024) EQUB LO(objPolygon025) EQUB LO(objPolygon026) EQUB LO(objPolygon027) \ Object type 1: Sentry (polygons 27 to 51) EQUB LO(objPolygon028) EQUB LO(objPolygon029) EQUB LO(objPolygon030) EQUB LO(objPolygon031) EQUB LO(objPolygon032) EQUB LO(objPolygon033) EQUB LO(objPolygon034) EQUB LO(objPolygon035) EQUB LO(objPolygon036) EQUB LO(objPolygon037) EQUB LO(objPolygon038) EQUB LO(objPolygon039) EQUB LO(objPolygon040) EQUB LO(objPolygon041) EQUB LO(objPolygon042) EQUB LO(objPolygon043) EQUB LO(objPolygon044) EQUB LO(objPolygon045) EQUB LO(objPolygon046) EQUB LO(objPolygon047) EQUB LO(objPolygon048) EQUB LO(objPolygon049) EQUB LO(objPolygon050) EQUB LO(objPolygon051) EQUB LO(objPolygon052) \ Object type 2: Tree (polygons 52 to 66) EQUB LO(objPolygon053) EQUB LO(objPolygon054) EQUB LO(objPolygon055) EQUB LO(objPolygon056) EQUB LO(objPolygon057) EQUB LO(objPolygon058) EQUB LO(objPolygon059) EQUB LO(objPolygon060) EQUB LO(objPolygon061) EQUB LO(objPolygon062) EQUB LO(objPolygon063) EQUB LO(objPolygon064) EQUB LO(objPolygon065) EQUB LO(objPolygon066) EQUB LO(objPolygon067) \ Object type 3: Boulder (polygons 67 to 76) EQUB LO(objPolygon068) EQUB LO(objPolygon069) EQUB LO(objPolygon070) EQUB LO(objPolygon071) EQUB LO(objPolygon072) EQUB LO(objPolygon073) EQUB LO(objPolygon074) EQUB LO(objPolygon075) EQUB LO(objPolygon076) EQUB LO(objPolygon077) \ Object type 4: Meanie (polygons 77 to 101) EQUB LO(objPolygon078) EQUB LO(objPolygon079) EQUB LO(objPolygon080) EQUB LO(objPolygon081) EQUB LO(objPolygon082) EQUB LO(objPolygon083) EQUB LO(objPolygon084) EQUB LO(objPolygon085) EQUB LO(objPolygon086) EQUB LO(objPolygon087) EQUB LO(objPolygon088) EQUB LO(objPolygon089) EQUB LO(objPolygon090) EQUB LO(objPolygon091) EQUB LO(objPolygon092) EQUB LO(objPolygon093) EQUB LO(objPolygon094) EQUB LO(objPolygon095) EQUB LO(objPolygon096) EQUB LO(objPolygon097) EQUB LO(objPolygon098) EQUB LO(objPolygon099) EQUB LO(objPolygon100) EQUB LO(objPolygon101) EQUB LO(objPolygon102) \ Object type 5: The Sentinel (polygons 102 to 136) EQUB LO(objPolygon103) EQUB LO(objPolygon104) EQUB LO(objPolygon105) EQUB LO(objPolygon106) EQUB LO(objPolygon107) EQUB LO(objPolygon108) EQUB LO(objPolygon109) EQUB LO(objPolygon110) EQUB LO(objPolygon111) EQUB LO(objPolygon112) EQUB LO(objPolygon113) EQUB LO(objPolygon114) EQUB LO(objPolygon115) EQUB LO(objPolygon116) EQUB LO(objPolygon117) EQUB LO(objPolygon118) EQUB LO(objPolygon119) EQUB LO(objPolygon120) EQUB LO(objPolygon121) EQUB LO(objPolygon122) EQUB LO(objPolygon123) EQUB LO(objPolygon124) EQUB LO(objPolygon125) EQUB LO(objPolygon126) EQUB LO(objPolygon127) EQUB LO(objPolygon128) EQUB LO(objPolygon129) EQUB LO(objPolygon130) EQUB LO(objPolygon131) EQUB LO(objPolygon132) EQUB LO(objPolygon133) EQUB LO(objPolygon134) EQUB LO(objPolygon135) EQUB LO(objPolygon136) EQUB LO(objPolygon137) \ Object type 6: Sentinel's tower (polygons 137 to 147) EQUB LO(objPolygon138) EQUB LO(objPolygon139) EQUB LO(objPolygon140) EQUB LO(objPolygon141) EQUB LO(objPolygon142) EQUB LO(objPolygon143) EQUB LO(objPolygon144) EQUB LO(objPolygon145) EQUB LO(objPolygon146) EQUB LO(objPolygon147) EQUB LO(objPolygon148) \ Object type 7: 3D text block 1 (polygons 148 to 151) EQUB LO(objPolygon149) \ EQUB LO(objPolygon150) \ Polygons 148 to 151 use the point list in objTextBlock EQUB LO(objPolygon151) \ with a point range of 136 to 143 EQUB LO(objPolygon148) \ Object type 8: 3D text block 2 (polygons 152 to 155) EQUB LO(objPolygon149) \ EQUB LO(objPolygon150) \ Polygons 152 to 155 use the point list in objTextBlock EQUB LO(objPolygon151) \ with a point range of 144 to 151 EQUB LO(objPolygon148) \ Object type 9: 3D text block 3 (polygons 156 to 159) EQUB LO(objPolygon149) \ EQUB LO(objPolygon150) \ Polygons 156 to 159 use the point list in objTextBlock EQUB LO(objPolygon151) \ with a point range of 152 to 159Name: objPolygonAddrLo [Show more] Type: Variable Category: Drawing objects Summary: Addresses for the list of polygons and points for each object (low byte)Context: See this variable on its own page References: This variable is used as follows: * DrawObject uses objPolygonAddrLo.screenBufferRow14 EQUB &FE, &FE, &FF, &FF, &FF, &FF, &FF, &FF \ These values are workspace EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF \ noise and have no meaning EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &FF, &FF, &FF, &FF, &FF, &7F, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &FE, &FE, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FFName: screenBufferRow14 [Show more] Type: Subroutine Category: Screen buffer Summary: The screen buffer for character row 14Context: See this subroutine on its own page References: This subroutine is called as follows: * bufferRowAddrHi calls screenBufferRow14 * bufferRowAddrLo calls screenBufferRow14.objPolygonAddrHi EQUB HI(objPolygon000) \ Object type 0: Robot (polygons 0 to 26) EQUB HI(objPolygon001) EQUB HI(objPolygon002) EQUB HI(objPolygon003) EQUB HI(objPolygon004) EQUB HI(objPolygon005) EQUB HI(objPolygon006) EQUB HI(objPolygon007) EQUB HI(objPolygon008) EQUB HI(objPolygon009) EQUB HI(objPolygon010) EQUB HI(objPolygon011) EQUB HI(objPolygon012) EQUB HI(objPolygon013) EQUB HI(objPolygon014) EQUB HI(objPolygon015) EQUB HI(objPolygon016) EQUB HI(objPolygon017) EQUB HI(objPolygon018) EQUB HI(objPolygon019) EQUB HI(objPolygon020) EQUB HI(objPolygon021) EQUB HI(objPolygon022) EQUB HI(objPolygon023) EQUB HI(objPolygon024) EQUB HI(objPolygon025) EQUB HI(objPolygon026) EQUB HI(objPolygon027) \ Object type 1: Sentry (polygons 27 to 51) EQUB HI(objPolygon028) EQUB HI(objPolygon029) EQUB HI(objPolygon030) EQUB HI(objPolygon031) EQUB HI(objPolygon032) EQUB HI(objPolygon033) EQUB HI(objPolygon034) EQUB HI(objPolygon035) EQUB HI(objPolygon036) EQUB HI(objPolygon037) EQUB HI(objPolygon038) EQUB HI(objPolygon039) EQUB HI(objPolygon040) EQUB HI(objPolygon041) EQUB HI(objPolygon042) EQUB HI(objPolygon043) EQUB HI(objPolygon044) EQUB HI(objPolygon045) EQUB HI(objPolygon046) EQUB HI(objPolygon047) EQUB HI(objPolygon048) EQUB HI(objPolygon049) EQUB HI(objPolygon050) EQUB HI(objPolygon051) EQUB HI(objPolygon052) \ Object type 2: Tree (polygons 52 to 66) EQUB HI(objPolygon053) EQUB HI(objPolygon054) EQUB HI(objPolygon055) EQUB HI(objPolygon056) EQUB HI(objPolygon057) EQUB HI(objPolygon058) EQUB HI(objPolygon059) EQUB HI(objPolygon060) EQUB HI(objPolygon061) EQUB HI(objPolygon062) EQUB HI(objPolygon063) EQUB HI(objPolygon064) EQUB HI(objPolygon065) EQUB HI(objPolygon066) EQUB HI(objPolygon067) \ Object type 3: Boulder (polygons 67 to 76) EQUB HI(objPolygon068) EQUB HI(objPolygon069) EQUB HI(objPolygon070) EQUB HI(objPolygon071) EQUB HI(objPolygon072) EQUB HI(objPolygon073) EQUB HI(objPolygon074) EQUB HI(objPolygon075) EQUB HI(objPolygon076) EQUB HI(objPolygon077) \ Object type 4: Meanie (polygons 77 to 101) EQUB HI(objPolygon078) EQUB HI(objPolygon079) EQUB HI(objPolygon080) EQUB HI(objPolygon081) EQUB HI(objPolygon082) EQUB HI(objPolygon083) EQUB HI(objPolygon084) EQUB HI(objPolygon085) EQUB HI(objPolygon086) EQUB HI(objPolygon087) EQUB HI(objPolygon088) EQUB HI(objPolygon089) EQUB HI(objPolygon090) EQUB HI(objPolygon091) EQUB HI(objPolygon092) EQUB HI(objPolygon093) EQUB HI(objPolygon094) EQUB HI(objPolygon095) EQUB HI(objPolygon096) EQUB HI(objPolygon097) EQUB HI(objPolygon098) EQUB HI(objPolygon099) EQUB HI(objPolygon100) EQUB HI(objPolygon101) EQUB HI(objPolygon102) \ Object type 5: The Sentinel (polygons 102 to 136) EQUB HI(objPolygon103) EQUB HI(objPolygon104) EQUB HI(objPolygon105) EQUB HI(objPolygon106) EQUB HI(objPolygon107) EQUB HI(objPolygon108) EQUB HI(objPolygon109) EQUB HI(objPolygon110) EQUB HI(objPolygon111) EQUB HI(objPolygon112) EQUB HI(objPolygon113) EQUB HI(objPolygon114) EQUB HI(objPolygon115) EQUB HI(objPolygon116) EQUB HI(objPolygon117) EQUB HI(objPolygon118) EQUB HI(objPolygon119) EQUB HI(objPolygon120) EQUB HI(objPolygon121) EQUB HI(objPolygon122) EQUB HI(objPolygon123) EQUB HI(objPolygon124) EQUB HI(objPolygon125) EQUB HI(objPolygon126) EQUB HI(objPolygon127) EQUB HI(objPolygon128) EQUB HI(objPolygon129) EQUB HI(objPolygon130) EQUB HI(objPolygon131) EQUB HI(objPolygon132) EQUB HI(objPolygon133) EQUB HI(objPolygon134) EQUB HI(objPolygon135) EQUB HI(objPolygon136) EQUB HI(objPolygon137) \ Object type 6: Sentinel's tower (polygons 137 to 147) EQUB HI(objPolygon138) EQUB HI(objPolygon139) EQUB HI(objPolygon140) EQUB HI(objPolygon141) EQUB HI(objPolygon142) EQUB HI(objPolygon143) EQUB HI(objPolygon144) EQUB HI(objPolygon145) EQUB HI(objPolygon146) EQUB HI(objPolygon147) EQUB HI(objPolygon148) \ Object type 7: 3D text block 1 (polygons 148 to 151) EQUB HI(objPolygon149) EQUB HI(objPolygon150) EQUB HI(objPolygon151) EQUB HI(objPolygon148) \ Object type 8: 3D text block 2 (polygons 152 to 155) EQUB HI(objPolygon149) \ EQUB HI(objPolygon150) \ Polygons 152 to 155 reuse the points from 148 to 151 EQUB HI(objPolygon151) EQUB HI(objPolygon148) \ Object type 9: 3D text block 3 (polygons 156 to 159) EQUB HI(objPolygon149) \ EQUB HI(objPolygon150) \ Polygons 156 to 159 reuse the points from 148 to 151 EQUB HI(objPolygon151)Name: objPolygonAddrHi [Show more] Type: Variable Category: Drawing objects Summary: Addresses for the list of polygons and points for each object (high byte)Context: See this variable on its own page References: This variable is used as follows: * DrawObject uses objPolygonAddrHi.screenBufferRow15 EQUB &FF, &FF, &FF, &FF, &FF, &7F, &FF, &FF \ These values are workspace EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF \ noise and have no meaning EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &FE, &FE, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &FF, &FF, &FF, &FF, &FF, &7F, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FFName: screenBufferRow15 [Show more] Type: Subroutine Category: Screen buffer Summary: The screen buffer for character row 15Context: See this subroutine on its own page References: This subroutine is called as follows: * bufferRowAddrHi calls screenBufferRow15 * bufferRowAddrLo calls screenBufferRow15.objSentinel .objPolygon102 EQUB 64 + 20 \ Polygon 102 points: 114, 110, 111, 115, 114 EQUB 64 + 16 EQUB 64 + 17 EQUB 64 + 21 EQUB 64 + 20 .objPolygon103 EQUB 64 + 17 \ Polygon 103 points: 111, 108, 115, 111 EQUB 64 + 14 EQUB 64 + 21 EQUB 64 + 17 .objPolygon104 EQUB 64 + 20 \ Polygon 104 points: 114, 109, 110, 114 EQUB 64 + 15 EQUB 64 + 16 EQUB 64 + 20 .objPolygon105 EQUB 64 + 15 \ Polygon 105 points: 109, 113, 112, 108, 109 EQUB 64 + 19 EQUB 64 + 18 EQUB 64 + 14 EQUB 64 + 15 .objPolygon106 EQUB 64 + 3 \ Polygon 106 points: 97, 101, 100, 96, 97 EQUB 64 + 7 EQUB 64 + 6 EQUB 64 + 2 EQUB 64 + 3 .objPolygon107 EQUB 64 + 0 \ Polygon 107 points: 94, 98, 101, 97, 94 EQUB 64 + 4 EQUB 64 + 7 EQUB 64 + 3 EQUB 64 + 0 .objPolygon108 EQUB 64 + 2 \ Polygon 108 points: 96, 100, 99, 95, 96 EQUB 64 + 6 EQUB 64 + 5 EQUB 64 + 1 EQUB 64 + 2 .objPolygon109 EQUB 64 + 1 \ Polygon 109 points: 95, 99, 98, 94, 95 EQUB 64 + 5 EQUB 64 + 4 EQUB 64 + 0 EQUB 64 + 1 .objPolygon110 EQUB 64 + 7 \ Polygon 110 points: 101, 106, 105, 100, 101 EQUB 64 + 12 EQUB 64 + 11 EQUB 64 + 6 EQUB 64 + 7 .objPolygon111 EQUB 64 + 4 \ Polygon 111 points: 98, 107, 101, 98 EQUB 64 + 13 EQUB 64 + 7 EQUB 64 + 4 .objPolygon112 EQUB 64 + 6 \ Polygon 112 points: 100, 104, 99, 100 EQUB 64 + 10 EQUB 64 + 5 EQUB 64 + 6 .objPolygon113 EQUB 64 + 5 \ Polygon 113 points: 99, 103, 102, 98, 99 EQUB 64 + 9 EQUB 64 + 8 EQUB 64 + 4 EQUB 64 + 5 .objPolygon114 EQUB 64 + 7 \ Polygon 114 points: 101, 107, 106, 101 EQUB 64 + 13 EQUB 64 + 12 EQUB 64 + 7 .objPolygon115 EQUB 64 + 6 \ Polygon 115 points: 100, 105, 104, 100 EQUB 64 + 11 EQUB 64 + 10 EQUB 64 + 6 .objPolygon116 EQUB 64 + 4 \ Polygon 116 points: 98, 102, 107, 98 EQUB 64 + 8 EQUB 64 + 13 EQUB 64 + 4 .objPolygon117 EQUB 64 + 5 \ Polygon 117 points: 99, 104, 103, 99 EQUB 64 + 10 EQUB 64 + 9 EQUB 64 + 5 .objPolygon118 EQUB 64 + 13 \ Polygon 118 points: 107, 111, 106, 107 EQUB 64 + 17 EQUB 64 + 12 EQUB 64 + 13 .objPolygon119 EQUB 64 + 11 \ Polygon 119 points: 105, 110, 104, 105 EQUB 64 + 16 EQUB 64 + 10 EQUB 64 + 11 .objPolygon120 EQUB 64 + 12 \ Polygon 120 points: 106, 111, 110, 105, 106 EQUB 64 + 17 EQUB 64 + 16 EQUB 64 + 11 EQUB 64 + 12 .objPolygon121 EQUB 64 + 13 \ Polygon 121 points: 107, 108, 111, 107 EQUB 64 + 14 EQUB 64 + 17 EQUB 64 + 13 .objPolygon122 EQUB 64 + 10 \ Polygon 122 points: 104, 110, 109, 104 EQUB 64 + 16 EQUB 64 + 15 EQUB 64 + 10 .objPolygon123 EQUB 64 + 8 \ Polygon 123 points: 102, 108, 107, 102 EQUB 64 + 14 EQUB 64 + 13 EQUB 64 + 8 .objPolygon124 EQUB 64 + 9 \ Polygon 124 points: 103, 104, 109, 103 EQUB 64 + 10 EQUB 64 + 15 EQUB 64 + 9 .objPolygon125 EQUB 64 + 9 \ Polygon 125 points: 103, 109, 108, 102, 103 EQUB 64 + 15 EQUB 64 + 14 EQUB 64 + 8 EQUB 64 + 9 .objPolygon126 EQUB 64 + 25 \ Polygon 126 points: 119, 121, 120, 118, 119 EQUB 64 + 27 EQUB 64 + 26 EQUB 64 + 24 EQUB 64 + 25 .objPolygon127 EQUB 64 + 21 \ Polygon 127 points: 115, 123, 122, 114, 115 EQUB 64 + 29 EQUB 64 + 28 EQUB 64 + 20 EQUB 64 + 21 .objPolygon128 EQUB 64 + 14 \ Polygon 128 points: 108, 118, 115, 108 EQUB 64 + 24 EQUB 64 + 21 EQUB 64 + 14 .objPolygon129 EQUB 64 + 20 \ Polygon 129 points: 114, 119, 109, 114 EQUB 64 + 25 EQUB 64 + 15 EQUB 64 + 20 .objPolygon130 EQUB 64 + 18 \ Polygon 130 points: 112, 116, 118, 108, 112 EQUB 64 + 22 EQUB 64 + 24 EQUB 64 + 14 EQUB 64 + 18 .objPolygon131 EQUB 64 + 15 \ Polygon 131 points: 109, 119, 117, 113, 109 EQUB 64 + 25 EQUB 64 + 23 EQUB 64 + 19 EQUB 64 + 15 .objPolygon132 EQUB 64 + 23 \ Polygon 132 points: 117, 119, 118, 116, 117 EQUB 64 + 25 EQUB 64 + 24 EQUB 64 + 22 EQUB 64 + 23 .objPolygon133 EQUB 64 + 19 \ Polygon 133 points: 113, 117, 116, 112, 113 EQUB 64 + 23 EQUB 64 + 22 EQUB 64 + 18 EQUB 64 + 19 .objPolygon134 EQUB 64 + 27 \ Polygon 134 points: 121, 122, 123, 120, 121 EQUB 64 + 28 EQUB 64 + 29 EQUB 64 + 26 EQUB 64 + 27 .objPolygon135 EQUB 64 + 24 \ Polygon 135 points: 118, 120, 123, 115, 118 EQUB 64 + 26 EQUB 64 + 29 EQUB 64 + 21 EQUB 64 + 24 .objPolygon136 EQUB 64 + 20 \ Polygon 136 points: 114, 122, 121, 119, 114 EQUB 64 + 28 EQUB 64 + 27 EQUB 64 + 25 EQUB 64 + 20 EQUB &10 \ This byte appears to be unusedName: objSentinel [Show more] Type: Variable Category: Drawing objects Summary: The list of polygons and points for the Sentinel object (polygons 102 to 136, using points 94 to 123)Context: See this variable on its own page References: No direct references to this variable in this source file.objTree .objPolygon052 EQUB 64 + 8 \ Polygon 52 points: 59, 66, 65, 60, 59 EQUB 64 + 15 EQUB 64 + 14 EQUB 64 + 9 EQUB 64 + 8 .objPolygon053 EQUB 64 + 9 \ Polygon 53 points: 60, 65, 64, 61, 60 EQUB 64 + 14 EQUB 64 + 13 EQUB 64 + 10 EQUB 64 + 9 .objPolygon054 EQUB 64 + 10 \ Polygon 54 points: 61, 64, 63, 62, 61 EQUB 64 + 13 EQUB 64 + 12 EQUB 64 + 11 EQUB 64 + 10 .objPolygon055 EQUB 64 + 1 \ Polygon 55 points: 52, 56, 55, 51, 52 EQUB 64 + 5 EQUB 64 + 4 EQUB 64 + 0 EQUB 64 + 1 .objPolygon056 EQUB 64 + 2 \ Polygon 56 points: 53, 57, 56, 52, 53 EQUB 64 + 6 EQUB 64 + 5 EQUB 64 + 1 EQUB 64 + 2 .objPolygon057 EQUB 64 + 0 \ Polygon 57 points: 51, 55, 58, 54, 51 EQUB 64 + 4 EQUB 64 + 7 EQUB 64 + 3 EQUB 64 + 0 .objPolygon058 EQUB 64 + 3 \ Polygon 58 points: 54, 58, 57, 53, 54 EQUB 64 + 7 EQUB 64 + 6 EQUB 64 + 2 EQUB 64 + 3 .objPolygon059 EQUB 64 + 8 \ Polygon 59 points: 59, 67, 66, 59 EQUB 64 + 16 EQUB 64 + 15 EQUB 64 + 8 .objPolygon060 EQUB 64 + 9 \ Polygon 60 points: 60, 67, 59, 60 EQUB 64 + 16 EQUB 64 + 8 EQUB 64 + 9 .objPolygon061 EQUB 64 + 10 \ Polygon 61 points: 61, 67, 60, 61 EQUB 64 + 16 EQUB 64 + 9 EQUB 64 + 10 .objPolygon062 EQUB 64 + 11 \ Polygon 62 points: 62, 67, 61, 62 EQUB 64 + 16 EQUB 64 + 10 EQUB 64 + 11 .objPolygon063 EQUB 64 + 12 \ Polygon 63 points: 63, 67, 62, 63 EQUB 64 + 16 EQUB 64 + 11 EQUB 64 + 12 .objPolygon064 EQUB 64 + 13 \ Polygon 64 points: 64, 67, 63, 64 EQUB 64 + 16 EQUB 64 + 12 EQUB 64 + 13 .objPolygon065 EQUB 64 + 14 \ Polygon 65 points: 65, 67, 64, 65 EQUB 64 + 16 EQUB 64 + 13 EQUB 64 + 14 .objPolygon066 EQUB 64 + 15 \ Polygon 66 points: 66, 67, 65, 66 EQUB 64 + 16 EQUB 64 + 14 EQUB 64 + 15Name: objTree [Show more] Type: Variable Category: Drawing objects Summary: The list of polygons and points for the tree object (polygons 52 to 66, using points 51 to 67)Context: See this variable on its own page References: No direct references to this variable in this source file.objBoulder .objPolygon067 EQUB 64 + 1 \ Polygon 67 points: 69, 68, 75, 69 EQUB 64 + 0 EQUB 64 + 7 EQUB 64 + 1 .objPolygon068 EQUB 64 + 3 \ Polygon 68 points: 71, 70, 69, 71 EQUB 64 + 2 EQUB 64 + 1 EQUB 64 + 3 .objPolygon069 EQUB 64 + 5 \ Polygon 69 points: 73, 72, 71, 73 EQUB 64 + 4 EQUB 64 + 3 EQUB 64 + 5 .objPolygon070 EQUB 64 + 7 \ Polygon 70 points: 75, 74, 73, 75 EQUB 64 + 6 EQUB 64 + 5 EQUB 64 + 7 .objPolygon071 EQUB 64 + 1 \ Polygon 71 points: 69, 70, 68, 69 EQUB 64 + 2 EQUB 64 + 0 EQUB 64 + 1 .objPolygon072 EQUB 64 + 3 \ Polygon 72 points: 71, 72, 70, 71 EQUB 64 + 4 EQUB 64 + 2 EQUB 64 + 3 .objPolygon073 EQUB 64 + 5 \ Polygon 73 points: 73, 74, 72, 73 EQUB 64 + 6 EQUB 64 + 4 EQUB 64 + 5 .objPolygon074 EQUB 64 + 7 \ Polygon 74 points: 75, 68, 74, 75 EQUB 64 + 0 EQUB 64 + 6 EQUB 64 + 7 .objPolygon075 EQUB 64 + 1 \ Polygon 75 points: 69, 75, 73, 71, 69 EQUB 64 + 7 EQUB 64 + 5 EQUB 64 + 3 EQUB 64 + 1 .objPolygon076 EQUB 64 + 0 \ Polygon 76 points: 68, 70, 72, 74, 68 EQUB 64 + 2 EQUB 64 + 4 EQUB 64 + 6 EQUB 64 + 0Name: objBoulder [Show more] Type: Variable Category: Drawing objects Summary: The list of polygons and points for the boulder object (polygons 67 to 76, using points 68 to 75)Context: See this variable on its own page References: No direct references to this variable in this source file.objTower .objPolygon137 EQUB 64 + 1 \ Polygon 137 points: 125, 130, 129, 124, 125 EQUB 64 + 6 EQUB 64 + 5 EQUB 64 + 0 EQUB 64 + 1 .objPolygon138 EQUB 64 + 2 \ Polygon 138 points: 126, 132, 131, 125, 126 EQUB 64 + 8 EQUB 64 + 7 EQUB 64 + 1 EQUB 64 + 2 .objPolygon139 EQUB 64 + 3 \ Polygon 139 points: 127, 134, 133, 126, 127 EQUB 64 + 10 EQUB 64 + 9 EQUB 64 + 2 EQUB 64 + 3 .objPolygon140 EQUB 64 + 0 \ Polygon 140 points: 124, 128, 135, 127, 124 EQUB 64 + 4 EQUB 64 + 11 EQUB 64 + 3 EQUB 64 + 0 .objPolygon141 EQUB 64 + 0 \ Polygon 141 points: 124, 129, 128, 124 EQUB 64 + 5 EQUB 64 + 4 EQUB 64 + 0 .objPolygon142 EQUB 64 + 1 \ Polygon 142 points: 125, 131, 130, 125 EQUB 64 + 7 EQUB 64 + 6 EQUB 64 + 1 .objPolygon143 EQUB 64 + 2 \ Polygon 143 points: 126, 133, 132, 126 EQUB 64 + 9 EQUB 64 + 8 EQUB 64 + 2 .objPolygon144 EQUB 64 + 3 \ Polygon 144 points: 127, 135, 134, 127 EQUB 64 + 11 EQUB 64 + 10 EQUB 64 + 3 .objPolygon145 EQUB 64 + 6 \ Polygon 145 points: 130, 131, 132, 133, 130 EQUB 64 + 7 EQUB 64 + 8 EQUB 64 + 9 EQUB 64 + 6 .objPolygon146 EQUB 64 + 6 \ Polygon 146 points: 130, 133, 134, 129, 130 EQUB 64 + 9 EQUB 64 + 10 EQUB 64 + 5 EQUB 64 + 6 .objPolygon147 EQUB 64 + 5 \ Polygon 147 points: 129, 134, 135, 128, 129 EQUB 64 + 10 EQUB 64 + 11 EQUB 64 + 4 EQUB 64 + 5Name: objTower [Show more] Type: Variable Category: Drawing objects Summary: The list of polygons and points for the Sentinel's tower object (polygons 137 to 147, using points 124 to 135)Context: See this variable on its own page References: No direct references to this variable in this source file.objTextBlock .objPolygon148 EQUB 64 + 0 \ Polygon 148 points: 136, 140, 143, 139, 136 EQUB 64 + 4 \ Polygon 152 points: 144, 148, 151, 147, 144 EQUB 64 + 7 \ Polygon 156 points: 152, 156, 159, 155, 152 EQUB 64 + 3 EQUB 64 + 0 .objPolygon149 EQUB 64 + 2 \ Polygon 149 points: 138, 142, 141, 137, 138 EQUB 64 + 6 \ Polygon 153 points: 146, 150, 149, 145, 146 EQUB 64 + 5 \ Polygon 157 points: 154, 158, 157, 153, 154 EQUB 64 + 1 EQUB 64 + 2 .objPolygon150 EQUB 64 + 1 \ Polygon 150 points: 137, 141, 140, 136, 137 EQUB 64 + 5 \ Polygon 154 points: 145, 149, 148, 144, 145 EQUB 64 + 4 \ Polygon 158 points: 153, 157, 156, 152, 153 EQUB 64 + 0 EQUB 64 + 1 .objPolygon151 EQUB 64 + 5 \ Polygon 151 points: 141, 142, 143, 140, 141 EQUB 64 + 6 \ Polygon 155 points: 149, 150, 151, 148, 149 EQUB 64 + 7 \ Polygon 159 points: 157, 158, 159, 156, 157 EQUB 64 + 4 EQUB 64 + 5Name: objTextBlock [Show more] Type: Variable Category: Drawing objects Summary: The list of polygons and points for the 3D text block object (polygons 148 to 151, using points 136 to 143)Context: See this variable on its own page References: No direct references to this variable in this source file
The three 3D text block objects share the same point lists below, as they have the same basic block shape, but they have different point ranges and so have different dimensions (one for each of the three block pairs we need to draw large 3D text on the title screens). * Object 7, 3D text block 1, draws no-block (left), block (right). It is made up of polygons 148 to 151, using points 136 to 143. * Object 8, 3D text block 2, draws block (left), no-block (right). It is made up of polygons 152 to 155, using points 144 to 151. * Object 9, 3D text block 3, draws block (left), block (right). It is made up of polygons 156 to 159, using points 152 to 159. See the SpawnCharacter3D routine for more about the block pairs that are used to draw large 3D text..objRobot .objPolygon000 EQUB 64 + 11 \ Polygon points: 11, 10, 8, 12, 11 EQUB 64 + 10 EQUB 64 + 8 EQUB 64 + 12 EQUB 64 + 11 .objPolygon001 EQUB 64 + 10 \ Polygon 1 points: 10, 9, 8, 10 EQUB 64 + 9 EQUB 64 + 8 EQUB 64 + 10 .objPolygon002 EQUB 64 + 20 \ Polygon 2 points: 20, 19, 18, 21, 20 EQUB 64 + 19 EQUB 64 + 18 EQUB 64 + 21 EQUB 64 + 20 .objPolygon003 EQUB 64 + 0 \ Polygon 3 points: 0, 4, 7, 3, 0 EQUB 64 + 4 EQUB 64 + 7 EQUB 64 + 3 EQUB 64 + 0 .objPolygon004 EQUB 64 + 2 \ Polygon 4 points: 2, 6, 5, 1, 2 EQUB 64 + 6 EQUB 64 + 5 EQUB 64 + 1 EQUB 64 + 2 .objPolygon005 EQUB 64 + 3 \ Polygon 5 points: 3, 7, 6, 2, 3 EQUB 64 + 7 EQUB 64 + 6 EQUB 64 + 2 EQUB 64 + 3 .objPolygon006 EQUB 64 + 1 \ Polygon 6 points: 1, 5, 4, 0, 1 EQUB 64 + 5 EQUB 64 + 4 EQUB 64 + 0 EQUB 64 + 1 .objPolygon007 EQUB 64 + 8 \ Polygon 7 points: 8, 13, 16, 12, 8 EQUB 64 + 13 EQUB 64 + 16 EQUB 64 + 12 EQUB 64 + 8 .objPolygon008 EQUB 64 + 11 \ Polygon 8 points: 11, 15, 14, 10, 11 EQUB 64 + 15 EQUB 64 + 14 EQUB 64 + 10 EQUB 64 + 11 .objPolygon009 EQUB 64 + 12 \ Polygon 9 points: 12, 16, 15, 11, 12 EQUB 64 + 16 EQUB 64 + 15 EQUB 64 + 11 EQUB 64 + 12 .objPolygon010 EQUB 64 + 10 \ Polygon 10 points: 10, 28, 9, 10 EQUB 64 + 28 EQUB 64 + 9 EQUB 64 + 10 .objPolygon011 EQUB 64 + 9 \ Polygon 11 points: 9, 28, 8, 9 EQUB 64 + 28 EQUB 64 + 8 EQUB 64 + 9 .objPolygon012 EQUB 64 + 10 \ Polygon 12 points: 10, 14, 28, 10 EQUB 64 + 14 EQUB 64 + 28 EQUB 64 + 10 .objPolygon013 EQUB 64 + 8 \ Polygon 13 points: 8, 28, 13, 8 EQUB 64 + 28 EQUB 64 + 13 EQUB 64 + 8 .objPolygon014 EQUB 64 + 14 \ Polygon 14 points: 14, 17, 28, 14 EQUB 64 + 17 EQUB 64 + 28 EQUB 64 + 14 .objPolygon015 EQUB 64 + 28 \ Polygon 15 points: 28, 17, 13, 28 EQUB 64 + 17 EQUB 64 + 13 EQUB 64 + 28 .objPolygon016 EQUB 64 + 15 \ Polygon 16 points: 15, 17, 14, 15 EQUB 64 + 17 EQUB 64 + 14 EQUB 64 + 15 .objPolygon017 EQUB 64 + 13 \ Polygon 17 points: 13, 17, 16, 13 EQUB 64 + 17 EQUB 64 + 16 EQUB 64 + 13 .objPolygon018 EQUB 64 + 16 \ Polygon 18 points: 16, 17, 15, 16 EQUB 64 + 17 EQUB 64 + 15 EQUB 64 + 16 .objPolygon019 EQUB 64 + 19 \ Polygon 19 points: 19, 26, 27, 18, 19 EQUB 64 + 26 EQUB 64 + 27 EQUB 64 + 18 EQUB 64 + 19 .objPolygon020 EQUB 64 + 18 \ Polygon 20 points: 18, 27, 21, 18 EQUB 64 + 27 EQUB 64 + 21 EQUB 64 + 18 .objPolygon021 EQUB 64 + 20 \ Polygon 21 points: 20, 26, 19, 20 EQUB 64 + 26 EQUB 64 + 19 EQUB 64 + 20 .objPolygon022 EQUB 64 + 27 \ Polygon 22 points: 27, 22, 25, 21, 27 EQUB 64 + 22 EQUB 64 + 25 EQUB 64 + 21 EQUB 64 + 27 .objPolygon023 EQUB 64 + 20 \ Polygon 23 points: 20, 24, 23, 26, 20 EQUB 64 + 24 EQUB 64 + 23 EQUB 64 + 26 EQUB 64 + 20 .objPolygon024 EQUB 64 + 21 \ Polygon 24 points: 21, 25, 24, 20, 21 EQUB 64 + 25 EQUB 64 + 24 EQUB 64 + 20 EQUB 64 + 21 .objPolygon025 EQUB 64 + 23 \ Polygon 25 points: 23, 24, 25, 22, 23 EQUB 64 + 24 EQUB 64 + 25 EQUB 64 + 22 EQUB 64 + 23 .objPolygon026 EQUB 64 + 26 \ Polygon 26 points: 26, 23, 22, 27, 26 EQUB 64 + 23 EQUB 64 + 22 EQUB 64 + 27 EQUB 64 + 26Name: objRobot [Show more] Type: Variable Category: Drawing objects Summary: The list of polygons and points for the robot object (polygons 0 to 26, using points 0 to 28)Context: See this variable on its own page References: No direct references to this variable in this source file.objSentry .objPolygon027 EQUB 64 + 3 \ Polygon 27 points: 32, 37, 36, 31, 32 EQUB 64 + 8 EQUB 64 + 7 EQUB 64 + 2 EQUB 64 + 3 .objPolygon028 EQUB 64 + 0 \ Polygon 28 points: 29, 38, 32, 29 EQUB 64 + 9 EQUB 64 + 3 EQUB 64 + 0 .objPolygon029 EQUB 64 + 2 \ Polygon 29 points: 31, 35, 30, 31 EQUB 64 + 6 EQUB 64 + 1 EQUB 64 + 2 .objPolygon030 EQUB 64 + 1 \ Polygon 30 points: 30, 34, 33, 29, 30 EQUB 64 + 5 EQUB 64 + 4 EQUB 64 + 0 EQUB 64 + 1 .objPolygon031 EQUB 64 + 3 \ Polygon 31 points: 32, 38, 37, 32 EQUB 64 + 9 EQUB 64 + 8 EQUB 64 + 3 .objPolygon032 EQUB 64 + 2 \ Polygon 32 points: 31, 36, 35, 31 EQUB 64 + 7 EQUB 64 + 6 EQUB 64 + 2 .objPolygon033 EQUB 64 + 1 \ Polygon 33 points: 30, 35, 34, 30 EQUB 64 + 6 EQUB 64 + 5 EQUB 64 + 1 .objPolygon034 EQUB 64 + 0 \ Polygon 34 points: 29, 33, 38, 29 EQUB 64 + 4 EQUB 64 + 9 EQUB 64 + 0 .objPolygon035 EQUB 64 + 9 \ Polygon 35 points: 38, 42, 37, 38 EQUB 64 + 13 EQUB 64 + 8 EQUB 64 + 9 .objPolygon036 EQUB 64 + 8 \ Polygon 36 points: 37, 42, 41, 36, 37 EQUB 64 + 13 EQUB 64 + 12 EQUB 64 + 7 EQUB 64 + 8 .objPolygon037 EQUB 64 + 7 \ Polygon 37 points: 36, 41, 35, 36 EQUB 64 + 12 EQUB 64 + 6 EQUB 64 + 7 .objPolygon038 EQUB 64 + 6 \ Polygon 38 points: 35, 40, 34, 35 EQUB 64 + 11 EQUB 64 + 5 EQUB 64 + 6 .objPolygon039 EQUB 64 + 5 \ Polygon 39 points: 34, 40, 39, 33, 34 EQUB 64 + 11 EQUB 64 + 10 EQUB 64 + 4 EQUB 64 + 5 .objPolygon040 EQUB 64 + 4 \ Polygon 40 points: 33, 39, 38, 33 EQUB 64 + 10 EQUB 64 + 9 EQUB 64 + 4 .objPolygon041 EQUB 64 + 9 \ Polygon 41 points: 38, 39, 42, 38 EQUB 64 + 10 EQUB 64 + 13 EQUB 64 + 9 .objPolygon042 EQUB 64 + 6 \ Polygon 42 points: 35, 41, 40, 35 EQUB 64 + 12 EQUB 64 + 11 EQUB 64 + 6 .objPolygon043 EQUB 64 + 11 \ Polygon 43 points: 40, 44, 43, 39, 40 EQUB 64 + 15 EQUB 64 + 14 EQUB 64 + 10 EQUB 64 + 11 .objPolygon044 EQUB 64 + 13 \ Polygon 44 points: 42, 50, 49, 41, 42 EQUB 64 + 21 EQUB 64 + 20 EQUB 64 + 12 EQUB 64 + 13 .objPolygon045 EQUB 64 + 10 \ Polygon 45 points: 39, 47, 50, 42, 39 EQUB 64 + 18 EQUB 64 + 21 EQUB 64 + 13 EQUB 64 + 10 .objPolygon046 EQUB 64 + 12 \ Polygon 46 points: 41, 49, 48, 40, 41 EQUB 64 + 20 EQUB 64 + 19 EQUB 64 + 11 EQUB 64 + 12 .objPolygon047 EQUB 64 + 19 \ Polygon 47 points: 48, 49, 50, 47, 48 EQUB 64 + 20 EQUB 64 + 21 EQUB 64 + 18 EQUB 64 + 19 .objPolygon048 EQUB 64 + 17 \ Polygon 48 points: 46, 48, 47, 45, 46 EQUB 64 + 19 EQUB 64 + 18 EQUB 64 + 16 EQUB 64 + 17 .objPolygon049 EQUB 64 + 14 \ Polygon 49 points: 43, 45, 47, 39, 43 EQUB 64 + 16 EQUB 64 + 18 EQUB 64 + 10 EQUB 64 + 14 .objPolygon050 EQUB 64 + 11 \ Polygon 50 points: 40, 48, 46, 44, 40 EQUB 64 + 19 EQUB 64 + 17 EQUB 64 + 15 EQUB 64 + 11 .objPolygon051 EQUB 64 + 15 \ Polygon 51 points: 44, 46, 45, 43, 44 EQUB 64 + 17 EQUB 64 + 16 EQUB 64 + 14 EQUB 64 + 15Name: objSentry [Show more] Type: Variable Category: Drawing objects Summary: The list of polygons and points for the sentry object (polygons 27 to 51, using points 29 to 50)Context: See this variable on its own page References: No direct references to this variable in this source file.xPolygonPointLo EQUB &00, &00, &00, &00, &00, &00, &00, &00 \ These values are workspace EQUB &00, &00, &00, &00, &00, &00, &00, &00 \ noise and have no meaning EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &FF, &FF, &FF, &FF, &FF, &7F, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &FF, &FF, &FF, &FF, &FF, &FF, &FF, &FF EQUB &7E, &7B, &79, &7C, &7E, &7B, &79, &7C EQUB &B2, &B9, &B2, &A4, &A7, &A8, &A3, &9A EQUB &9C, &A5, &9F, &99, &97, &AC, &9E, &9A EQUB &A2, &9A, &A1, &9D, &9F, &A3, &00, &00Name: xPolygonPointLo [Show more] Type: Variable Category: Drawing polygons Summary: Pixel x-coordinates for all the points in the polygon that we are currently drawing (low bytes)Context: See this variable on its own page References: This variable is used as follows: * GetPolygonLines (Part 3 of 6) uses xPolygonPointLo * GetPolygonLines (Part 4 of 6) uses xPolygonPointLo * GetPolygonLines (Part 5 of 6) uses xPolygonPointLo * GetPolygonLines (Part 6 of 6) uses xPolygonPointLo.drawViewYawHi EQUB &01, &01, &02, &02, &03, &03, &04, &04 \ These values are workspace EQUB &05, &05, &06, &06, &07, &07, &08, &08 \ noise and have no meaning EQUB &09, &09, &0A, &0A, &0B, &0B, &0C, &0C EQUB &0C, &0D, &0D, &0E, &0E, &0F, &0F, &0F EQUB &01, &01, &02, &02, &03, &03, &04, &04 EQUB &05, &05, &06, &06, &07, &07, &08, &08 EQUB &09, &09, &0A, &0A, &0A, &0B, &0B, &0C EQUB &0C, &0D, &0D, &0E, &0E, &0E, &0F, &0F EQUB &0D, &0D, &0D, &0D, &0D, &0D, &0D, &0D EQUB &14, &15, &14, &12, &12, &13, &12, &11 EQUB &11, &12, &11, &11, &10, &13, &11, &11 EQUB &12, &11, &12, &11, &11, &12, &FF, &FFName: drawViewYawHi [Show more] Type: Variable Category: Drawing the landscape Summary: Storage for the yaw angles of tiles and object points for drawing the current landscape view (high bytes)Context: See this variable on its own page References: This variable is used as follows: * DrawLandscapeView (Part 3 of 3) uses drawViewYawHi * GetObjPointAngles uses drawViewYawHi * GetPolygonLines (Part 3 of 6) uses drawViewYawHi * GetPolygonLines (Part 4 of 6) uses drawViewYawHi * GetTileViewAngles (Part 1 of 4) uses drawViewYawHi * GetTileViewAngles (Part 4 of 4) uses drawViewYawHi
Tile angles are stored in the first 64 bytes (in two sets of 32 bytes), and object point angles are stored in the last 32 bytes, from offset 64 onwards..ghyp1 \ If we get here then A = 0 STA angleTangent \ Set angleTangent = 0 STA angleLo \ Set angle(Hi Lo) = 0 STA angleHi RTS \ Return from the subroutine .GetHypotenuseAngle \ We are going to be calculating the angle in a \ right-angled triangle with the following opposite and \ adjacent sides: \ \ (zDeltaAbsoluteHi zDeltaLo) \ \ (xDeltaAbsoluteHi xDeltaLo) \ \ We start by working out which is the longer of the two \ non-hypotenuse sides LDA zDeltaAbsoluteHi \ If zDeltaAbsoluteHi < xDeltaAbsoluteHi, jump to ghyp2 CMP xDeltaAbsoluteHi BCC ghyp2 BNE ghyp3 \ If zDeltaAbsoluteHi > xDeltaAbsoluteHi, jump to ghyp3 \ If we get here then the high bytes in zDeltaAbsoluteHi \ and xDeltaAbsoluteHi are the same, so now we compare \ the low bytes LDA zDeltaLo \ If zDeltaLo >= xDeltaLo, jump to ghyp3 CMP xDeltaLo BCS ghyp3 .ghyp2 \ If we get here then: \ \ (zDeltaAbsoluteHi zDeltaLo) < \ (xDeltaAbsoluteHi xDeltaLo) LDA zDeltaAbsoluteHi \ Set b(Hi Lo) = (zDeltaAbsoluteHi zDeltaLo) STA bHi \ LDA zDeltaLo \ So b(Hi Lo) is the shorter side STA bLo LDA xDeltaLo \ Set a(Hi Lo) = (xDeltaAbsoluteHi xDeltaLo) STA aLo \ LDA xDeltaAbsoluteHi \ So a(Hi Lo) is the longer side STA aHi JMP ghyp5 \ Jump to ghyp5 to keep going .ghyp3 \ If we get here then: \ \ (zDeltaAbsoluteHi zDeltaLo) >= \ (xDeltaAbsoluteHi xDeltaLo) LDA xDeltaAbsoluteHi \ Set b(Hi Lo) = (xDeltaAbsoluteHi xDeltaLo) STA bHi \ LDA xDeltaLo \ So b(Hi Lo) is the shorter side STA bLo LDA zDeltaLo \ Set a(Hi Lo) = (zDeltaAbsoluteHi zDeltaLo) STA aLo \ LDA zDeltaAbsoluteHi \ So a(Hi Lo) is the longer side STA aHi ORA zDeltaLo \ If both zDeltaAbsoluteHi and zDeltaLo are zero then BEQ ghyp1 \ a(Hi Lo) = 0, so jump to ghyp1 to return from the \ subroutine with the following: \ \ * angleTangent = 0 \ \ * angle(Hi Lo) = 0 LDA zDeltaAbsoluteHi \ Set A to zDeltaAbsoluteHi once again JMP ghyp9 \ Jump to ghyp9 to keep going .ghyp4 ASL zDeltaLo \ Shift (zDeltaAbsoluteHi zDeltaLo) left by one place to ROL zDeltaAbsoluteHi \ scale it up .ghyp5 \ If we jump here then: \ \ * (zDeltaAbsoluteHi zDeltaLo) < \ (xDeltaAbsoluteHi xDeltaLo) \ \ * a(Hi Lo) is the longer side \ \ * b(Hi Lo) is the shorter side \ \ * A = xDeltaAbsoluteHi \ \ The last one means that the length of the x-axis side \ is currently in (A xDeltaLo) \ We start by shifting the lengths of both sides to the \ left until bit 7 of A is set \ \ As we know that (A xDeltaLo) is the longest side, this \ scales both lengths up by the same amount until they \ are as large as they can be while still fitting into a \ 16-bit number ASL xDeltaLo \ Shift (A xDeltaLo) left by one place to scale it up ROL A BCC ghyp4 \ If we just shifted a zero out of bit 7 of (A xDeltaLo) \ then jump back to ghyp4 to scale the x-axis length and \ keep scaling until we shift a 1 out of bit 7, at which \ point we will have scaled (A xDeltaLo) as far as we \ can ROR A \ Shift the 1 back into bit 7 of (A xDeltaLo) to undo ROR xDeltaLo \ the last left-shift, so (A xDeltaLo) is now as large \ as it can be STA V \ Set V to the high byte of the scaled x-axis length LDA zDeltaLo \ Set T to the low byte of the scaled z-axis length STA T LDA xDeltaLo \ Set W to the low byte of the scaled x-axis length, AND #%11111100 \ with bits 0 and 1 cleared STA W \ \ Bits 0 and 1 of xDeltaLo will only be non-zero if the \ x-axis length has not been scaled up or has only been \ scaled up by one place, as scaling it up by two places \ will clear these bits anyway \ \ Is this a requirement for W so it can be passed to \ GetAngleFromCoords? LDA zDeltaAbsoluteHi \ Set A to the high byte of the scaled z-axis length \ So by this point we have: \ \ * (A T) = the scaled z-axis length \ \ * (V W) = the scaled x-axis length JSR GetAngleFromCoords \ Calculate the following angle: \ \ angle(Hi Lo) = arctan( (A T) / (V W) ) \ = arctan( z-axis / x-axis ) \ \ This works because the x-axis length is greater than \ the z-axis length, so the x-axis is the adjacent side \ and the z-axis is the opposite side LDA xDeltaHi \ If xDeltaHi and zDeltaHi have different sign bits in EOR zDeltaHi \ bit 7, then EOR'ing them will produce a 1, so jump to BMI ghyp6 \ ghyp6 to skip the following, as the sign of the angle \ is already correct LDA #0 \ Negate angle(Hi Lo) to give it the correct sign SEC SBC angleLo STA angleLo LDA #0 SBC angleHi STA angleHi .ghyp6 LDA #%01000000 \ If bit 7 of xDeltaHi is clear then set A = %01000000 BIT xDeltaHi \ otherwise set A = %11000000 BPL ghyp7 LDA #%11000000 .ghyp7 CLC \ Set angleHi = angleHi + A ADC angleHi \ STA angleHi \ So this sets bits 6 and 7 of the angle correctly so it \ is in the correct quadrant RTS \ Return from the subroutine .ghyp8 ASL xDeltaLo \ Shift (xDeltaAbsoluteHi xDeltaLo) left by one place to ROL xDeltaAbsoluteHi \ scale it up .ghyp9 \ If we jump here then: \ \ * (zDeltaAbsoluteHi zDeltaLo) >= \ (xDeltaAbsoluteHi xDeltaLo) \ \ * a(Hi Lo) is the longer side \ \ * b(Hi Lo) is the shorter side \ \ * A = zDeltaAbsoluteHi \ \ The last one means that the length of the z-axis side \ is currently in (A zDeltaLo) \ We start by shifting the lengths of both sides to the \ left until bit 7 of A is set \ \ As we know that (A zDeltaLo) is the longest side, this \ scales both lengths up by the same amount until they \ are as large as they can be while still fitting into a \ 16-bit number ASL zDeltaLo \ Shift (A zDeltaLo) left by one place to scale it up ROL A BCC ghyp8 \ If we just shifted a zero out of bit 7 of (A zDeltaLo) \ then jump back to ghyp8 to scale the z-axis length and \ keep scaling until we shift a 1 out of bit 7, at which \ point we will have scaled (A zDeltaLo) as far as we \ can ROR A \ Shift the 1 back into bit 7 of (A zDeltaLo) to undo ROR zDeltaLo \ the last left-shift, so (A zDeltaLo) is now as large \ as it can be STA V \ Set V to the high byte of the scaled z-axis length LDA xDeltaLo \ Set T to the low byte of the scaled x-axis length STA T LDA zDeltaLo \ Set W to the low byte of the scaled z-axis length, AND #&FC \ with bits 0 and 1 cleared STA W LDA xDeltaAbsoluteHi \ Set A to the high byte of the scaled x-axis length \ So by this point we have: \ \ * (A T) = the scaled x-axis length \ \ * (V W) = the scaled z-axis length JSR GetAngleFromCoords \ Calculate the following angle: \ \ angle(Hi Lo) = arctan( (A T) / (V W) ) \ = arctan( z-axis / x-axis ) \ \ This works because the z-axis length is greater than \ the x-axis length, so the z-axis is the adjacent side \ and the x-axis is the opposite side LDA xDeltaHi \ If xDeltaHi and zDeltaHi have the same sign bits in EOR zDeltaHi \ bit 7, then EOR'ing them will produce a 0, so jump to BPL ghyp10 \ ghyp10 to skip the following, as the sign of the angle \ is already correct \ \ This is because (z-axis / x-axis) will be positive as \ both sides of the division have the same sign, and as \ the arctangent of a positive value is also positive, \ we know we have the correct sign \ \ If each side of the division has a different sign then \ (z-axis / x-axis) will be negative, and so will the \ arctangent, so we need to negate the result LDA #0 \ Negate angle(Hi Lo) to give it the correct sign SEC SBC angleLo STA angleLo LDA #0 SBC angleHi STA angleHi .ghyp10 \ Finally, if the z-axis value is negative, then the \ hypotenuse will be pointing in the opposite direction \ to the z-axis (i.e. out of the screen rather than into \ it), so we need to add 180 degrees to the angle, which \ we can do by adding 128 LDA #0 \ If bit 7 of zDeltaHi is set then set A = 128 to add to BIT zDeltaHi \ the final result below, otherwise set A = 0 to the BPL ghyp11 \ result is unchanged LDA #128 .ghyp11 CLC \ Set angleHi = angleHi + A ADC angleHi STA angleHi \ So this sets bits 6 and 7 of the angle correctly so it \ is in the correct quadrant RTS \ Return from the subroutineName: GetHypotenuseAngle [Show more] Type: Subroutine Category: Maths (Geometry) Summary: Calculate the angle of the hypotenuse in a right-angle triangle given the two non-hypotenuse sides (i.e. two orthogonal axes)Context: See this subroutine on its own page References: This subroutine is called as follows: * GetObjectAngles calls GetHypotenuseAngle * GetObjPointAngles calls GetHypotenuseAngle * GetPitchAngleDelta calls GetHypotenuseAngle * GetTileViewAngles (Part 1 of 4) calls GetHypotenuseAngle
Calculate the tangent of the angle in a right-angle triangle, i.e. the angle of the hypotenuse, given the two non-hypotenuse sides (typically orthogonal coordinate axes). The arguments are as follows: * Absolute x-axis length in (xDeltaAbsoluteHi xDeltaLo) * Sign of the x-axis length in xDeltaHi * Absolute z-axis length in (zDeltaAbsoluteHi zDeltaLo) * Sign of the z-axis length in zDeltaHi
Arguments: xDeltaAbsoluteHi High byte of the absolute x-axis length xDelta(Hi Lo) The signed x-axis length zDeltaAbsoluteHi High byte of the absolute z-axis length zDelta(Hi Lo) The signed z-axis length
Returns: angleTangent The tangent of the angle of the hypotenuse angle(Hi Lo) The angle of the hypotenuse a(Hi Lo) The length of the longer side in the triangle b(Hi Lo) The length of the shorter side in the triangle.GetPitchAngleDelta STA xDeltaHi \ Set xDelta(Hi Lo) to the vertical delta passed to the \ routine TAY \ If the high byte is positive, jump to pdel1 to skip BPL pdel1 \ the following LDA #0 \ Negate the result to make it positive, so we now have: SEC \ SBC xDeltaLo \ (A xDeltaLo) = |xDeltaHi xDeltaLo| STA xDeltaLo LDA #0 SBC xDeltaHi .pdel1 STA xDeltaAbsoluteHi \ Set xDeltaAbsoluteHi = |xDeltaHi| \ \ So we now have the absolute delta in: \ \ (xDeltaAbsoluteHi xDeltaLo) \ \ and the original high byte of the signed delta is \ still in xDeltaHi LDA hypotenuseLo \ Set (zDeltaAbsoluteHi zDeltaLo) to the length of the STA zDeltaLo \ hypotenuse hypotenuse(Hi Lo) LDA hypotenuseHi STA zDeltaAbsoluteHi LDA #0 \ Set zDeltaHi to make the sign of zDelta positive in STA zDeltaHi \ the call to GetHypotenuseAngle JSR GetHypotenuseAngle \ Calculate the angle of the hypotenuse in the triangle \ with the following non-hypotenuse sides: \ \ * xDelta(Hi Lo) \ \ * zDelta(Hi Lo) \ \ which are set as follows: \ \ * (A xDeltaLo) \ \ * hypotenuse(Hi Lo) \ \ and return the angle in angle(Hi Lo), the tangent in \ angleTangent, the length of the longer side in \ a(Hi Lo) and the length of the shorter side in \ b(Hi Lo) LDA angleLo \ Set (A pitchDeltaLo) = angle(Hi Lo) SEC \ - (objectPitchAngle 32) SBC #32 \ STA pitchDeltaLo \ starting with the low bytes LDA angleHi \ And then the high bytes SBC objectPitchAngle,X PHP \ Store the status flags from the calculation LSR A \ Set (A pitchDeltaLo) = (A pitchDeltaLo) / 16 ROR pitchDeltaLo LSR A ROR pitchDeltaLo LSR A ROR pitchDeltaLo LSR A ROR pitchDeltaLo PLP \ If result is negative, set top four bits of A BPL pdel2 ORA #%11110000 .pdel2 STA pitchDeltaHi \ Store result in pitchDelta(Hi Lo) RTS \ Return from the subroutineName: GetPitchAngleDelta [Show more] Type: Subroutine Category: Maths (Geometry) Summary: Calculate the pitch angle of a vector relative to an object's pitch angleContext: See this subroutine on its own page References: This subroutine is called as follows: * CheckEnemyGaze (Part 2 of 2) calls GetPitchAngleDelta * GetObjPointAngles calls GetPitchAngleDelta * GetObjVisibility calls GetPitchAngleDelta * GetTileViewAngles (Part 3 of 4) calls GetPitchAngleDelta
This routine calculates the following pitch angle delta: pitchDelta(Hi Lo) = angle(Hi Lo) - (objectPitchAngle 32) where angle(Hi Lo) is the angle of this triangle: object _.-+ ^ _.-´ | | vector _.-´ | y-axis (up) _.-´ | _.-´ | (A xDeltaLo) _.-´ | .-´ angle(Hi Lo) | viewer +--------------------------+ hypotenuse(Hi Lo) This triangle is typically a viewing vector from the player's eyes to a coordinate in the 3D world. The length in hypotenuse(Hi Lo) is the projection of the vector down onto the ground (i.e. y = 0), and it has already been calculated by this point from the x- and z-axis elements of the vector. In this calculation this hypotenuse length is actually the adjacent side for the pitch angle above, but I've kept the same variable name from the first part of the calculation to make it easier to follow through. So this routine takes the hypotenuse length and the y-axis element of the vector in (A xDeltaLo) and calculates the vector's pitch angle in angle(Hi Lo), and then it calculates the difference between the vector's pitch angle and the pitch angle for object #X (i.e. the viewer). In other words, this calculates the pitch angle of the viewer's gaze towards a coordinate (typically a tile), relative to the pitch angle of the viewer, so that's relative to the current viewing direction. This is used to calculate player-relative pitch angles for tiles in the current tile view, for example.
Arguments: (A xDeltaLo) A vertical delta (i.e. a y-axis element) hypotenuse(Hi Lo) The length of the hypotenuse (i.e. adjacent side) X The object number
Returns: pitchDelta(Hi Lo) The pitch angle delta (divided by 16) angle(Hi Lo) The angle of the right-angled triangle with adjacent side hypotenuse(Hi Lo) and opposite side (A xDeltaLo).GetHypotenuse STY yStoreHypotenuse \ Store Y in yStoreHypotenuse so it can be preserved \ across calls to the routine LDA angleTangent \ Set Y = angleTangent / 2 LSR A \ ADC #0 \ The ADC instruction rounds the result to the nearest TAY \ integer \ \ The value of angleTangent ranges from 0 to 255 to \ represent the tangent of angles 0 to 45 degrees, but \ the tanHalfAngle table ranges from 0 to 128 to \ represent the same range of angles, so we have to \ halve angleTangent so we can use it as an index into \ the tanHalfAngle table to fetch the tangent of the \ half angle LDA tanHalfAngle,Y \ Set U = 2 * tan(theta / 2) STA U LDA bLo \ Set (V T) = b(Hi Lo) STA T LDA bHi STA V JSR Multiply8x16 \ Set (U T) = U * (V T) / 256 \ = 2 * tan(theta / 2) * b(Hi Lo) LSR U \ Set (U T) = (U T) / 2 ROR T \ = tan(theta / 2) * b(Hi Lo) LDA T \ Calculate: CLC \ ADC aLo \ hypotenuse(Hi Lo) STA hypotenuseLo \ LDA U \ = a(Hi Lo) + (U T) ADC aHi \ STA hypotenuseHi \ = a(Hi Lo) + tan(theta / 2) * b(Hi Lo) LDY yStoreHypotenuse \ Restore the value of Y from yStoreHypotenuse that we \ stored at the start of the routine, so that it's \ preserved RTS \ Return from the subroutineName: GetHypotenuse [Show more] Type: Subroutine Category: Maths (Geometry) Summary: Calculate the hypotenuse from an angle and two triangle sides with one lookup and one multiplication (so without a square root)Context: See this subroutine on its own page References: This subroutine is called as follows: * GetObjectAngles calls GetHypotenuse * GetObjPointAngles calls GetHypotenuse * GetTileViewAngles (Part 1 of 4) calls GetHypotenuse
This routine calculates: hypotenuse(Hi Lo) = a(Hi Lo) + tan(theta / 2) * b(Hi Lo) for a triangle with angle theta, adjacent side a and opposite side b.
Arguments: angleTangent The triangle angle theta a(Hi Lo) The length of a, the adjacent side of the triangle b(Hi Lo) The length of b, the opposite side of the triangle
Returns: Y Y is preserved hypotenuse(Hi Lo) The length of the hypotenuse.yStoreHypotenuse EQUB 65 \ This value is workspace noise and has no meaningName: yStoreHypotenuse [Show more] Type: Variable Category: Maths (Geometry) Summary: Temporary storage for Y so it can be preserved through calls to GetHypotenuseContext: See this variable on its own page References: This variable is used as follows: * GetHypotenuse uses yStoreHypotenuse.GetRandomNumber \ We generate a new random number by taking our 24-bit \ generator in randomGenerator(2 1 0) and adding it to \ itself but shifted left by two places, so on each \ iteration we do the following: \ \ randomGenerator(2 1 0) += shiftGenerator(2 1 0) \ \ We then return the high byte of randomGenerator(2 1 0) \ as the next random number LDA randomGenerator \ Set shiftGenerator(2 1 0) = randomGenerator(2 1 0) STA shiftGenerator LDA randomGenerator+1 STA shiftGenerator+1 LDA randomGenerator+2 STA shiftGenerator+2 ASL shiftGenerator \ Shift shiftGenerator(2 1 0) left by two places ROL shiftGenerator+1 ROL shiftGenerator+2 ASL shiftGenerator ROL shiftGenerator+1 ROL shiftGenerator+2 LDA randomGenerator \ Set randomGenerator(2 1 0) += shiftGenerator(2 1 0) CLC \ ADC shiftGenerator \ This also sets A to byte #2 of randomGenerator, so we STA randomGenerator \ return this as the next random number LDA randomGenerator+1 ADC shiftGenerator+1 STA randomGenerator+1 LDA randomGenerator+2 ADC shiftGenerator+2 STA randomGenerator+2 RTS \ Return from the subroutineName: GetRandomNumber [Show more] Type: Subroutine Category: Maths (Arithmetic) Summary: Set A to a random numberContext: See this subroutine on its own page References: This subroutine is called as follows: * DitherScreenBuffer calls GetRandomNumber * DrawRandomDots calls GetRandomNumber * UpdateScannerNow calls GetRandomNumber.randomGenerator EQUB 1, 0, 0Name: randomGenerator [Show more] Type: Variable Category: Maths (Arithmetic) Summary: A 24-bit random number generator that works independently from the landscape seeds and with a much simpler generation algorithmContext: See this variable on its own page References: This variable is used as follows: * DitherScreenBuffer uses randomGenerator * DrawRandomDots uses randomGenerator * GetRandomNumber uses randomGenerator.shiftGenerator EQUB 1, 0, 0Name: shiftGenerator [Show more] Type: Variable Category: Maths (Arithmetic) Summary: Storage for randomGenerator(2 1 0) while we shift it left by two placesContext: See this variable on its own page References: This variable is used as follows: * GetRandomNumber uses shiftGenerator.DrawStars LDA #%10000000 \ Set bit 7 of A to pass to the DrawRandomDots routine \ so we draw random dots on-screen in colour 2 to look \ like stars BNE DrawRandomDots \ Jump to DrawRandomDots to draw 80 coloured dots on the \ screen (this BNE is effectively a JMP as A is never \ zero)Name: DrawStars [Show more] Type: Subroutine Category: Graphics Summary: Draw 80 randomly positioned stars on the screen in colour 2 (white, yellow, cyan or red)Context: See this subroutine on its own page References: This subroutine is called as follows: * ClearScreen calls DrawStars.DrawBlackDots LDA #0 \ Clear bit 7 of A to pass to the DrawRandomDots routine \ so we draw random black dots on the screen to fade the \ screen to black in a slowly decaying manner \ Fall through into DrawRandomDots to draw 80 black dots \ on the screenName: DrawBlackDots [Show more] Type: Subroutine Category: Graphics Summary: Draw 80 randomly positioned dots on the screen in colour 1 (black)Context: See this subroutine on its own page References: This subroutine is called as follows: * DecayScreenToBlack calls DrawBlackDots * IRQHandler calls DrawBlackDots.DrawRandomDots STA dotColour \ Set dotColour to the value of A from above, so we \ draw coloured dots if bit 7 is set or black dots if \ bit 7 is clear LDA #80 \ Set dotCounter = 80 so we draw 80 dots on the screen STA dotCounter .dots1 JSR GetRandomNumber \ Set A to a random number STA screenAddr \ Set the low byte of screenAddr(1 0) to the random \ number in A LDA randomGenerator+1 \ Set randomPixel to the second byte of the random STA randomPixel \ number generator, so this is also a random number AND #&1F \ Reduce the random number to the range 0 to &1F CMP #&1E \ If A >= &1E then loop back to dots1 to choose another BCS dots1 \ random number STA screenAddr+1 \ Set the high byte of screenAddr(1 0) to A, so we now \ have screenAddr(1 0) set to a random number in the \ range 0 to &1DFF \ We can now add this to the address of the start of \ screen memory in viewScreenAddr(1 0) to get the \ address of a random pixel byte within screen memory LDA viewScreenAddr \ Set screenAddr(1 0) = viewScreenAddr(1 0) CLC \ + screenAddr(1 0) ADC screenAddr STA screenAddr LDA viewScreenAddr+1 ADC screenAddr+1 CMP #&80 \ If the high byte in A >= &80 then the new address is BCC dots2 \ past the end of screen memory, so subtract &20 from SBC #&20 \ the high byte so the address wraps around within the \ range of screen memory between &6000 and &8000 .dots2 STA screenAddr+1 \ Store the high byte of the result, so we now have: \ \ screenAddr(1 0) = viewScreenAddr(1 0) \ + screenAddr(1 0) \ \ So screenAddr(1 0) is the address of a random pixel \ byte within screen memory LDA randomPixel \ Take bits 6 and 7 of randomPixel and put them into ROL A \ bits 0 and 1 of X (with all the other bits clear), so ROL A \ X is a random number in the range 0 to 3 that we can ROL A \ use as the pixel number within the pixel byte for the AND #%00000011 \ dot we want to draw TAX LDY #0 \ Set Y = 0 so we can use (screenAddr),Y below to behave \ like AND (screenAddr) or STA (screenAddr) LDA pixelBitMask,X \ Take the existing pixel byte from screenAddr(1 0) and EOR #%11111111 \ clear the two bits for pixel number X (the EOR inverts AND (screenAddr),Y \ the mask in pixelBitMask so that AND'ing the mask will \ clear pixel X while leaving the other pixels alone ORA pixelByteColour1,X \ Change the two bits for pixel X into colour 1 (%01), \ which is black, so that drawing lots of dots will \ slowly turn the screen to black BIT dotColour \ If bit 7 of dotColour is set, flip the two bits of the BPL dots3 \ pixel so they are drawn in colour 2 (%10), for when we EOR pixelBitMask,X \ we want to draw coloured stars instead .dots3 STA (screenAddr),Y \ Store the updated pixel byte in screenAddr(1 0) to \ draw a black dot or a coloured star on-screen DEC dotCounter \ Decrement the dot counter BNE dots1 \ Loop back until we have drawn all 80 dots RTS \ Return from the subroutineName: DrawRandomDots [Show more] Type: Subroutine Category: Graphics Summary: Draw 80 randomly positioned dots on the screenContext: See this subroutine on its own page References: This subroutine is called as follows: * DrawStars calls DrawRandomDots
Arguments: A The colour of the dots: * Bit 7 clear = colour 1 (black) * Bit 7 set = colour 2 (white, yellow, cyan or red).dotCounter EQUB 0Name: dotCounter [Show more] Type: Variable Category: Graphics Summary: A counter for the number of dots drawn in the DrawRandomDots routineContext: See this variable on its own page References: This variable is used as follows: * DrawRandomDots uses dotCounter.dotColour EQUB 0Name: dotColour [Show more] Type: Variable Category: Graphics Summary: A flag that determines the colour of the dots drawn by the DrawRandomDots routineContext: See this variable on its own page References: This variable is used as follows: * DrawRandomDots uses dotColour.pixelByteColour1 EQUB %00001000 \ Pixel byte with pixel 0 set to colour 1 EQUB %00000100 \ Pixel byte with pixel 1 set to colour 1 EQUB %00000010 \ Pixel byte with pixel 2 set to colour 1 EQUB %00000001 \ Pixel byte with pixel 3 set to colour 1Name: pixelByteColour1 [Show more] Type: Variable Category: Sights Summary: A table for converting a pixel number in the range 0 to 3 into a screen mode 5 pixel byte with that pixel set to colour 1 (%01)Context: See this variable on its own page References: This variable is used as follows: * DrawRandomDots uses pixelByteColour1 * DrawSights uses pixelByteColour1.SetScannerAndPause STA scannerUpdate \ Set scannerUpdate to the new value in A LDX #40 \ We now perform a delay with a nested loop, so set X \ as an outer loop counter \ \ We use Y as an inner loop counter to count down from \ 255 to 0, though the first loop will depend on the \ initial value of Y, which isn't explicitly set to \ anything before the routine is called .scup1 DEY \ Decrement the inner loop counter in Y BNE scup1 \ Loop back until Y reaches zero DEX \ Decrement the inner loop counter in X BNE scup1 \ Loop back until X reaches zero RTS \ Return from the subroutine EQUB &FF, &FF \ These bytes appear to be unused EQUB &FF, &FFName: SetScannerAndPause [Show more] Type: Subroutine Category: Main game loop Summary: Set the scanner update status and delay for 40 empty loops of 256 iterations each (i.e. 10,240 loops)Context: See this subroutine on its own page References: This subroutine is called as follows: * MainGameLoop calls SetScannerAndPause
Arguments: A The new value for scannerUpdate (this routine is only ever called from the main game loop with A = 0, so this sets scannerUpdate to zero to prevent scanner updates).PrintCharacter BIT textDropShadow \ If bit 7 of textDropShadow is set, jump to byte2 to BMI byte2 \ print the character in A as-is (i.e. without a drop \ shadow if it is alphanumeric) CMP #' ' \ If the character in A is a control character, jump to BCC byte2 \ byte2 to print the character as-is CMP #127 \ If the character in A is a top-bit-set character, jump BCS byte2 \ jump to byte2 to print the character as-is \ If we get here then bit 7 of textDropShadow is clear \ and the character in A is alphanumeric, so now we \ print the character with a drop shadow \ \ We do this by printing the sequence of VDU commands at \ vduShadowRear and vduShadowFront, which produce the \ drop shadow effect \ \ The drop shadow is printed by first printing the VDU \ commands in vduShadowRear, to print the rear character \ in yellow, and then in vduShadowFront, to print the \ front character in red or cyan \ \ The rear character is offset down from the front \ character by four graphics units, which equates to an \ offset of one pixel in mode 5 \ \ The VDU commands are printed backwards, because that \ makes the loop condition slightly simpler, and it also \ means we can poke the character to print into the \ start of each block of VDU commands, knowing that they \ will then be printed last in each VDU sequence STA vduShadowFront \ Insert the character to be printed into the sequence STA vduShadowRear \ of VDU commands at vduShadowRear and vduShadowFront, \ so that they print the required character with a drop \ shadow TXA \ Store X on the stack so we can preserve it PHA LDX #22 \ The vduShadowRear and vduShadowFront variables contain \ a total of 23 VDU command bytes, so set a byte counter \ in X so we can work through them from the end of \ vduShadowRear backwards to the start of vduShadowFront .byte1 LDA vduShadowFront,X \ Print the X-th character from the vduShadowRear and JSR OSWRCH \ vduShadowFront variables DEX \ Decrement the byte counter BPL byte1 \ Loop back until we have printed all 23 command bytes PLA \ Retrieve X from the stack so it is preserved across TAX \ calls to the routine RTS \ Return from the subroutine .byte2 JMP OSWRCH \ We jump here if drop shadows are disabled, or if A is \ not alphanumeric, in which case print the character in \ A and return from the subroutine using a tail callName: PrintCharacter [Show more] Type: Subroutine Category: Text Summary: Print a single-byte VDU command or character from a text token, optionally printing a drop shadow if the character is alphanumericContext: See this subroutine on its own page References: This subroutine is called as follows: * PrintDigit calls PrintCharacter * PrintVduCharacter calls PrintCharacter
Arguments: A The one-byte character to be printed
Returns: X X is preserved.PrintVduCharacter CMP #25 \ If the character in A = 25, jump to prin2 to print a BEQ prin2 \ six-byte command in the form VDU 25, n, x; y; \ \ We print the VDU 25 commands in its own loop because \ the 16-bit arguments to the command (x and y) might \ contain &FF, and we don't want this to be \ misidentified as the end of the text token JMP PrintCharacter \ Otherwise jump to PrintCharacter to print the single- \ byte VDU command or character in A, returning from the \ subroutine using a tail call .prin1 INY \ Increment the offset of the character being printed to \ move on to the next character in the token LDA tokenBase,Y \ Set A to the next character to print .prin2 JSR OSWRCH \ Print the next character in the VDU 25 command (we \ jump here from above with A = 25, which starts off \ the six-byte VDU sequence) DEC vduCounter \ Decrement the byte counter in vduCounter, which is \ always 6 when we jump into this loop BNE prin1 \ Loop back to print the next character until we have \ printed the whole VDU 25 command LDA #6 \ Reset the byte counter in vduCounter to 6, ready for STA vduCounter \ the next time we perform a VDU 25 command RTS \ Return from the subroutineName: PrintVduCharacter [Show more] Type: Subroutine Category: Text Summary: Print a one-byte character from a text token or a multi-byte VDU 25 commandContext: See this subroutine on its own page References: This subroutine is called as follows: * ProcessCharacter calls PrintVduCharacter
Arguments: A The character to be printed Y The offset of the current character within the text token being printed.vduCounter EQUB 6Name: vduCounter [Show more] Type: Variable Category: Text Summary: The number of bytes in a VDU 25, n, x; y; commandContext: See this variable on its own page References: This variable is used as follows: * PrintVduCharacter uses vduCounter.tokenOffset EQUB token0 - tokenBase EQUB token1 - tokenBase EQUB token2 - tokenBase EQUB token3 - tokenBase EQUB token4 - tokenBase EQUB token5 - tokenBase EQUB token6 - tokenBase EQUB token7 - tokenBase EQUB token8 - tokenBase EQUB token9 - tokenBase EQUB token10 - tokenBase EQUB token11 - tokenBase EQUB token12 - tokenBase EQUB token13 - tokenBase EQUB token14 - tokenBase EQUB token15 - tokenBase EQUB token16 - tokenBase EQUB token17 - tokenBase .tokenBaseName: tokenOffset [Show more] Type: Variable Category: Text Summary: Address offsets for the text tokens (each offset in the table is the offset of the token from tokenBase)Context: See this variable on its own page References: This variable is used as follows: * PrintTextToken uses tokenOffset.vduShadowFront EQUB "C" \ 9. Print the character in red or cyan, for the front \ character of the drop shadow \ \ The "C" is replaced by the character to be printed EQUB 2, 0, 18 \ 8. VDU 18, 0, 2 \ \ Set the foreground colour to colour 2 (red or cyan, \ depending on the current palette) \ \ The "2" is replaced by the colour to be drawn EQUB &00, &04 \ 7. VDU 25, 0, 0; 4; EQUW 0 \ EQUB 0, 25 \ Move the graphics cursor relative to the last position \ by (0, 4), so we move up the screen by four units, or \ one pixel in mode 5 EQUB 8 \ 6. VDU 8 \ \ Backspace the cursor by one character, so it is on top \ of the yellow character that we just printed in \ vduShadowRearName: vduShadowFront [Show more] Type: Variable Category: Text Summary: VDU commands for printing the front character of a drop shadowContext: See this variable on its own page References: This variable is used as follows: * DrawTitleView uses vduShadowFront * PrintCharacter uses vduShadowFront
The VDU commands below are printed by working backwards through the table, so the character to be printed is actually the first entry in the table. A drop shadow is printed by first printing the VDU commands in vduShadowRear, to print the rear character in yellow, and then in vduShadowFront, to print the front character in red or cyan. The rear character is offset down from the front character by four graphics units, which equates to an offset of one pixel in mode 5..vduShadowRear EQUB "C" \ 5. Print the character in yellow, for the rear \ character of the drop shadow \ \ The "C" is replaced by the character to be printed EQUB 3, 0, 18 \ 4. VDU 18, 0, 3 \ \ Set the foreground colour to colour 3 (yellow) \ \ The "3" is replaced by the colour to be drawn EQUB &FF, &FC \ 3. VDU 25, 0, 0; -4; EQUW 0 \ EQUB 0, 25 \ Move the graphics cursor relative to the last position \ by (0, -4), so we move down the screen by four units, \ or one pixel in mode 5 EQUB 127 \ 2. Print a backspace to move the cursor back over the \ top of the space we just printed EQUS " " \ 1. Print a space to clear the screen for the new drop \ shadow characterName: vduShadowRear [Show more] Type: Variable Category: Text Summary: VDU commands for printing the rear character of a drop shadowContext: See this variable on its own page References: This variable is used as follows: * DrawTitleView uses vduShadowRear * PrintCharacter uses vduShadowRear
The VDU commands below are printed by working backwards through the table, so the character to be printed is actually the first entry in the table. A drop shadow is printed by first printing the VDU commands in vduShadowRear, to print the rear character in yellow, and then in vduShadowFront, to print the front character in red or cyan. The rear character is offset down from the front character by four graphics units, which equates to an offset of one pixel in mode 5..token0 EQUB 200 + 10 \ Text token 10: Configure text to be printed at the \ graphics cursor and set the background colour to \ colour 0 (blue) EQUB 200 + 12 \ Text token 12: Move graphics cursor to (64, 100) EQUB 200 + 17 \ Text token 17: Print "PRESS ANY KEY" EQUB 17, 129 \ VDU 17, 129 \ \ Set text background to colour 1 (black) EQUB &FF \ End of tokenName: token0 [Show more] Type: Variable Category: Text Summary: Background colour blue, print "PRESS ANY KEY" at (64, 100), set text background to blackContext: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token0.token1 EQUB 200 + 12 \ Text token 12: Move graphics cursor to (64, 100) EQUB 200 + 15 \ Text token 15: Print five spaces EQUB 200 + 15 \ Text token 15: Print five spaces EQUB 200 + 16 \ Text token 16: Print three spaces EQUB 200 + 7 \ Text token 7: Move the graphics cursor to (64, 768) EQUB 200 + 13 \ Text token 13: Print "LANDSCAPE" EQUS " NUMBER?" \ Print " NUMBER?" EQUB 4 \ VDU 4 \ \ Write text at the text cursor EQUB 31, 5, 27 \ VDU 31, 5, 27 \ \ Move the text cursor to (5, 27) EQUB &FF \ End of tokenName: token1 [Show more] Type: Variable Category: Text Summary: Print 13 spaces at (64, 100), print "LANDSCAPE NUMBER?" at (64, 768), switch to text cursor, move text cursor to (5, 27)Context: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token1.token2 EQUB 200 + 10 \ Text token 10: Configure text to be printed at the \ graphics cursor and set the background colour to \ colour 0 (blue) EQUB 200 + 7 \ Text token 7: Move the graphics cursor to (64, 768) EQUB 200 + 14 \ Text token 14: Print "SECRET ENTRY CODE" EQUS "?" \ Print "?" EQUB 4 \ VDU 4 \ \ Write text at the text cursor EQUB 31, 3, 27 \ VDU 31, 3, 27 \ \ Move the text cursor to (2, 27) EQUB &FF \ End of tokenName: token2 [Show more] Type: Variable Category: Text Summary: Background colour blue, print "SECRET ENTRY CODE?" at (64, 768), switch to text cursor, move text cursor to (2, 27)Context: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token2.token3 EQUB 200 + 10 \ Text token 10: Configure text to be printed at the \ graphics cursor and set the background colour to \ colour 0 (blue) EQUB 200 + 7 \ Text token 7: Move the graphics cursor to (64, 768) EQUS "WRONG SECRET " \ Print "WRONG SECRET CODE" EQUS "CODE" EQUB 200 + 0 \ Text token 0: Background colour blue, print "PRESS \ ANY KEY" at (64, 100), set text background to black EQUB &FF \ End of tokenName: token3 [Show more] Type: Variable Category: Text Summary: Background colour blue, print "WRONG SECRET CODE" at (64, 768), print "PRESS ANY KEY" at (64, 100), set text background to blackContext: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token3.token4 EQUB 200 + 11 \ Text token 11: Configure text to be printed at the \ graphics cursor and set the background colour to \ colour 1 (black) EQUB 200 + 9 \ Text token 9: Move the graphics cursor to (192, 64) EQUB 200 + 17 \ Text token 17: Print "PRESS ANY KEY" EQUB 200 + 7 \ Text token 7: Move the graphics cursor to (64, 768) EQUB 9, 9 \ VDU 9, 9 \ \ Move the cursor right by two characters EQUB 200 + 13 \ Text token 13: Print "LANDSCAPE" EQUB 9 \ VDU 9 \ \ Move the cursor right by one character, so it moves on \ to the next character EQUB &FF \ End of tokenName: token4 [Show more] Type: Variable Category: Text Summary: Background colour black, print "PRESS ANY KEY" at (192, 64), print "LANDSCAPE" two chars right of (64, 768), move cursor rightContext: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token4.token5 EQUB 200 + 7 \ Text token 7: Move the graphics cursor to (64, 768) EQUB 200 + 14 \ Text token 14: Print "SECRET ENTRY CODE" EQUB 200 + 8 \ Text token 8: Move the graphics cursor to (192, 704) EQUB 200 + 13 \ Text token 13: Print "LANDSCAPE" EQUB 9 \ VDU 9 \ \ Move the cursor right by one character, so it moves on \ to the next character EQUB &FF \ End of tokenName: token5 [Show more] Type: Variable Category: Text Summary: Text token 5: Print "SECRET ENTRY CODE" at (64, 768), "LANDSCAPE" at (192, 704), move cursor rightContext: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token5.token6 EQUB 200 + 12 \ Text token 12: Move graphics cursor to (64, 100) EQUB 200 + 17 \ Text token 17: Print "PRESS ANY KEY" EQUB &FF \ End of tokenName: token6 [Show more] Type: Variable Category: Text Summary: Text token 6: Print "PRESS ANY KEY" at (64, 100)Context: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token6.token7 EQUB 25, 4 \ VDU 25, 4, 64; 768; EQUW 64 \ EQUW 768 \ Move graphics cursor to absolute position (64, 768) EQUB &FF \ End of tokenName: token7 [Show more] Type: Variable Category: Text Summary: Text token 7: Move the graphics cursor to (64, 768)Context: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token7.token8 EQUB 25, 4 \ VDU 25, 4, 192; 704; EQUW 192 \ EQUW 704 \ Move graphics cursor to absolute position (192, 704) EQUB &FF \ End of tokenName: token8 [Show more] Type: Variable Category: Text Summary: Text token 8: Move the graphics cursor to (192, 704)Context: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token8.token9 EQUB 25, 4 \ VDU 25, 4, 192; 64; EQUW 192 \ EQUW 64 \ Move graphics cursor to absolute position (192, 64) EQUB &FF \ End of tokenName: token9 [Show more] Type: Variable Category: Text Summary: Text token 9: Move the graphics cursor to (192, 64)Context: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token9.token10 EQUB 5 \ VDU 5 \ \ Write text at the graphics cursor rather than the text \ cursor EQUB 18, 0, 128 \ VDU 18, 0, 128 \ \ Set the background colour to colour 0 (blue) EQUB &FF \ End of tokenName: token10 [Show more] Type: Variable Category: Text Summary: Text token 10: Configure text to be printed at the graphics cursor and set the background colour to colour 0 (blue)Context: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token10.token11 EQUB 5 \ VDU 5 \ \ Write text at the graphics cursor rather than the text \ cursor EQUB 18, 0, 129 \ VDU 18, 0, 129 \ \ Set the background colour to colour 1 (black) EQUB &FF \ End of tokenName: token11 [Show more] Type: Variable Category: Text Summary: Text token 11: Configure text to be printed at the graphics cursor and set the background colour to colour 1 (black)Context: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token11.token12 EQUB 25, 4 \ VDU 25, 4, 64; 160; EQUW 64 \ EQUW 160 \ Move graphics cursor to absolute position (64, 100) EQUB &FF \ End of tokenName: token12 [Show more] Type: Variable Category: Text Summary: Text token 12: Move graphics cursor to (64, 100)Context: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token12.token13 EQUS "LANDSCAPE" EQUB &FF \ End of tokenName: token13 [Show more] Type: Variable Category: Text Summary: Text token 13: Print "LANDSCAPE"Context: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token13.token14 EQUS "SECRET ENTRY CODE" EQUB &FF \ End of tokenName: token14 [Show more] Type: Variable Category: Text Summary: Text token 14: Print "SECRET ENTRY CODE"Context: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token14.token15 EQUS " " EQUB &FF \ End of tokenName: token15 [Show more] Type: Variable Category: Text Summary: Text token 15: Print five spacesContext: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token15.token16 EQUS " " EQUB &FF \ End of tokenName: token16 [Show more] Type: Variable Category: Text Summary: Text token 16: Print three spacesContext: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token16.token17 EQUS "PRESS ANY KEY" EQUB &FF \ End of tokenName: token17 [Show more] Type: Variable Category: Text Summary: Text token 17: Print "PRESS ANY KEY"Context: See this variable on its own page References: This variable is used as follows: * tokenOffset uses token17.musicData \ Music data offset 0: Hyperspace EQUB 200 + 0 \ Chord 1 = 8, 36, 36 with sound counter 6 * 4 = 24 EQUB 8 EQUB 36 EQUB 200 + 6 EQUB 36 EQUB 200 + 0 \ Chord 2 = 20, 48, 48 with sound counter 6 * 4 = 24 EQUB 20 EQUB 48 EQUB 200 + 6 EQUB 48 EQUB 200 + 0 \ Chord 3 = 28, 56, 56 with sound counter 6 * 4 = 24 EQUB 28 EQUB 56 EQUB 200 + 6 EQUB 56 EQUB 200 + 0 \ Chord 4 = 0, 28, 28 with sound counter 6 * 4 = 24 EQUB 0 EQUB 28 EQUB 200 + 6 EQUB 28 EQUB 200 + 0 \ Chord 5 = 8, 36, 36 with sound counter 0 EQUB 8 EQUB 36 EQUB 36 EQUB &FF \ End of music data \ Music data offset 25: Transfer into a new robot \ \ Note that the transfer music plays the U-turn music as \ its last two chords, as there is no terminator after \ chord 2 below EQUB 200 + 0 \ Chord 1 = 8, 36, 36 with sound counter 6 * 4 = 24 EQUB 8 EQUB 36 EQUB 200 + 6 EQUB 36 EQUB 200 + 0 \ Chord 2 = 20, 48, 48 with sound counter 6 * 4 = 24 EQUB 20 EQUB 48 EQUB 200 + 6 EQUB 48 EQUB 200 + 0 \ Chord 2 = 16, 44, 44 with sound counter 6 * 4 = 24 EQUB 16 EQUB 44 EQUB 200 + 6 EQUB 44 \ Music data offset 25: U-turn EQUB 200 + 0 \ Chord 1 = 0, 28, 28 with sound counter 6 * 4 = 24 EQUB 0 EQUB 28 EQUB 200 + 6 EQUB 28 EQUB 200 + 0 \ Chord 2 = 8, 36, 36 with sound counter 0 EQUB 8 EQUB 36 EQUB 36 EQUB &FF \ End of music data \ Music data offset 50: Game over EQUB 200 + 4 \ Note 1 = 8 with sound counter 4 * 4 = 16 EQUB 8 EQUB 36 \ Note 2 = 36 with sound counter 4 * 4 = 16 EQUB 64 \ Note 3 = 64 with sound counter 4 * 4 = 16 EQUB 68 \ Note 4 = 68 with sound counter 4 * 4 = 16 EQUB 200 + 15 \ Note 5 = 8 with sound counter 15 * 4 = 60 EQUB 84 EQUB 200 + 1 \ Arpeggiated chord of five short notes, each with EQUB 104 \ sound counter 1 * 4 = 4:g EQUB 84 \ EQUB 68 \ 104, 84, 68, 64, 36 EQUB 64 EQUB 36 EQUB 200 + 12 \ Final note = 8 with counter 15 * 4 = 48 EQUB 8 EQUB &FF \ End of music data \ Music data offset 66: Landscape successfully finished EQUB 200 + 1 \ Chord 1 = 8, 36, 36 with sound counter 12 * 4 = 48 and EQUB 8 \ the first two notes each introduced with a counter of EQUB 36 \ 1 * 4 = 4 EQUB 200 + 12 EQUB 36 EQUB 200 + 1 \ Chord 2 = 0, 28, 28 with sound counter 5 * 4 = 20 and EQUB 0 \ the first two notes each introduced with a counter of EQUB 28 \ 1 * 4 = 4 EQUB 200 + 5 EQUB 28 EQUB 200 + 1 \ Chord 3 = 28, 56, 56 with sound counter 6 * 4 = 24 and EQUB 28 \ the first two notes each introduced with a counter of EQUB 56 \ 1 * 4 = 4 EQUB 200 + 6 EQUB 56 EQUB 200 + 1 \ Chord 4 = 20, 48, 48 with sound counter 7 * 4 = 28 and EQUB 20 \ the first two notes each introduced with a counter of EQUB 48 \ 1 * 4 = 4 EQUB 200 + 7 EQUB 48 EQUB 200 + 1 \ Chord 5 = 16, 28, 28 with sound counter 9 * 4 = 36 and EQUB 16 \ the first two notes each introduced with a counter of EQUB 28 \ 1 * 4 = 4 EQUB 200 + 9 EQUB 28 EQUB 200 + 1 \ Chord 6 = 8, 36, 36 with sound counter 1 * 4 = 1 and EQUB 8 \ the first two notes each introduced with a counter of EQUB 36 \ 1 * 4 = 4 EQUB 36 EQUB &FF \ End of music dataName: musicData [Show more] Type: Variable Category: Sound Summary: Data for the game's musicContext: See this variable on its own page References: This variable is used as follows: * ProcessMusic uses musicData
Music data is as follows: * If a value is 200 + x, then the sound counter for all the following notes is set to 4 * x, measured in 1/50 second (i.e. calls to the interrupt handler) * Otherwise the value is the pitch of the note to play Each note is played on a separate tone channel, working through channels 1 to 3 in sequence. Setting the sound counter stops ProcessSound from doing anything until the counter runs down. This means that the last three notes are played together, so we can play three-note chords by playing two notes with a counter of zero, followed by a third note with the counter set to the duration of the chord. Setting the counter to zero for the last chord in a piece of music ensures that the last chords plays until it naturally decays according to the sound envelope for sound #3..iconData EQUB &0F, &0F, &0F, &0F, &0F, &0F, &0F, &0F \ Icon #0: Blank EQUB &6F, &0F, &00, &06, &09, &09, &0F, &0F \ Icon #1: Robot EQUB &2F, &2F, &7A, &7A, &FA, &2D, &0F, &0F \ Icon #2: Tree (left) EQUB &0F, &0F, &0F, &0F, &8F, &0F, &0F, &0F \ Icon #3: Tree (right) EQUB &0F, &0F, &78, &D2, &87, &87, &0F, &0F \ Icon #4: Boulder (left) EQUB &0F, &0F, &0F, &87, &87, &87, &0F, &0F \ Icon #5: Boulder (right) EQUB &6F, &0F, &FF, &9F, &6F, &6F, &0F, &0F \ Icon #6: High-energy robot EQUB &1E, &1E, &1E, &1E, &1E, &1E, &0F, &0F \ Icon #7: Scanner box (left) EQUB &F0, &0F, &0F, &0F, &0F, &F0, &0F, &0F \ Icon #8: Scanner box (middle) EQUB &87, &87, &87, &87, &87, &87, &0F, &0F \ Icon #9: Scanner box (right)Name: iconData [Show more] Type: Variable Category: Graphics Summary: Screen mode 5 bitmap data for the ten icons that make up the energy icon and scanner row at the top of the screenContext: See this variable on its own page References: This variable is used as follows: * DrawIcon uses iconData.soundData EQUB &10, &00 \ Sound data block #0: SOUND &10, 1, 7, 5 EQUB &01, &00 \ EQUB &07, &00 \ Used for the first part of sounds #0 (rotating enemy), EQUB &05, &00 \ #1 (rotating meanie) and #6 (game over) EQUB &11, &00 \ Sound data block #1: SOUND &11, 0, 120, 10 EQUB &00, &00 \ EQUB &78, &00 \ Used for the second part of sounds #0 (rotating EQUB &0A, &00 \ enemy), #1 (rotating meanie) and #6 (game over) EQUB &12, &00 \ Sound data block #2: SOUND &12, 3, 34, 20 EQUB &03, &00 \ EQUB &22, &00 \ Used for sounds #3 (music) and #4 (scanner) EQUB &14, &00 EQUB &13, &00 \ Sound data block #3: SOUND &13, 4, 144, 20 EQUB &04, &00 \ EQUB &90, &00 \ Used for sound #5 (ping) EQUB &14, &00 EQUB &10, &00 \ Sound data block #4: SOUND &10, 2, 4, 40 EQUB &02, &00 \ EQUB &04, &00 \ Used for sound #2 (create/absorb object white noise) EQUB &28, &00Name: soundData [Show more] Type: Variable Category: Sound Summary: OSWORD blocks for making the various game soundsContext: See this variable on its own page References: This variable is used as follows: * GetPlayerDrain uses soundData * MakeSound uses soundData * MakeSoundEnvelope uses soundData * ProcessActionKeys (Part 2 of 2) uses soundData * ProcessMusic uses soundData * ProcessSound uses soundData
Sound data. To make a sound, the MakeSound routine passes the bytes in this table to OSWORD 7. These bytes are the OSWORD equivalents of the parameters passed to the SOUND keyword in BASIC. The parameters have these meanings: channel/flush, amplitude (or envelope number if 1-4), pitch, duration where each value consists of two bytes, with the low byte first and the high byte second. For the channel/flush parameter, the top nibble of the low byte is the flush control (where a flush control of 0 queues the sound, and a flush control of 1 makes the sound instantly), while the bottom nibble of the low byte is the channel number. When written in hexadecimal, the first figure gives the flush control, while the second is the channel (so &13 indicates flush control = 1 and channel = 3)..envelopeData EQUB 1, 2, 0, 0, 0, 0, 0, 0, 20, 0, -20, -20, 120, 120 EQUB 2, 4, 0, 0, 0, 0, 0, 0, 2, -1, 0, 0, 120, 120 EQUB 4, 2, 1, -1, 0, 1, 1, 8, 120, -1, 0, -1, 120, 8 EQUB 3, 1, 6, -6, 0, 1, 1, 0, 1, -1, 0, 0, 120, 8 EQUB 4, &82, 1, -1, 0, 2, 1, 7, 120, -6, -2, -2, 120, 0 EQUB 1, 1, 0, 0, 0, 0, 0, 0, 120, -120, -1, -1, 120, 0 EQUB &00, &00 \ These bytes appear to be unused EQUB &00, &00Name: envelopeData [Show more] Type: Variable Category: Sound Summary: Data for the six sound envelopesContext: See this variable on its own page References: This variable is used as follows: * DefineEnvelope uses envelopeData * ProcessVolumeKeys uses envelopeData
There are six sound envelopes defined in The Sentinel. * Envelope 0 is used for sounds #0 (rotating enemy) and #1 (rotating meanie) * Envelope 1 is used for sound #2 (create/absorb object white noise) * Envelope 2 is used for sound #3 (music) * Envelope 3 is used for sound #4 (scanner) * Envelope 4 is used for sound #5 (ping) * Envelope 5 is used for sound #6 (game over).sin FOR I%, 0, 127 N = INT(0.5 + 256 * SIN((I% / 128) * (PI / 2))) IF N >= 255 EQUB 255 ELSE EQUB N ENDIF NEXTName: sin [Show more] Type: Variable Category: Maths (Geometry) Summary: Table for sine valuesContext: See this variable on its own page References: This variable is used as follows: * GetSineAndCosine uses sin
This table contains sine values for a quarter of a circle, i.e. for the range 0 to 90 degrees, or 0 to PI/2 radians. The table contains values for indexes 0 to 127, which cover the quarter from 0 to PI/2 radians. Entry X in the table is therefore (X / 128) * (PI / 2) radians of the way round the quarter circle, so the table at index X contains the sine of this value. The value of sine across the quarter circle ranges from 0 to 1: sin(0) = 0 sin(90) = sin(PI/2) = 1 It might help to think of sin(X) as an integer ranging from 0 to 256 across the quarter circle, so entry X in this table contains sin(X) * 256, where X ranges from 0 to 128 over the course of a quarter circle..iconBuffer SKIP 0 \ This variable shares the same memory location as \ xPolygonLeftName: iconBuffer [Show more] Type: Variable Category: Graphics Summary: The icon screen buffer, which is used to buffer the energy icon and scanner row before writing to screen memoryContext: See this variable on its own page References: This variable is used as follows: * DrawIcon uses iconBuffer * ShowIconBuffer uses iconBuffer.xPolygonLeft EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00Name: xPolygonLeft [Show more] Type: Variable Category: Drawing polygons Summary: The pixel x-coordinate of the left edge of each pixel line in the polygon being drawnContext: See this variable on its own page References: This variable is used as follows: * DrawPolygonLines (Part 1 of 4) uses xPolygonLeft * DrawPolygonLines (Part 3 of 4) uses xPolygonLeft * GetPolygonLines (Part 5 of 6) uses xPolygonLeft * TracePolygonEdge (Part 3 of 8) uses xPolygonLeft * TracePolygonEdge (Part 7 of 8) uses xPolygonLeft * TracePolygonEdge (Part 8 of 8) uses xPolygonLeft.xPolygonRight EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00 EQUB &00, &00, &00, &00, &00, &00, &00, &00Name: xPolygonRight [Show more] Type: Variable Category: Drawing polygons Summary: The pixel x-coordinate of the right edge of each pixel line in the polygon being drawnContext: See this variable on its own page References: This variable is used as follows: * DrawPolygonLines (Part 1 of 4) uses xPolygonRight * DrawPolygonLines (Part 3 of 4) uses xPolygonRight * GetPolygonLines (Part 5 of 6) uses xPolygonRight * TracePolygonEdge (Part 2 of 8) uses xPolygonRight * TracePolygonEdge (Part 3 of 8) uses xPolygonRightCLEAR &5A00, &5C00 \ Memory from &5A00 to &5BFF has two separate uses ORG &5A00 \ \ During the landscape generation process, it is used \ for storing tile data that can be discarded once the \ landscape is generated \ \ During gameplay it is used to store the xPolygonLeft \ and xPolygonRight tables \ \ These lines rewind BeebAsm's assembly back to &5A00 \ and clear the block from that point to the end of the \ xPolygonLeft and xPolygonRight variables at &5C00, \ so we can assemble the landscape variables \ \ The game binary actually contains snippets of the \ original source code, left over from the BBC Micro \ assembly process, so we include this workspace noise \ to ensure that we generate an exact match for the game \ binary .stripData EQUB &44, &58, &20, &45, &54, &45, &4D, &0D \ These values are workspace EQUB &14, &3C, &05, &20, &0D, &14, &46, &23 \ noise and have no meaning EQUB &20, &20, &20, &20, &20, &20, &54, &59 \ EQUB &41, &3A, &4A, &53, &52, &20, &45, &4D \ They actually contain snippets EQUB &49, &52, &54, &45, &53, &54, &3A, &42 \ of the original source code EQUB &43, &43, &20, &6D, &65, &61, &32, &0D EQUB &14, &50, &05, &20, &0D, &14, &5A, &1A EQUB &20, &20, &20, &20, &20, &20, &54, &59Name: stripData [Show more] Type: Variable Category: Landscape Summary: Storage for tile data when smoothing strips of tiles during the landscape generation processContext: See this variable on its own page References: This variable is used as follows: * GenerateLandscape uses stripData * SetCrackerSeed uses stripData * SmoothTileCorners (Part 1 of 4) uses stripData * SmoothTileCorners (Part 2 of 4) uses stripData * SmoothTileCorners (Part 3 of 4) uses stripData * SmoothTileCorners (Part 4 of 4) uses stripData.tilesAtAltitude EQUB &41, &3A, &53, &54, &41, &20, &4D, &45 \ These values are workspace EQUB &41, &4E, &59, &2C, &58, &20, &0D, &14 \ noise and have no meaning EQUB &64, &05, &20, &0D, &14, &6E, &1C, &20 \ EQUB &20, &20, &20, &20, &20, &4C, &44, &41 \ They actually contain snippets EQUB &23, &34, &3A, &53, &54, &41, &20, &4F \ of the original source code EQUB &42, &54, &59, &50, &45, &2C, &59, &0D EQUB &14, &78, &23, &20, &20, &20, &20, &20 EQUB &20, &4C, &44, &41, &23, &31, &30, &34 EQUB &3A, &53, &54, &41, &20, &4F, &42, &48 \ These bytes appear to be EQUB &41, &4C, &46, &53, &49, &5A, &45, &4D \ unused EQUB &49, &4E, &0D, &14, &82, &11, &20, &20 \ EQUB &20, &20, &20, &20, &43, &4C, &43, &3A \ These values are workspace EQUB &72, &74, &73, &0D, &14, &83, &05, &20 \ noise and have no meaning EQUB &0D, &14, &84, &21, &2E, &6D, &65, &61 \ EQUB &32, &20, &49, &4E, &43, &20, &4D, &54 \ They actually contain snippets EQUB &52, &59, &43, &4E, &54, &2C, &58, &3A \ of the original source code EQUB &4A, &4D, &50, &20, &45, &45, &58, &49 EQUB &54, &0D, &14, &85, &05, &20, &0D, &14 EQUB &8C, &05, &20, &0D, &14, &96, &26, &2E EQUB &74, &61, &6B, &35, &20, &4C, &44, &41 EQUB &23, &31, &32, &38, &3A, &53, &54, &41 EQUB &20, &54, &48, &45, &45, &4E, &44, &3A EQUB &4A, &4D, &50, &20, &45, &45, &58, &49 EQUB &54, &0D, &14, &A0, &05, &20, &0D, &14Name: tilesAtAltitude [Show more] Type: Variable Category: Landscape Summary: Storage for tile blocks at specific altitudes for placing enemies on the landscapeContext: See this variable on its own page References: This variable is used as follows: * AddEnemiesToTiles uses tilesAtAltitude * GetTilesAtAltitude uses tilesAtAltitude
This table stores the altitude of 4x4 tile blocks at specific altitudes, for use when placing enemies on the landscape. It is only used while the landscape is being generated and the allocated memory is reused during gameplay.EQUB &AA, &14, &2E, &54, &41, &4B, &45, &20 \ These values are workspace EQUB &4C, &44, &58, &20, &50, &45, &52, &53 \ noise and have no meaning .maxAltitude EQUB &4F, &4E, &0D, &14, &B4, &22, &20, &20 \ These values are workspace EQUB &20, &20, &20, &20, &43, &50, &58, &20 \ noise and have no meaning EQUB &50, &4C, &41, &59, &45, &52, &49, &4E \ EQUB &44, &45, &58, &3A, &42, &4E, &45, &20 \ They actually contain snippets EQUB &74, &61, &6B, &31, &0D, &14, &BE, &1D \ of the original source code EQUB &20, &20, &20, &20, &20, &20, &4C, &44 EQUB &41, &20, &45, &4E, &45, &52, &47, &59 EQUB &3A, &42, &45, &51, &20, &74, &61, &6B EQUB &35, &0D, &14, &C8, &1E, &20, &20, &20 \ These bytes appear to be EQUB &20, &20, &20, &53, &45, &43, &3A, &53 \ unusedName: maxAltitude [Show more] Type: Variable Category: Landscape Summary: The maximum tile altitude for each 4x4 block of tilesContext: See this variable on its own page References: This variable is used as follows: * AddEnemiesToTiles uses maxAltitude * GetHighestTiles uses maxAltitude * GetTilesAtAltitude uses maxAltitude
This table stores the altitude of the highest tile in each 4x4 block of tiles in the landscape. It is only used while the landscape is being generated and the allocated memory is reused during gameplay. The table is laid out with one byte for each 4x4 block, starting in the front-left corner of the landscape at tile coordinate (0, 0), and moving along the front row from left to right, and then moving back by four tiles and moving that row from left to right, until we reach the rear row of 4x4 blocks. The rear row and rightmost column of blocks are one tile smaller, so they are 4x3-tile and 3x4-tile blocks, with the far-right block being 3x3 tiles. You can picture this as partitioning the 31x31-tile landscape into an 8x8 chess board, where each square on the chess board is made up of a 4x4 block of landscape tiles (and with smaller squares along the right and rear edges). The blocks of memory either side of maxAltitude are included as they are zeroed when adding enemies to the landscape, and including them means we don't have to worry about the zeroing process leaking into neighbouring variable when placing enemies near the edges of the landscape..xTileMaxAltitude EQUB &42, &43, &23, &31, &3A, &53, &54, &41 \ These values are workspace EQUB &20, &45, &4E, &45, &52, &47, &59, &0D \ noise and have no meaning EQUB &14, &D2, &12, &20, &20, &20, &20, &20 \ EQUB &20, &4A, &53, &52, &20, &45, &44, &49 \ They actually contain snippets EQUB &53, &0D, &14, &DC, &18, &20, &20, &20 \ of the original source code EQUB &20, &20, &20, &4C, &44, &41, &23, &35 EQUB &3A, &4A, &53, &52, &20, &56, &49, &50 EQUB &4F, &0D, &14, &E6, &16, &20, &20, &20Name: xTileMaxAltitude [Show more] Type: Variable Category: Landscape Summary: The tile x-coordinate of the highest tile within each 4x4 block of tilesContext: See this variable on its own page References: This variable is used as follows: * AddEnemiesToTiles uses xTileMaxAltitude * GetHighestTiles uses xTileMaxAltitude
This table stores the tile x-coordinate of the highest tile within each 4x4 block of tiles in the landscape. It is only used while the landscape is being generated and the allocated memory is reused during gameplay. The table is laid out with one byte for each 4x4 block, starting in the front-left corner of the landscape at tile coordinate (0, 0), and moving along the front row from left to right, and then moving back by four tiles and moving that row from left to right, until we reach the rear row of 4x4 blocks. The rear row and rightmost column of blocks are one tile smaller, so they are 4x3-tile and 3x4-tile blocks, with the far-right block being 3x3 tiles. You can picture this as partitioning the 31x31-tile landscape into an 8x8 chess board, where each square on the chess board is made up of a 4x4 block of landscape tiles (and with smaller squares along the right and rear edges)..zTileMaxAltitude EQUB &20, &20, &20, &53, &45, &43, &3A, &4A \ These values are workspace EQUB &4D, &50, &20, &74, &61, &6B, &33, &0D \ noise and have no meaning EQUB &14, &F0, &05, &20, &0D, &14, &FA, &05 \ EQUB &20, &0D, &15, &04, &18, &2E, &74, &61 \ They actually contain snippets EQUB &6B, &31, &20, &54, &58, &41, &3A, &4A \ of the original source code EQUB &53, &52, &20, &45, &4D, &49, &52, &50 EQUB &54, &0D, &15, &0E, &05, &20, &0D, &15 EQUB &18, &1F, &20, &20, &20, &20, &20, &20 EQUB &4C, &44, &41, &20, &4F, &42, &54, &59 \ These bytes appear to be EQUB &50, &45, &2C, &58, &3A, &42, &4E, &45 \ unused EQUB &20, &74, &61, &6B, &34, &0D, &15, &22 \ EQUB &05, &20, &0D, &15, &2C, &1E, &20, &5C \ These values are workspace \ noise and have no meaning \ \ They actually contain snippets \ of the original source codeName: zTileMaxAltitude [Show more] Type: Variable Category: Landscape Summary: The tile z-coordinate of the highest tile within each 4x4 block of tilesContext: See this variable on its own page References: This variable is used as follows: * AddEnemiesToTiles uses zTileMaxAltitude * GetHighestTiles uses zTileMaxAltitude
This table stores the tile z-coordinate of the highest tile within each 4x4 block of tiles in the landscape. It is only used while the landscape is being generated and the allocated memory is reused during gameplay. The table is laid out with one byte for each 4x4 block, starting in the front-left corner of the landscape at tile coordinate (0, 0), and moving along the front row from left to right, and then moving back by four tiles and moving that row from left to right, until we reach the rear row of 4x4 blocks. The rear row and rightmost column of blocks are one tile smaller, so they are 4x3-tile and 3x4-tile blocks, with the far-right block being 3x3 tiles. You can picture this as partitioning the 31x31-tile landscape into an 8x8 chess board, where each square on the chess board is made up of a 4x4 block of landscape tiles (and with smaller squares along the right and rear edges).[X]Subroutine DrawRandomDots (category: Graphics)Draw 80 randomly positioned dots on the screen[X]Subroutine GetAngleFromCoords (Part 1 of 3) (category: Maths (Geometry))Given the coordinates along two axes, calculate the pitch or yaw angle to those coordinates[X]Subroutine GetHypotenuseAngle (category: Maths (Geometry))Calculate the angle of the hypotenuse in a right-angle triangle given the two non-hypotenuse sides (i.e. two orthogonal axes)[X]Subroutine GetRandomNumber (category: Maths (Arithmetic))Set A to a random number[X]Subroutine Multiply8x16 (category: Maths (Arithmetic))Multiply an 8-bit and a 16-bit number[X]Configuration variable OSWRCHThe address for the OSWRCH routine[X]Subroutine PrintCharacter (category: Text)Print a single-byte VDU command or character from a text token, optionally printing a drop shadow if the character is alphanumeric[X]Variable angleTangent in workspace Zero pageThe tangent of an angle in a right-angled triangle[X]Label byte1 in subroutine PrintCharacter[X]Label byte2 in subroutine PrintCharacter[X]Variable dotColour (category: Graphics)A flag that determines the colour of the dots drawn by the DrawRandomDots routine[X]Variable dotCounter (category: Graphics)A counter for the number of dots drawn in the DrawRandomDots routine[X]Label dots1 in subroutine DrawRandomDots[X]Label dots2 in subroutine DrawRandomDots[X]Label dots3 in subroutine DrawRandomDots[X]Label ghyp1 in subroutine GetHypotenuseAngle[X]Label ghyp10 in subroutine GetHypotenuseAngle[X]Label ghyp11 in subroutine GetHypotenuseAngle[X]Label ghyp2 in subroutine GetHypotenuseAngle[X]Label ghyp3 in subroutine GetHypotenuseAngle[X]Label ghyp4 in subroutine GetHypotenuseAngle[X]Label ghyp5 in subroutine GetHypotenuseAngle[X]Label ghyp6 in subroutine GetHypotenuseAngle[X]Label ghyp7 in subroutine GetHypotenuseAngle[X]Label ghyp8 in subroutine GetHypotenuseAngle[X]Label ghyp9 in subroutine GetHypotenuseAngle[X]Variable hypotenuseHi in workspace Zero pageThe high byte of the hypotenuse of a triangle[X]Variable hypotenuseLo in workspace Zero pageThe low byte of the hypotenuse of a triangle[X]Variable objPolygon000 in variable objRobotPolygon points: 11, 10, 8, 12, 11[X]Variable objPolygon001 in variable objRobotPolygon 1 points: 10, 9, 8, 10[X]Variable objPolygon002 in variable objRobotPolygon 2 points: 20, 19, 18, 21, 20[X]Variable objPolygon003 in variable objRobotPolygon 3 points: 0, 4, 7, 3, 0[X]Variable objPolygon004 in variable objRobotPolygon 4 points: 2, 6, 5, 1, 2[X]Variable objPolygon005 in variable objRobotPolygon 5 points: 3, 7, 6, 2, 3[X]Variable objPolygon006 in variable objRobotPolygon 6 points: 1, 5, 4, 0, 1[X]Variable objPolygon007 in variable objRobotPolygon 7 points: 8, 13, 16, 12, 8[X]Variable objPolygon008 in variable objRobotPolygon 8 points: 11, 15, 14, 10, 11[X]Variable objPolygon009 in variable objRobotPolygon 9 points: 12, 16, 15, 11, 12[X]Variable objPolygon010 in variable objRobotPolygon 10 points: 10, 28, 9, 10[X]Variable objPolygon011 in variable objRobotPolygon 11 points: 9, 28, 8, 9[X]Variable objPolygon012 in variable objRobotPolygon 12 points: 10, 14, 28, 10[X]Variable objPolygon013 in variable objRobotPolygon 13 points: 8, 28, 13, 8[X]Variable objPolygon014 in variable objRobotPolygon 14 points: 14, 17, 28, 14[X]Variable objPolygon015 in variable objRobotPolygon 15 points: 28, 17, 13, 28[X]Variable objPolygon016 in variable objRobotPolygon 16 points: 15, 17, 14, 15[X]Variable objPolygon017 in variable objRobotPolygon 17 points: 13, 17, 16, 13[X]Variable objPolygon018 in variable objRobotPolygon 18 points: 16, 17, 15, 16[X]Variable objPolygon019 in variable objRobotPolygon 19 points: 19, 26, 27, 18, 19[X]Variable objPolygon020 in variable objRobotPolygon 20 points: 18, 27, 21, 18[X]Variable objPolygon021 in variable objRobotPolygon 21 points: 20, 26, 19, 20[X]Variable objPolygon022 in variable objRobotPolygon 22 points: 27, 22, 25, 21, 27[X]Variable objPolygon023 in variable objRobotPolygon 23 points: 20, 24, 23, 26, 20[X]Variable objPolygon024 in variable objRobotPolygon 24 points: 21, 25, 24, 20, 21[X]Variable objPolygon025 in variable objRobotPolygon 25 points: 23, 24, 25, 22, 23[X]Variable objPolygon026 in variable objRobotPolygon 26 points: 26, 23, 22, 27, 26[X]Variable objPolygon027 in variable objSentryPolygon 27 points: 32, 37, 36, 31, 32[X]Variable objPolygon028 in variable objSentryPolygon 28 points: 29, 38, 32, 29[X]Variable objPolygon029 in variable objSentryPolygon 29 points: 31, 35, 30, 31[X]Variable objPolygon030 in variable objSentryPolygon 30 points: 30, 34, 33, 29, 30[X]Variable objPolygon031 in variable objSentryPolygon 31 points: 32, 38, 37, 32[X]Variable objPolygon032 in variable objSentryPolygon 32 points: 31, 36, 35, 31[X]Variable objPolygon033 in variable objSentryPolygon 33 points: 30, 35, 34, 30[X]Variable objPolygon034 in variable objSentryPolygon 34 points: 29, 33, 38, 29[X]Variable objPolygon035 in variable objSentryPolygon 35 points: 38, 42, 37, 38[X]Variable objPolygon036 in variable objSentryPolygon 36 points: 37, 42, 41, 36, 37[X]Variable objPolygon037 in variable objSentryPolygon 37 points: 36, 41, 35, 36[X]Variable objPolygon038 in variable objSentryPolygon 38 points: 35, 40, 34, 35[X]Variable objPolygon039 in variable objSentryPolygon 39 points: 34, 40, 39, 33, 34[X]Variable objPolygon040 in variable objSentryPolygon 40 points: 33, 39, 38, 33[X]Variable objPolygon041 in variable objSentryPolygon 41 points: 38, 39, 42, 38[X]Variable objPolygon042 in variable objSentryPolygon 42 points: 35, 41, 40, 35[X]Variable objPolygon043 in variable objSentryPolygon 43 points: 40, 44, 43, 39, 40[X]Variable objPolygon044 in variable objSentryPolygon 44 points: 42, 50, 49, 41, 42[X]Variable objPolygon045 in variable objSentryPolygon 45 points: 39, 47, 50, 42, 39[X]Variable objPolygon046 in variable objSentryPolygon 46 points: 41, 49, 48, 40, 41[X]Variable objPolygon047 in variable objSentryPolygon 47 points: 48, 49, 50, 47, 48[X]Variable objPolygon048 in variable objSentryPolygon 48 points: 46, 48, 47, 45, 46[X]Variable objPolygon049 in variable objSentryPolygon 49 points: 43, 45, 47, 39, 43[X]Variable objPolygon050 in variable objSentryPolygon 50 points: 40, 48, 46, 44, 40[X]Variable objPolygon051 in variable objSentryPolygon 51 points: 44, 46, 45, 43, 44[X]Variable objPolygon052 in variable objTreePolygon 52 points: 59, 66, 65, 60, 59[X]Variable objPolygon053 in variable objTreePolygon 53 points: 60, 65, 64, 61, 60[X]Variable objPolygon054 in variable objTreePolygon 54 points: 61, 64, 63, 62, 61[X]Variable objPolygon055 in variable objTreePolygon 55 points: 52, 56, 55, 51, 52[X]Variable objPolygon056 in variable objTreePolygon 56 points: 53, 57, 56, 52, 53[X]Variable objPolygon057 in variable objTreePolygon 57 points: 51, 55, 58, 54, 51[X]Variable objPolygon058 in variable objTreePolygon 58 points: 54, 58, 57, 53, 54[X]Variable objPolygon059 in variable objTreePolygon 59 points: 59, 67, 66, 59[X]Variable objPolygon060 in variable objTreePolygon 60 points: 60, 67, 59, 60[X]Variable objPolygon061 in variable objTreePolygon 61 points: 61, 67, 60, 61[X]Variable objPolygon062 in variable objTreePolygon 62 points: 62, 67, 61, 62[X]Variable objPolygon063 in variable objTreePolygon 63 points: 63, 67, 62, 63[X]Variable objPolygon064 in variable objTreePolygon 64 points: 64, 67, 63, 64[X]Variable objPolygon065 in variable objTreePolygon 65 points: 65, 67, 64, 65[X]Variable objPolygon066 in variable objTreePolygon 66 points: 66, 67, 65, 66[X]Variable objPolygon067 in variable objBoulderPolygon 67 points: 69, 68, 75, 69[X]Variable objPolygon068 in variable objBoulderPolygon 68 points: 71, 70, 69, 71[X]Variable objPolygon069 in variable objBoulderPolygon 69 points: 73, 72, 71, 73[X]Variable objPolygon070 in variable objBoulderPolygon 70 points: 75, 74, 73, 75[X]Variable objPolygon071 in variable objBoulderPolygon 71 points: 69, 70, 68, 69[X]Variable objPolygon072 in variable objBoulderPolygon 72 points: 71, 72, 70, 71[X]Variable objPolygon073 in variable objBoulderPolygon 73 points: 73, 74, 72, 73[X]Variable objPolygon074 in variable objBoulderPolygon 74 points: 75, 68, 74, 75[X]Variable objPolygon075 in variable objBoulderPolygon 75 points: 69, 75, 73, 71, 69[X]Variable objPolygon076 in variable objBoulderPolygon 76 points: 68, 70, 72, 74, 68[X]Variable objPolygon077 in variable objMeaniePolygon 77 points: 83, 88, 87, 82, 83[X]Variable objPolygon078 in variable objMeaniePolygon 78 points: 76, 81, 78, 76[X]Variable objPolygon079 in variable objMeaniePolygon 79 points: 77, 80, 76, 77[X]Variable objPolygon080 in variable objMeaniePolygon 80 points: 76, 80, 79, 76[X]Variable objPolygon081 in variable objMeaniePolygon 81 points: 76, 79, 81, 76[X]Variable objPolygon082 in variable objMeaniePolygon 82 points: 78, 81, 80, 77, 78[X]Variable objPolygon083 in variable objMeaniePolygon 83 points: 81, 82, 85, 81[X]Variable objPolygon084 in variable objMeaniePolygon 84 points: 80, 84, 83, 80[X]Variable objPolygon085 in variable objMeaniePolygon 85 points: 81, 85, 84, 80, 81[X]Variable objPolygon086 in variable objMeaniePolygon 86 points: 79, 82, 81, 79[X]Variable objPolygon087 in variable objMeaniePolygon 87 points: 80, 83, 79, 80[X]Variable objPolygon088 in variable objMeaniePolygon 88 points: 79, 83, 82, 79[X]Variable objPolygon089 in variable objMeaniePolygon 89 points: 87, 86, 82, 87[X]Variable objPolygon090 in variable objMeaniePolygon 90 points: 83, 89, 88, 83[X]Variable objPolygon091 in variable objMeaniePolygon 91 points: 87, 90, 86, 87[X]Variable objPolygon092 in variable objMeaniePolygon 92 points: 88, 89, 91, 88[X]Variable objPolygon093 in variable objMeaniePolygon 93 points: 88, 91, 90, 87, 88[X]Variable objPolygon094 in variable objMeaniePolygon 94 points: 82, 86, 85, 82[X]Variable objPolygon095 in variable objMeaniePolygon 95 points: 83, 84, 89, 83[X]Variable objPolygon096 in variable objMeaniePolygon 96 points: 86, 92, 85, 86[X]Variable objPolygon097 in variable objMeaniePolygon 97 points: 84, 93, 89, 84[X]Variable objPolygon098 in variable objMeaniePolygon 98 points: 86, 90, 92, 86[X]Variable objPolygon099 in variable objMeaniePolygon 99 points: 89, 93, 91, 89[X]Variable objPolygon100 in variable objMeaniePolygon 100 points: 85, 92, 93, 84, 85[X]Variable objPolygon101 in variable objMeaniePolygon 101 points: 91, 93, 92, 90, 91[X]Variable objPolygon102 in variable objSentinelPolygon 102 points: 114, 110, 111, 115, 114[X]Variable objPolygon103 in variable objSentinelPolygon 103 points: 111, 108, 115, 111[X]Variable objPolygon104 in variable objSentinelPolygon 104 points: 114, 109, 110, 114[X]Variable objPolygon105 in variable objSentinelPolygon 105 points: 109, 113, 112, 108, 109[X]Variable objPolygon106 in variable objSentinelPolygon 106 points: 97, 101, 100, 96, 97[X]Variable objPolygon107 in variable objSentinelPolygon 107 points: 94, 98, 101, 97, 94[X]Variable objPolygon108 in variable objSentinelPolygon 108 points: 96, 100, 99, 95, 96[X]Variable objPolygon109 in variable objSentinelPolygon 109 points: 95, 99, 98, 94, 95[X]Variable objPolygon110 in variable objSentinelPolygon 110 points: 101, 106, 105, 100, 101[X]Variable objPolygon111 in variable objSentinelPolygon 111 points: 98, 107, 101, 98[X]Variable objPolygon112 in variable objSentinelPolygon 112 points: 100, 104, 99, 100[X]Variable objPolygon113 in variable objSentinelPolygon 113 points: 99, 103, 102, 98, 99[X]Variable objPolygon114 in variable objSentinelPolygon 114 points: 101, 107, 106, 101[X]Variable objPolygon115 in variable objSentinelPolygon 115 points: 100, 105, 104, 100[X]Variable objPolygon116 in variable objSentinelPolygon 116 points: 98, 102, 107, 98[X]Variable objPolygon117 in variable objSentinelPolygon 117 points: 99, 104, 103, 99[X]Variable objPolygon118 in variable objSentinelPolygon 118 points: 107, 111, 106, 107[X]Variable objPolygon119 in variable objSentinelPolygon 119 points: 105, 110, 104, 105[X]Variable objPolygon120 in variable objSentinelPolygon 120 points: 106, 111, 110, 105, 106[X]Variable objPolygon121 in variable objSentinelPolygon 121 points: 107, 108, 111, 107[X]Variable objPolygon122 in variable objSentinelPolygon 122 points: 104, 110, 109, 104[X]Variable objPolygon123 in variable objSentinelPolygon 123 points: 102, 108, 107, 102[X]Variable objPolygon124 in variable objSentinelPolygon 124 points: 103, 104, 109, 103[X]Variable objPolygon125 in variable objSentinelPolygon 125 points: 103, 109, 108, 102, 103[X]Variable objPolygon126 in variable objSentinelPolygon 126 points: 119, 121, 120, 118, 119[X]Variable objPolygon127 in variable objSentinelPolygon 127 points: 115, 123, 122, 114, 115[X]Variable objPolygon128 in variable objSentinelPolygon 128 points: 108, 118, 115, 108[X]Variable objPolygon129 in variable objSentinelPolygon 129 points: 114, 119, 109, 114[X]Variable objPolygon130 in variable objSentinelPolygon 130 points: 112, 116, 118, 108, 112[X]Variable objPolygon131 in variable objSentinelPolygon 131 points: 109, 119, 117, 113, 109[X]Variable objPolygon132 in variable objSentinelPolygon 132 points: 117, 119, 118, 116, 117[X]Variable objPolygon133 in variable objSentinelPolygon 133 points: 113, 117, 116, 112, 113[X]Variable objPolygon134 in variable objSentinelPolygon 134 points: 121, 122, 123, 120, 121[X]Variable objPolygon135 in variable objSentinelPolygon 135 points: 118, 120, 123, 115, 118[X]Variable objPolygon136 in variable objSentinelPolygon 136 points: 114, 122, 121, 119, 114[X]Variable objPolygon137 in variable objTowerPolygon 137 points: 125, 130, 129, 124, 125[X]Variable objPolygon138 in variable objTowerPolygon 138 points: 126, 132, 131, 125, 126[X]Variable objPolygon139 in variable objTowerPolygon 139 points: 127, 134, 133, 126, 127[X]Variable objPolygon140 in variable objTowerPolygon 140 points: 124, 128, 135, 127, 124[X]Variable objPolygon141 in variable objTowerPolygon 141 points: 124, 129, 128, 124[X]Variable objPolygon142 in variable objTowerPolygon 142 points: 125, 131, 130, 125[X]Variable objPolygon143 in variable objTowerPolygon 143 points: 126, 133, 132, 126[X]Variable objPolygon144 in variable objTowerPolygon 144 points: 127, 135, 134, 127[X]Variable objPolygon145 in variable objTowerPolygon 145 points: 130, 131, 132, 133, 130[X]Variable objPolygon146 in variable objTowerPolygon 146 points: 130, 133, 134, 129, 130[X]Variable objPolygon147 in variable objTowerPolygon 147 points: 129, 134, 135, 128, 129[X]Variable objPolygon148 in variable objTextBlockPolygon 148 points: 136, 140, 143, 139, 136[X]Variable objPolygon149 in variable objTextBlockPolygon 149 points: 138, 142, 141, 137, 138[X]Variable objPolygon150 in variable objTextBlockPolygon 150 points: 137, 141, 140, 136, 137[X]Variable objPolygon151 in variable objTextBlockPolygon 151 points: 141, 142, 143, 140, 141[X]Variable objectPitchAngle in workspace Stack variablesThe pitch angle for each object (i.e. the vertical direction in which they are facing)[X]Label pdel1 in subroutine GetPitchAngleDelta[X]Label pdel2 in subroutine GetPitchAngleDelta[X]Variable pitchDeltaHi in workspace Zero pageThe delta between two pitch angles (high byte)[X]Variable pitchDeltaLo in workspace Zero pageThe delta between two pitch angles (low byte)[X]Variable pixelBitMask (category: Graphics)A table for converting a pixel number in the range 0 to 3 into a screen mode 5 bit mask with that pixel's bits set and others clear[X]Variable pixelByteColour1 (category: Sights)A table for converting a pixel number in the range 0 to 3 into a screen mode 5 pixel byte with that pixel set to colour 1 (%01)[X]Label prin1 in subroutine PrintVduCharacter[X]Label prin2 in subroutine PrintVduCharacter[X]Variable randomGenerator (category: Maths (Arithmetic))A 24-bit random number generator that works independently from the landscape seeds and with a much simpler generation algorithm[X]Variable randomPixel in workspace Zero pageStorage for a random value in the DrawRandomDots routine to use as a random pixel number when drawing dots[X]Variable scannerUpdate in workspace Main variable workspaceA flag to control whether the scanner gets updated[X]Variable screenAddr in workspace Zero pageStorage for a screen address[X]Label scup1 in subroutine SetScannerAndPause[X]Variable shiftGenerator (category: Maths (Arithmetic))Storage for randomGenerator(2 1 0) while we shift it left by two places[X]Variable tanHalfAngle (category: Maths (Geometry))Table for hypotenuse lengths given the tangent of an angle[X]Variable textDropShadow in workspace Main variable workspaceControls whether text in text tokens is printed with a drop shadow[X]Variable token0 (category: Text)Background colour blue, print "PRESS ANY KEY" at (64, 100), set text background to black[X]Variable token1 (category: Text)Print 13 spaces at (64, 100), print "LANDSCAPE NUMBER?" at (64, 768), switch to text cursor, move text cursor to (5, 27)[X]Variable token10 (category: Text)Text token 10: Configure text to be printed at the graphics cursor and set the background colour to colour 0 (blue)[X]Variable token11 (category: Text)Text token 11: Configure text to be printed at the graphics cursor and set the background colour to colour 1 (black)[X]Variable token12 (category: Text)Text token 12: Move graphics cursor to (64, 100)[X]Variable token13 (category: Text)Text token 13: Print "LANDSCAPE"[X]Variable token14 (category: Text)Text token 14: Print "SECRET ENTRY CODE"[X]Variable token15 (category: Text)Text token 15: Print five spaces[X]Variable token16 (category: Text)Text token 16: Print three spaces[X]Variable token17 (category: Text)Text token 17: Print "PRESS ANY KEY"[X]Variable token2 (category: Text)Background colour blue, print "SECRET ENTRY CODE?" at (64, 768), switch to text cursor, move text cursor to (2, 27)[X]Variable token3 (category: Text)Background colour blue, print "WRONG SECRET CODE" at (64, 768), print "PRESS ANY KEY" at (64, 100), set text background to black[X]Variable token4 (category: Text)Background colour black, print "PRESS ANY KEY" at (192, 64), print "LANDSCAPE" two chars right of (64, 768), move cursor right[X]Variable token5 (category: Text)Text token 5: Print "SECRET ENTRY CODE" at (64, 768), "LANDSCAPE" at (192, 704), move cursor right[X]Variable token6 (category: Text)Text token 6: Print "PRESS ANY KEY" at (64, 100)[X]Variable token7 (category: Text)Text token 7: Move the graphics cursor to (64, 768)[X]Variable token8 (category: Text)Text token 8: Move the graphics cursor to (192, 704)[X]Variable token9 (category: Text)Text token 9: Move the graphics cursor to (192, 64)[X]Label tokenBase in variable tokenOffset[X]Variable vduCounter (category: Text)The number of bytes in a VDU 25, n, x; y; command[X]Variable vduShadowFront (category: Text)VDU commands for printing the front character of a drop shadow[X]Variable vduShadowRear (category: Text)VDU commands for printing the rear character of a drop shadow[X]Variable viewScreenAddr in workspace Main variable workspaceThe screen address of the player's scrolling landscape view, which is just below the icon and scanner row at the top of the screen[X]Variable xDeltaAbsoluteHi in workspace Zero pageThe absolute difference between two x-coordinates (high byte), i.e. |xDeltaHi|[X]Variable yStoreHypotenuse (category: Maths (Geometry))Temporary storage for Y so it can be preserved through calls to GetHypotenuse[X]Variable zDeltaAbsoluteHi in workspace Zero pageThe absolute difference between two z-coordinates (high byte), i.e. |zDeltaHi|