Jump to content

IntyBASIC Change Foreground Colors on BACKTAB?

First Spear

Recommended Posts

The "screen" command simply copies values from your data table (in your case "my_cards" ) to the backtab. Color information has to be included in the data table.


If you want to change the color used, you could either:


1. have a different "my_cards" data table for each desired color. or

2. have no color in the data table, and then write a fixup routine to add the color later...

			DEFINE 0,8,mybitmaps_0 
			SCREEN my_cards,0,80,9,8,9

	#color = CS_WHITE
	for r = 0 to 8
		#address = BACKTAB_ADRS + 80 + (20 * r)
		for c = 0 to 9
		 	poke #address, peek(#address) + #color
			#address = #address + 1
		next c
	next r


  • Like 2
Link to comment
Share on other sites

I would make use of XOR if you want to fade in something e.g.

Colour would become:

#color=#fromColour  XOR #toColour

The central part of catsfolly's loop would become:

#data=#data XOR #color
poke #address,#data

Then you would make it into a procedure and call it as follows:-

rem Fade fromblack to blue.
gosub FadeBlockIn
wait ' Wait for a few VBLANKSs before altering the colour again.

rem Fade from blue to white.
gosub FadeBlockIn

rem Fade from white to green.
gosub FadeBlockIn
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...