<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3AXlib_Greyscale</id>
	<title>TI-BASIC:Xlib Greyscale - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3AXlib_Greyscale"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Xlib_Greyscale&amp;action=history"/>
	<updated>2026-05-28T10:40:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=TI-BASIC:Xlib_Greyscale&amp;diff=453&amp;oldid=prev</id>
		<title>Maintenance script: Initial automated import</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Xlib_Greyscale&amp;diff=453&amp;oldid=prev"/>
		<updated>2016-02-24T18:02:13Z</updated>

		<summary type="html">&lt;p&gt;Initial automated import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;With xLib grayscale is very easy and good. You might think now: Basic? Grayscale? I couldn&amp;#039;t find a xLib command that does that? Then your right: there is not such a command. You&amp;#039;ll have to trick a bit for it with recalling a pic very often in XOR-logic, so inversion.&lt;br /&gt;
So you have a normal screen and a other image that is recalled in XOR often.&lt;br /&gt;
&lt;br /&gt;
For example, your screen is like this:&lt;br /&gt;
[http://desmond.imageshack.us/Himg803/scaled.php?server=803&amp;amp;filename=screenp.jpg&amp;amp;res=medium]&lt;br /&gt;
This is in pic 1:&lt;br /&gt;
[http://desmond.imageshack.us/Himg16/scaled.php?server=16&amp;amp;filename=grauinvert.jpg&amp;amp;res=medium]&lt;br /&gt;
&lt;br /&gt;
Then you have this code:&lt;br /&gt;
&lt;br /&gt;
 :DelVar A&lt;br /&gt;
 :Repeat A&lt;br /&gt;
 :real(3,1,3,1,1&lt;br /&gt;
 :getKey-&amp;gt;A&lt;br /&gt;
 :End&lt;br /&gt;
&lt;br /&gt;
And till you press a key the screen will be like this:&lt;br /&gt;
[http://desmond.imageshack.us/Himg94/scaled.php?server=94&amp;amp;filename=screenfertig.png&amp;amp;res=medium]&lt;br /&gt;
&lt;br /&gt;
Ok, as you may notice the image in pic 1 is very often recalled in XOR-logic, and that seems then as grey scale.&lt;br /&gt;
&lt;br /&gt;
Now some training:&lt;br /&gt;
Try to make this sprite:&lt;br /&gt;
[http://desmond.imageshack.us/Himg27/scaled.php?server=27&amp;amp;filename=spritebesipielgrau.jpg&amp;amp;res=medium]&lt;br /&gt;
&lt;br /&gt;
Ok, the image that inverts everything is obvious, because it is just everywhere where it is supposed to be grey:&lt;br /&gt;
[http://desmond.imageshack.us/Himg848/scaled.php?server=848&amp;amp;filename=spritebesipielinvert.jpg&amp;amp;res=medium]&lt;br /&gt;
&lt;br /&gt;
More complicated is the image that should be displayed a the beginning. You might think of this:&lt;br /&gt;
[http://desmond.imageshack.us/Himg17/scaled.php?server=17&amp;amp;filename=spritebesipieldispfalsc.jpg&amp;amp;res=medium]&lt;br /&gt;
It would work out, but the grey wouldn&amp;#039;t look to good.&lt;br /&gt;
&lt;br /&gt;
Better is this:&lt;br /&gt;
[http://desmond.imageshack.us/Himg43/scaled.php?server=43&amp;amp;filename=spritebesipieldispricht.jpg&amp;amp;res=medium]&lt;br /&gt;
because of the checked tiles it seems better to the eye, it is a optical solution.&lt;br /&gt;
So if you have dcs the code to display that in grey till a key is pressed would be:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 :real(0,0  //clears the screen&lt;br /&gt;
 :identity(5,&amp;quot;00003C3C3C3C0000&amp;quot;,0,0,1,8,0,0,0  //draws the sprite that will invert the screen&lt;br /&gt;
 :identity(1,1,1  //saves it in pic 1&lt;br /&gt;
 :real(0,0  //clears the screen&lt;br /&gt;
 :identity(5,&amp;quot;FF81A995A99581FF&amp;quot;,0,0,1,8,0,0,0  //the sprite, the grey thing is checked&lt;br /&gt;
 :Repeat Ans  //repeats till something is in Ans&lt;br /&gt;
 :real(3,1,3,1,1  //inverts the screen with pic 1&lt;br /&gt;
 :getKey  //puts the Key in Ans&lt;br /&gt;
 :End[[Category:TI-BASIC]]&lt;br /&gt;
[[Category:TIBD]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>