Skip to content

Use COLOR to PRINT in graphical text modes #47

Description

@vitococl

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions