EasyManua.ls Logo

Commodore 128 - Page 332

Commodore 128
448 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
This function returns the angle whose tangent is X, measured in
radians.
EXAMPLE:
PRINT ATN (3)
1.24904577
BUMP
Return sprite collision information
BUMP (N)
To determine which sprites have collided since the last check,
use the BUMP function. BUMP(1) records which sprites have
collided with each other and BUMP(2) records which sprites have
collided with other objects on the screen. COLLISION need not
be active to use BUMP. The bit positions (0-7) in the BUMP value
correspond to sprites 1 through 8 respectively. BUMP(n) is reset
to zero after each call.
The value returned by BUMP is the result of two raised to the
power of the bit position. For example, if BUMP returned a value
of 16, sprite 4 was involved in a collision since 2 raised to the
fourth power equals 16.
EXAMPLES:
PRINT BUMP (1) Indicates that sprites 2 and 3 have
collided.
12
PRINT BUMP (2) Indicates that sprite 5 has
collided with an object on the screen.
32
CHR$
Return ASCII character for specified CBM ASCII code
CHR$(X)
This is the opposite of ASC and returns the string character
whose CBM ASCII code is X. Refer to Appendix E for a table of
CHR$ codes.
18-4

Table of Contents

Other manuals for Commodore 128

Related product manuals