Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use COLOR to PRINT in graphical text modes #47

Closed
vitococl opened this issue May 4, 2021 · 0 comments
Closed

Use COLOR to PRINT in graphical text modes #47

vitococl opened this issue May 4, 2021 · 0 comments

Comments

@vitococl
Copy link

vitococl commented May 4, 2021

In GRAPHICS modes 1 and 2, text can be PRINTed in any of the 4 playfield colors, but the text must be prepared to use them (inverse video and/or lower case in literals). This seems to be always true, except when numeric variables are converted to text (implicit STR) to be displayed, because the ATASCII value of the digits are always in the range from $30 to $39 (playfield 0).

The request is to add a constant based on current COLOR just before printing each digit (PUT).

This way, scores, levels and lives could be printed in its own color without having to convert each digit on each item or being forced to assign playfield 0 for the scores.

If this change is at PUT level (not in STR function), it could also be available to change the whole text to the desired color:

GRAPHICS 1
FOR X=0 TO 3
    COLOR X
    PRINT #6,"THIS IS COLOR ";X
NEXT

With this enhancement, the previous example sould display 4 lines of text, each of its own color.

This feature must not be restricted for texted GRAPHICS modes 1 and 2, because the display list might be of mixed modes. The default COLOR mode should be 0 and that should do nothing to text.

@dmsc dmsc closed this as completed in 66ba7f1 Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants