RSPCOLOR
BASIC keyword | |
Keyword: | RSPCOLOR |
Abbreviation: | R, S SHIFT+P |
Type: | Function |
Token code: | $ce $07 (206 7) |
Handling routine in BASIC ROM: |
|
List of all BASIC keywords |
Remark: This article describes the BASIC function RSPCOLOR in Commodore BASIC V7.0 or higher.
Type: Function General Programming-Syntax: RSPCOLOR(<n>)
The function RSPCOLOR is used to query which Multicolor colours are currently set for the sprites.
Valid values for the parameter <n> are:
- 1: determines the colour value for multicolour 1.
- 2: determines the colour value for the multicolour 2.
Other values for <n> cause the error message ?ILLEGAL QUANTITY ERROR.
A string as a parameter will cause ?TYPE MISMATCH ERROR. If the parameter is missing or more than one is specified, an ?SYNTAX ERROR is returned.
The following colours correspond to the return value of the function:
Value | Nname | Color | Value | Name | Color | |
---|---|---|---|---|---|---|
1 | Black | 9 | Orange | |||
2 | White | 10 | Brown | |||
3 | Red | 11 | Lightred | |||
4 | Cyan | 12 | Darkgrey / Grey 1 |
|||
5 | Violet / Purple |
13 | Grey 2 | |||
6 | Green | 14 | Lightgreen | |||
7 | Blue | 15 | Lightblue | |||
8 | Yellow | 16 | Lightgrey / Grey 3 |
Another sprite commands in BASIC 7.0 are MOVSPR, RSPPOS, RSPRITE, SPRCOLOR, SPRITE, SPRDEF and SPRSAV, also BUMP, COLLISION, GSHAPE and SSHAPE.
Examples[edit | edit source]
M1=RSPCOLOR(1)
Saves the currently set multicolour 1 in the variable M1.
ABS | AND | APPEND | ASC | ATN | AUTO | BACKUP | BANK | BEGIN | BEND | BLOAD | BOOT | BOX | BSAVE | BUMP | CATALOG | CHAR | CHR$ | CIRCLE | CLOSE | CLR | CMD | COLLECT | COLLISION | COLOR | CONCAT | CONT | COPY | COS | DATA | DCLEAR | DCLOSE | DEC | DEF FN | DELETE | DIM | DIRECTORY | DLOAD | DO | DOPEN | DRAW | DS | DS$ | DSAVE | DVERIFY | EL | ELSE | END | ENVELOPE | ER | ERR$ | EXIT | EXP | FAST | FETCH | FILTER | FN | FOR | FRE | GET | GET# | GETKEY | GO64 | GOSUB | GOTO | GRAPHIC | GSHAPE | HEADER | HELP | HEX$ | IF | INPUT | INPUT# | INSTR | INT | JOY | KEY | LEFT$ | LEN | LET | LIST | LOAD | LOCATE | LOG | LOOP | MID$ | MONITOR | MOVSPR | NEW | NEXT | NOT | (OFF) | ON | OPEN | OR | PAINT | PEEK | PEN | (PI) | PLAY | POINTER | POKE | POS | POT | PRINT | PRINT USING | PRINT# | PUDEF | (QUIT) | RCLR | RDOT | READ | RECORD | REM | RENAME | RENUMBER | RESTORE | RESUME | RETURN | RGR | RIGHT$ | RND | RREG | RSPCOLOR | RSPPOS | RSPRITE | RUN | RWINDOW | SAVE | SCALE | SCNCLR | SCRATCH | SGN | SIN | SLEEP | SLOW | SOUND | SPC( | SPRCOLOR | SPRDEF | SPRITE | SPRSAV | SQR | SSHAPE | ST | STASH | STEP | STOP | STR$ | SWAP | SYS | TAB( | TAN | TEMPO | THEN | TI | TI$ | TO | TRAP | TROFF | TRON | USR | VAL | VERIFY | VOL | WAIT | WHILE | WINDOW | WIDTH | XOR