Skip to navigation

Elite on the BBC Micro

Version analysis of ALTIT

This code appears in the following versions (click to see it in the source code):

Code variations between these versions are shown below.

.ALTIT

Code variation 1 of 2A variation in the comments only

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Flight, Docked, 6502SP, Master

Electron

SKIP 1 \ Our altitude above the surface of the planet or sun
SKIP 1 \ Our altitude above the surface of the planet
                        \
                        \   * 255 = we are a long way above the surface
                        \
                        \   * 1-254 = our altitude as the square root of:
                        \
                        \       x_hi^2 + y_hi^2 + z_hi^2 - 6^2
                        \
                        \     where our ship is at the origin, the centre of the

Code variation 2 of 2A variation in the comments only

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Flight, Docked, 6502SP, Master

Electron

\ planet/sun is at (x_hi, y_hi, z_hi), and the \ radius of the planet/sun is 6
\ planet is at (x_hi, y_hi, z_hi), and the radius \ of the planet is 6
                        \
                        \   * 0 = we have crashed into the surface

RSS Feed