IF _GMA_RELEASE ORG $F900 ELIF _SOURCE_DISK ORG $F000 ENDIF .K% SKIP NOSH * NI% ; Ship data blocks and ship line heap ; ; [Show more]Name: K% [Show more] Type: Workspace Address: $F900 to $FA71 ($F000 to $F171 in the source disk variant) Category: Workspaces Summary: Ship data blocks and ship line heaps Deep dive: Ship data blocks The local bubble of universeContext: See this workspace in context in the source code References: This workspace is used as follows: * ANGRY uses K% * DCS1 uses K% * DOEXP uses K% * Main flight loop (Part 1 of 16) uses K% * Main flight loop (Part 9 of 16) uses K% * Main flight loop (Part 14 of 16) uses K% * Main game loop (Part 4 of 6) uses K% * MAS2 uses K% * MAS3 uses K% * PTCLS2 uses K% * SPS3 uses K% * SPS4 uses K% * TAS4 uses K% * UNIV uses K% * VCSU1 uses K% * WARP uses K%
The blocks are pointed to by the lookup table at location UNIV. The first 370 bytes of the K% workspace hold ship data on up to 10 ships, with 37 (NI%) bytes per ship. See the deep dive on "Ship data blocks" for details on ship data blocks, and the deep dive on "The local bubble of universe" for details of how Elite stores the local universe in K%, FRIN and UNIV.; ; This variable is used by the following: ; ; * ANGRY ; * DCS1 ; * DOEXP ; * Main flight loop (Part 1 of 16) ; * Main flight loop (Part 9 of 16) ; * Main flight loop (Part 14 of 16) ; * Main game loop (Part 4 of 6) ; * MAS2 ; * MAS3 ; * PTCLS2 ; * SPS3 ; * SPS4 ; * TAS4 ; * UNIV ; * VCSU1 ; * WARP ; ; This list only includes code that refers to the ; variable by name; there may be other references to ; this memory location that don't use this label, and ; these will not be mentioned abovePRINT "K% workspace from ", ~K%, "to ", ~P%-1, "inclusive"
[X]
Configuration variable NI% = 37
The number of bytes in each ship's data block (as stored in INWK and K%)
[X]
Configuration variable NOSH = 10
The maximum number of ships in our local bubble of universe