<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://fenixwiki.booleansoup.com/skins/common/feed.css?63"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://fenixwiki.booleansoup.com/index.php?action=history&amp;feed=atom&amp;title=Blend_table</id>
		<title>Blend table - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://fenixwiki.booleansoup.com/index.php?action=history&amp;feed=atom&amp;title=Blend_table"/>
		<link rel="alternate" type="text/html" href="http://fenixwiki.booleansoup.com/index.php?title=Blend_table&amp;action=history"/>
		<updated>2026-05-01T08:02:11Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.10.1</generator>

	<entry>
		<id>http://fenixwiki.booleansoup.com/index.php?title=Blend_table&amp;diff=4571&amp;oldid=prev</id>
		<title>Sandman: /* Example */</title>
		<link rel="alternate" type="text/html" href="http://fenixwiki.booleansoup.com/index.php?title=Blend_table&amp;diff=4571&amp;oldid=prev"/>
				<updated>2008-03-19T23:22:05Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Example&lt;/span&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 23:22, 19 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 31:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 31:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    int bo_destgrayscale;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    int bo_destgrayscale;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    int map;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    int map;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;End&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;Process Main()&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;Begin&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;Begin&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sandman</name></author>	</entry>

	<entry>
		<id>http://fenixwiki.booleansoup.com/index.php?title=Blend_table&amp;diff=4304&amp;oldid=prev</id>
		<title>Sandman at 07:57, 18 January 2008</title>
		<link rel="alternate" type="text/html" href="http://fenixwiki.booleansoup.com/index.php?title=Blend_table&amp;diff=4304&amp;oldid=prev"/>
				<updated>2008-01-18T07:57:24Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 07:57, 18 January 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 1:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 1:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;[[Category:&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;blendop&lt;/del&gt;]]&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;[[Category:&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;blendops&lt;/ins&gt;]]&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;== Definition ==&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;== Definition ==&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sandman</name></author>	</entry>

	<entry>
		<id>http://fenixwiki.booleansoup.com/index.php?title=Blend_table&amp;diff=4285&amp;oldid=prev</id>
		<title>Sandman at 23:04, 17 January 2008</title>
		<link rel="alternate" type="text/html" href="http://fenixwiki.booleansoup.com/index.php?title=Blend_table&amp;diff=4285&amp;oldid=prev"/>
				<updated>2008-01-17T23:04:42Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 23:04, 17 January 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 1:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 1:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;[[Category:blendop]]&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;== Definition ==&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;== Definition ==&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;A blend table contains the blend data needed to perform the blend between the object (source) and where the object is drawn (destination). The table contains those two sections: source and destination; these section are added together when blending, which cannot be altered, but the sections themselves can be influenced by the [[Functioncategory:Blendops|blend operations]] available.&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;A blend table contains the blend data needed to perform the blend between the object (source) and where the object is drawn (destination). The table contains those two sections: source and destination; these section are added together when blending, which cannot be altered, but the sections themselves can be influenced by the [[Functioncategory:Blendops|blend operations]] available.&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sandman</name></author>	</entry>

	<entry>
		<id>http://fenixwiki.booleansoup.com/index.php?title=Blend_table&amp;diff=4281&amp;oldid=prev</id>
		<title>Sandman: New page: == Definition == A blend table contains the blend data needed to perform the blend between the object (source) and where the object is drawn (destination). The table contains those two sec...</title>
		<link rel="alternate" type="text/html" href="http://fenixwiki.booleansoup.com/index.php?title=Blend_table&amp;diff=4281&amp;oldid=prev"/>
				<updated>2008-01-17T22:55:23Z</updated>
		
		<summary type="html">&lt;p&gt;New page: == Definition == A blend table contains the blend data needed to perform the blend between the object (source) and where the object is drawn (destination). The table contains those two sec...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Definition ==&lt;br /&gt;
A blend table contains the blend data needed to perform the blend between the object (source) and where the object is drawn (destination). The table contains those two sections: source and destination; these section are added together when blending, which cannot be altered, but the sections themselves can be influenced by the [[Functioncategory:Blendops|blend operations]] available.&lt;br /&gt;
&lt;br /&gt;
One can even make homemade blending operations, if one has enough knowledge of the subject, as [[blendop_new]]() returns a pointer to the created blend table. This table is constructed like this:&lt;br /&gt;
{|&lt;br /&gt;
| ''bytes-start'' || - ''bytes-end'' || - ''total'' || - ''purpose''&lt;br /&gt;
|-&lt;br /&gt;
| 0 || - 65535 || - 65536 || - Source section&lt;br /&gt;
|-&lt;br /&gt;
| 65536 || - 131071 || - 65536 || - Destination section&lt;br /&gt;
|}&lt;br /&gt;
Each pixel of a section represents a colour. When a blend table is initialized, it's done like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for (i = 0 ; i &amp;lt; 65536 ; i++) source[i] = i ;&lt;br /&gt;
for (i = 0 ; i &amp;lt; 65536 ; i++) destination[i] = 0 ;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
So:&lt;br /&gt;
* For the source section the following applies: The ''n''th index has value ''n''.&lt;br /&gt;
* For the destination section the following applies: The ''n''th index has value 0.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Global&lt;br /&gt;
    int bo_tintred;&lt;br /&gt;
    int bo_tintredAndTranslucent;&lt;br /&gt;
    int bo_intense;&lt;br /&gt;
    int bo_destintense;&lt;br /&gt;
    int bo_grayscale;&lt;br /&gt;
    int bo_destgrayscale;&lt;br /&gt;
    int map;&lt;br /&gt;
Begin&lt;br /&gt;
&lt;br /&gt;
    // Set mode to 320x200x16&lt;br /&gt;
    set_mode(320,200,16);&lt;br /&gt;
&lt;br /&gt;
    // Init tables&lt;br /&gt;
    bo_tintred = blendop_new();&lt;br /&gt;
    bo_tintredAndTranslucent = blendop_new();&lt;br /&gt;
    bo_intense = blendop_new();&lt;br /&gt;
    bo_grayscale = blendop_new();&lt;br /&gt;
    bo_destintense = blendop_new();&lt;br /&gt;
    bo_destgrayscale = blendop_new();&lt;br /&gt;
&lt;br /&gt;
    // Red tint&lt;br /&gt;
    blendop_tint(bo_tintred,0.5,100,0,0);&lt;br /&gt;
&lt;br /&gt;
    // Red tint with translucency&lt;br /&gt;
    blendop_tint(bo_tintredAndTranslucent,0.5,250,0,0);&lt;br /&gt;
    blendop_translucency(bo_tintredAndTranslucent,0.5);&lt;br /&gt;
&lt;br /&gt;
    // Intense&lt;br /&gt;
    blendop_intensity(bo_intense,1.5);&lt;br /&gt;
&lt;br /&gt;
    // Display the destination intense&lt;br /&gt;
    blendop_intensity(bo_destintense,1.5);&lt;br /&gt;
    blendop_swap(bo_destintense);&lt;br /&gt;
&lt;br /&gt;
    // Grayscale&lt;br /&gt;
    blendop_grayscale(bo_grayscale,1);&lt;br /&gt;
&lt;br /&gt;
    // Display the destination in grayscale&lt;br /&gt;
    blendop_grayscale(bo_destgrayscale,3);&lt;br /&gt;
    blendop_swap(bo_destgrayscale);&lt;br /&gt;
&lt;br /&gt;
    // Make a new map&lt;br /&gt;
    map = some_map(80,80,16);&lt;br /&gt;
&lt;br /&gt;
    // Make the background rgb(50,150,150)&lt;br /&gt;
    map_clear(0,background,rgb(50,150,150));&lt;br /&gt;
&lt;br /&gt;
    // Show the four different blend operations&lt;br /&gt;
    a( 50, 50,map,0,&amp;quot;original&amp;quot;);&lt;br /&gt;
    a(150, 50,map,bo_tintred,&amp;quot;red&amp;quot;);&lt;br /&gt;
    a(250, 50,map,bo_tintredAndTranslucent,&amp;quot;red+transparent&amp;quot;);&lt;br /&gt;
    a( 50,150,map,bo_intense,&amp;quot;intense&amp;quot;);&lt;br /&gt;
    a(150,150,map,bo_destintense,&amp;quot;dest instense&amp;quot;);&lt;br /&gt;
    a(250,150,map,bo_grayscale,&amp;quot;grayscale&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    // Give this process one too&lt;br /&gt;
    blendop_assign(0,map,bo_destgrayscale);&lt;br /&gt;
    graph = map;&lt;br /&gt;
&lt;br /&gt;
    Repeat&lt;br /&gt;
        x = mouse.x;&lt;br /&gt;
        y = mouse.y;&lt;br /&gt;
        if(mouse.left)&lt;br /&gt;
            z = -1;&lt;br /&gt;
        else&lt;br /&gt;
            z = 1;&lt;br /&gt;
        end&lt;br /&gt;
        frame;&lt;br /&gt;
    Until(key(_ESC))&lt;br /&gt;
&lt;br /&gt;
OnExit&lt;br /&gt;
    let_me_alone();&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Description&lt;br /&gt;
 *   Create a new process at the given coordinates.&lt;br /&gt;
 *   Its graph will be cloned from the specified one and the&lt;br /&gt;
 *   specified blendtable will be assigned.&lt;br /&gt;
 *   The specified text will be put on the background below the graph.&lt;br /&gt;
 *&lt;br /&gt;
 * Parameters&lt;br /&gt;
 *   int x,y         - Coordinates the process will be at.&lt;br /&gt;
 *   int graph       - The graph to be cloned (file=0).&lt;br /&gt;
 *   int blendtable  - The blendtable to assign to the graph.&lt;br /&gt;
 *   int string text - The text to put on the map.&lt;br /&gt;
 *&lt;br /&gt;
 * Returns&lt;br /&gt;
 *   ProcessID&lt;br /&gt;
 */&lt;br /&gt;
Process a(int x,int y,int graph, int blendtable, string text)&lt;br /&gt;
Begin&lt;br /&gt;
    &lt;br /&gt;
    // Clone the map&lt;br /&gt;
    graph = map_clone(0,graph);&lt;br /&gt;
&lt;br /&gt;
    // Assign the blend table&lt;br /&gt;
    blendop_assign(0,graph,blendtable);&lt;br /&gt;
&lt;br /&gt;
    // Set z=0&lt;br /&gt;
    z = 0;&lt;br /&gt;
&lt;br /&gt;
    // Create text and put it on the background&lt;br /&gt;
    set_text_color(rgb(100,200,250));&lt;br /&gt;
    height=write_in_map(0,text,1);&lt;br /&gt;
    put(0,height,x,y+1+graphic_info(0,graph,G_HEIGHT)/2);&lt;br /&gt;
    unload_map(0,height);&lt;br /&gt;
&lt;br /&gt;
    // Loop&lt;br /&gt;
    Loop frame; End&lt;br /&gt;
&lt;br /&gt;
End&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Description&lt;br /&gt;
 *   Creates a map with the four corners coloured differently.&lt;br /&gt;
 *&lt;br /&gt;
 * Parameters&lt;br /&gt;
 *   int x,y,z       - The width, height and depth of the map to be created.&lt;br /&gt;
 *&lt;br /&gt;
 * Returns&lt;br /&gt;
 *   The graphID of the created map&lt;br /&gt;
 */&lt;br /&gt;
Function int some_map(int x, int y, int z)&lt;br /&gt;
Begin&lt;br /&gt;
    height = new_map(x,y,z);&lt;br /&gt;
    map_clear(0,height,rgb(50,100,150));&lt;br /&gt;
    drawing_map(0,height);&lt;br /&gt;
    drawing_color(rgb(200,50,100));&lt;br /&gt;
    draw_box(0,0,x/2,y/2);&lt;br /&gt;
    drawing_color(rgb(0,250,100));&lt;br /&gt;
    draw_box(x/2,0,x,y/2);&lt;br /&gt;
    drawing_color(rgb(150,50,250));&lt;br /&gt;
    draw_box(x/2,y/2,x,y);&lt;br /&gt;
    return height;&lt;br /&gt;
End&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Used in example: [[set_mode]](), [[blendop_new]](), [[blendop_tint]](), [[blendop_translucency]](), [[blendop_intensity]](), [[blendop_swap]](), [[blendop_grayscale]](), [[map_clear]](), [[blendop_assign]](), [[key]](), [[let_me_alone]](), [[map_clone]](), [[set_text_color]](), [[write_in_map]](), [[put]](), [[unload_map]](), [[new_map]](), [[drawing_map]](), [[drawing_color]](), [[draw_box]](), [[mouse]]&lt;br /&gt;
&lt;br /&gt;
This will result in something like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Blendops.PNG]]&lt;/div&gt;</summary>
		<author><name>Sandman</name></author>	</entry>

	</feed>