TI99 Environment

CALL_COLORCHAR


Syntax

CALL_COLORCHAR(ascii-code,foreground-color,background-color)

Description

This function changes the foreground and background colors of the character specified in ascii-code. Valid ascii-code values: 32 to endchar. The foreground-color and background-color parameters hold the character's foreground and background colors respectively. Valid values: 1-16 (See the Available Colors Table below). The default foreground color is 2 - Black. The default background color is 1 - Transparent.

Note 1: CALL_COLORCHAR does not affect sprite colors. To change the foreground color of an existing sprite, use the CALL_COLORSPRITE function instead. To set the colors for new sprites, use the CALL_SPRITE function.
Note 2: To reset all character colors to the defaults, use the Call_Charset() function.

Color Set Table
* Characters using a transparent foreground OR background color, will show the current screen color through. Characters will turn invisible if both their background AND foreground colors are transparent.

  Example Code
  numsprites = 50
  CALL_SCREEN(5) 
  call_magnify(2) 
  call_char(39,rpt$("f",16))
  a$ = call_charpat(42)
  for i = 128 to 142  : call_char(i,a$) : next i  
  randomize timer()
    for i = 1 to numsprites
        call_sprite(i,39,rnd(12)+4,100,128,rnd(110) - 40, rnd(110) - 40)    
        tiwait(25) 
     next i
DO      
   for i = 1 to 15 : CALL_COLORCHAR(127+i,rnd(15) + 1,rnd(15) + 1)
      FOR J = 1 TO 500
        r=RND(23)+1 : C=RND(31) + 1
        CALL_HCHAR(R,C,rnd(14)+128,1)             
      NEXT J                           
   next i
   tiwaitkey()  ` Wait for key
 LOOP			

Go back to ...

TI99E Commands Menu
Main Menu

Copyright © Carlos Santiago Lebron - TI99 Environment 2020