<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://sadocs.unreliable.network/index.php?action=history&amp;feed=atom&amp;title=Ninja_Lights</id>
	<title>Ninja Lights - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://sadocs.unreliable.network/index.php?action=history&amp;feed=atom&amp;title=Ninja_Lights"/>
	<link rel="alternate" type="text/html" href="https://sadocs.unreliable.network/index.php?title=Ninja_Lights&amp;action=history"/>
	<updated>2026-04-30T17:36:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://sadocs.unreliable.network/index.php?title=Ninja_Lights&amp;diff=691&amp;oldid=prev</id>
		<title>PkR at 03:10, 1 March 2026</title>
		<link rel="alternate" type="text/html" href="https://sadocs.unreliable.network/index.php?title=Ninja_Lights&amp;diff=691&amp;oldid=prev"/>
		<updated>2026-03-01T03:10:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:10, 1 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l51&quot;&gt;Line 51:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 51:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;njCalcVector( NULL, &amp;amp;light, &amp;amp;lwork );&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;njCalcVector( NULL, &amp;amp;light, &amp;amp;lwork );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;njSetEasyLight( lwork.x, lwork.y, lworkz );&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;njSetEasyLight( lwork.x, lwork.y, lworkz );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;After this, the Easy light source will be at &amp;lt;code&amp;gt;LIGHT3D_X,&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;&lt;/del&gt;LIGHT3D_Y, LIGHT3D_Z&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;After this, the Easy light source will be at &amp;lt;code&amp;gt;LIGHT3D_X, LIGHT3D_Y, LIGHT3D_Z&amp;lt;/code&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The SADX functions are a rough match since SADX changed draw functions for a lot of objects, and all that is left is some wrapper functions that call a more generic draw function:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The SADX functions are a rough match since SADX changed draw functions for a lot of objects, and all that is left is some wrapper functions that call a more generic draw function:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>PkR</name></author>
	</entry>
	<entry>
		<id>https://sadocs.unreliable.network/index.php?title=Ninja_Lights&amp;diff=690&amp;oldid=prev</id>
		<title>PkR at 03:09, 1 March 2026</title>
		<link rel="alternate" type="text/html" href="https://sadocs.unreliable.network/index.php?title=Ninja_Lights&amp;diff=690&amp;oldid=prev"/>
		<updated>2026-03-01T03:09:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:09, 1 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l46&quot;&gt;Line 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&amp;lt;code&amp;gt;njEasyDrawObject&amp;lt;/code&amp;gt; (0040A100), &amp;lt;code&amp;gt;njEasyDrawModel&amp;lt;/code&amp;gt; (004084F0), &amp;lt;code&amp;gt;njEasyDrawMotion&amp;lt;/code&amp;gt; (00406FA0), &amp;lt;code&amp;gt;njEasyDrawShapeMotion&amp;lt;/code&amp;gt; (00406FE0)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&amp;lt;code&amp;gt;njEasyDrawObject&amp;lt;/code&amp;gt; (0040A100), &amp;lt;code&amp;gt;njEasyDrawModel&amp;lt;/code&amp;gt; (004084F0), &amp;lt;code&amp;gt;njEasyDrawMotion&amp;lt;/code&amp;gt; (00406FA0), &amp;lt;code&amp;gt;njEasyDrawShapeMotion&amp;lt;/code&amp;gt; (00406FE0)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|Uses one &amp;quot;easy&amp;quot; light (not &amp;lt;code&amp;gt;NJS_LIGHT&amp;lt;/code&amp;gt;).  Specular is not supported. From the SDK: The light vector uses the screen space coordinate system. E.g. if set up like &amp;lt;code&amp;gt;njSetEasyLight( 0.0f, 0.0f, 1.0f );&amp;lt;/code&amp;gt;, the light source will always be in front of the screen. To set the light source in 3D space, they must be converted with the current matrix:&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|Uses one &amp;quot;easy&amp;quot; light (not &amp;lt;code&amp;gt;NJS_LIGHT&amp;lt;/code&amp;gt;).  Specular is not supported. From the SDK: The light vector uses the screen space coordinate system. E.g. if set up like &amp;lt;code&amp;gt;njSetEasyLight( 0.0f, 0.0f, 1.0f );&amp;lt;/code&amp;gt;, the light source will always be in front of the screen. To set the light source in 3D space, they must be converted with the current matrix:&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;light.x = LIGHT3D_X; light.y = LIGHT3D_Y;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;light.x = LIGHT3D_X;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;light.z = LIGHT3D_Z; njCalcVector( NULL, &amp;amp;light, &amp;amp;lwork );&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;light.y = LIGHT3D_Y;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;light.z = LIGHT3D_Z;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;njCalcVector( NULL, &amp;amp;light, &amp;amp;lwork );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;njSetEasyLight( lwork.x, lwork.y, lworkz );&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;njSetEasyLight( lwork.x, lwork.y, lworkz );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;After this, the Easy light source will be at &amp;lt;code&amp;gt;LIGHT3D_X,&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;LIGHT3D_Y, LIGHT3D_Z&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;After this, the Easy light source will be at &amp;lt;code&amp;gt;LIGHT3D_X,&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;LIGHT3D_Y, LIGHT3D_Z&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>PkR</name></author>
	</entry>
	<entry>
		<id>https://sadocs.unreliable.network/index.php?title=Ninja_Lights&amp;diff=689&amp;oldid=prev</id>
		<title>PkR at 03:08, 1 March 2026</title>
		<link rel="alternate" type="text/html" href="https://sadocs.unreliable.network/index.php?title=Ninja_Lights&amp;diff=689&amp;oldid=prev"/>
		<updated>2026-03-01T03:08:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:08, 1 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Ninja Lights in Sonic Adventure ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Ninja Lights in Sonic Adventure ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Note: Ninja Lights are not implemented in the Lantern Engine mod, so the information below is irrelevant to the PC version.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Note: Ninja Lights are not implemented in the Lantern Engine mod, so the information below is irrelevant to the PC version.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sonic Adventure (Dreamcast) uses two lighting systems: the palette-based [[Sonic Adventure/Lantern Engine|LANTERN system]] and the Ninja Lights. The game&amp;#039;s model rendering functions have &amp;quot;Lantern&amp;quot; and &amp;quot;Ninja&amp;quot; variants, and depending on the function used the game can either draw the model with palette lighting or use Ninja Lights.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sonic Adventure (Dreamcast) uses two lighting systems: the palette-based [[Sonic Adventure/Lantern Engine|LANTERN system]] and the Ninja Lights. The game&amp;#039;s model rendering functions have &amp;quot;Lantern&amp;quot; and &amp;quot;Ninja&amp;quot; variants, and depending on the function used the game can either draw the model with palette lighting or use Ninja Lights.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>PkR</name></author>
	</entry>
	<entry>
		<id>https://sadocs.unreliable.network/index.php?title=Ninja_Lights&amp;diff=687&amp;oldid=prev</id>
		<title>PkR at 03:06, 1 March 2026</title>
		<link rel="alternate" type="text/html" href="https://sadocs.unreliable.network/index.php?title=Ninja_Lights&amp;diff=687&amp;oldid=prev"/>
		<updated>2026-03-01T03:06:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 03:06, 1 March 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Ninja Lights in Sonic Adventure ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Ninja Lights in Sonic Adventure ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Note: Ninja Lights are not implemented in the Lantern Engine mod, so the information below is irrelevant to the PC version.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Note: Ninja Lights are not implemented in the Lantern Engine mod, so the information below is irrelevant to the PC version.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sonic Adventure (Dreamcast) uses two lighting systems: the palette-based [[Lantern Engine|LANTERN system]] and the Ninja Lights. The game&#039;s model rendering functions have &quot;Lantern&quot; and &quot;Ninja&quot; variants, and depending on the function used the game can either draw the model with palette lighting or use Ninja Lights.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sonic Adventure (Dreamcast) uses two lighting systems: the palette-based [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Sonic Adventure/&lt;/ins&gt;Lantern Engine|LANTERN system]] and the Ninja Lights. The game&#039;s model rendering functions have &quot;Lantern&quot; and &quot;Ninja&quot; variants, and depending on the function used the game can either draw the model with palette lighting or use Ninja Lights.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The SL file contains data for setting up the Ninja lights. This information consists of: light color (three floats for R/G/B), diffuse multiplier, specular power and ambient multiplier. Both diffuse and specular components are the same color. The “ignore specular” material flag disables the specular component per mesh.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The SL file contains data for setting up the Ninja lights. This information consists of: light color (three floats for R/G/B), diffuse multiplier, specular power and ambient multiplier. Both diffuse and specular components are the same color. The “ignore specular” material flag disables the specular component per mesh.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>PkR</name></author>
	</entry>
	<entry>
		<id>https://sadocs.unreliable.network/index.php?title=Ninja_Lights&amp;diff=684&amp;oldid=prev</id>
		<title>PkR: Created page with &quot;&quot;Ninja Lights&quot; refers to the lighting used by the Ninja library of the Katana SDK.  == Ninja Lights in Sonic Adventure == &#039;&#039;&#039;Note: Ninja Lights are not implemented in the Lantern Engine mod, so the information below is irrelevant to the PC version.&#039;&#039;&#039; Sonic Adventure (Dreamcast) uses two lighting systems: the palette-based LANTERN system and the Ninja Lights. The game&#039;s model rendering functions have &quot;Lantern&quot; and &quot;Ninja&quot; variants, and depending on...&quot;</title>
		<link rel="alternate" type="text/html" href="https://sadocs.unreliable.network/index.php?title=Ninja_Lights&amp;diff=684&amp;oldid=prev"/>
		<updated>2026-03-01T03:03:52Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;quot;Ninja Lights&amp;quot; refers to the lighting used by the Ninja library of the &lt;a href=&quot;/wiki/Katana_SDK&quot; title=&quot;Katana SDK&quot;&gt;Katana SDK&lt;/a&gt;.  == Ninja Lights in Sonic Adventure == &amp;#039;&amp;#039;&amp;#039;Note: Ninja Lights are not implemented in the Lantern Engine mod, so the information below is irrelevant to the PC version.&amp;#039;&amp;#039;&amp;#039; Sonic Adventure (Dreamcast) uses two lighting systems: the palette-based &lt;a href=&quot;/index.php?title=Lantern_Engine&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Lantern Engine (page does not exist)&quot;&gt;LANTERN system&lt;/a&gt; and the Ninja Lights. The game&amp;#039;s model rendering functions have &amp;quot;Lantern&amp;quot; and &amp;quot;Ninja&amp;quot; variants, and depending on...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;quot;Ninja Lights&amp;quot; refers to the lighting used by the Ninja library of the [[Katana SDK]].&lt;br /&gt;
&lt;br /&gt;
== Ninja Lights in Sonic Adventure ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note: Ninja Lights are not implemented in the Lantern Engine mod, so the information below is irrelevant to the PC version.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Sonic Adventure (Dreamcast) uses two lighting systems: the palette-based [[Lantern Engine|LANTERN system]] and the Ninja Lights. The game&amp;#039;s model rendering functions have &amp;quot;Lantern&amp;quot; and &amp;quot;Ninja&amp;quot; variants, and depending on the function used the game can either draw the model with palette lighting or use Ninja Lights.&lt;br /&gt;
&lt;br /&gt;
The SL file contains data for setting up the Ninja lights. This information consists of: light color (three floats for R/G/B), diffuse multiplier, specular power and ambient multiplier. Both diffuse and specular components are the same color. The “ignore specular” material flag disables the specular component per mesh.&lt;br /&gt;
&lt;br /&gt;
=== Types of Ninja Lights Setup ===&lt;br /&gt;
There are three types of lights used for non-palettized models in the game:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Lighting Setup&lt;br /&gt;
!Description&lt;br /&gt;
!Used by&lt;br /&gt;
|-&lt;br /&gt;
|Two Ninja Lights&lt;br /&gt;
|Non-palettized lighting that uses two Ninja Lights. These lights use &amp;lt;code&amp;gt;NJS_LIGHT&amp;lt;/code&amp;gt; structures described in the Katana SDK. One is set up using the parameters in the SL file (let’s call it the &amp;lt;code&amp;gt;ENV&amp;lt;/code&amp;gt; Light), and the other is set up in code, usually in level binaries (let’s call it the &amp;lt;code&amp;gt;DIR&amp;lt;/code&amp;gt; light). The &amp;lt;code&amp;gt;ENV&amp;lt;/code&amp;gt; light has one configurable color that is shared for diffuse and specular, the &amp;lt;code&amp;gt;DIR&amp;lt;/code&amp;gt; light can have different diffuse and specular color (though the game doesn’t seem to use that). It can also have a different light direction.&lt;br /&gt;
|Common switch, Hint monitor, OEggKanban (glowing Eggman logo in Final Egg, tube parts only), Chaos puddle in some cutscenes, Aoki Switch (top)&lt;br /&gt;
|-&lt;br /&gt;
|Simple Ninja Light&lt;br /&gt;
|Non-palettized lighting that uses one Ninja Light using the parameters from the SL file except the color, which is always white.&lt;br /&gt;
|Rock bits in Red Mountain, non-Jewel Chao, Master Emerald pieces, Froggy in Gamma’s Emerald Coast&lt;br /&gt;
|-&lt;br /&gt;
|Easy Light&lt;br /&gt;
|Non-palettized lighting that sets up the Easy Light (not &amp;lt;code&amp;gt;NJS_LIGHT&amp;lt;/code&amp;gt;) using the parameters from the SL file. The Easy light is described in the Katana SDK. It doesn’t support specular lighting.&lt;br /&gt;
|Snowboard, OSandSwitch (Sand Hill switch), shadow blob, Chambr (chambers with opening doors in Sky Deck), debug objects, Aoki Switch (bottom), E101’s missiles, Hedgehog Hammer targets&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Rendering Functions and their SADX Counterparts ===&lt;br /&gt;
In SA1, most models were rendered with palette lighting using the game&amp;#039;s custom function, but some models were rendered by calling Ninja drawing functions directly, which made them use the Ninja lights system. There are three light setups depending on the specific variation of the Ninja draw function:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Light setup&lt;br /&gt;
!Functions in SADX (PC, 2004)&lt;br /&gt;
!Comment&lt;br /&gt;
|-&lt;br /&gt;
|Regular&lt;br /&gt;
|&amp;lt;code&amp;gt;njDrawModel&amp;lt;/code&amp;gt; (0077EF70)&lt;br /&gt;
|Allows to use multiple &amp;lt;code&amp;gt;NJS_LIGHT&amp;lt;/code&amp;gt;s of various types (directional, point, spot). Specular is supported.&lt;br /&gt;
|-&lt;br /&gt;
|Simple&lt;br /&gt;
|&amp;lt;code&amp;gt;___SAnjSimpleDrawModel&amp;lt;/code&amp;gt; (00408520), &amp;lt;code&amp;gt;__SAnjSimpleDrawObject&amp;lt;/code&amp;gt; (0040A130)&lt;br /&gt;
|Only the first registered &amp;lt;code&amp;gt;NJS_LIGHT&amp;lt;/code&amp;gt; can be used. It is set up as a directional light, and intensity and color settings cannot be adjusted. Specular is supported.&lt;br /&gt;
|-&lt;br /&gt;
|Easy&lt;br /&gt;
|&amp;lt;code&amp;gt;njEasyDrawObject&amp;lt;/code&amp;gt; (0040A100), &amp;lt;code&amp;gt;njEasyDrawModel&amp;lt;/code&amp;gt; (004084F0), &amp;lt;code&amp;gt;njEasyDrawMotion&amp;lt;/code&amp;gt; (00406FA0), &amp;lt;code&amp;gt;njEasyDrawShapeMotion&amp;lt;/code&amp;gt; (00406FE0)&lt;br /&gt;
|Uses one &amp;quot;easy&amp;quot; light (not &amp;lt;code&amp;gt;NJS_LIGHT&amp;lt;/code&amp;gt;).  Specular is not supported. From the SDK: The light vector uses the screen space coordinate system. E.g. if set up like &amp;lt;code&amp;gt;njSetEasyLight( 0.0f, 0.0f, 1.0f );&amp;lt;/code&amp;gt;, the light source will always be in front of the screen. To set the light source in 3D space, they must be converted with the current matrix:&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
light.x = LIGHT3D_X; light.y = LIGHT3D_Y;&lt;br /&gt;
light.z = LIGHT3D_Z; njCalcVector( NULL, &amp;amp;light, &amp;amp;lwork );&lt;br /&gt;
njSetEasyLight( lwork.x, lwork.y, lworkz );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After this, the Easy light source will be at &amp;lt;code&amp;gt;LIGHT3D_X,&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;LIGHT3D_Y, LIGHT3D_Z&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
The SADX functions are a rough match since SADX changed draw functions for a lot of objects, and all that is left is some wrapper functions that call a more generic draw function:&lt;br /&gt;
&lt;br /&gt;
# The Regular functions are difficult to tell from the paletted functions, so the above table is an approximation.&lt;br /&gt;
# The Easy functions are mostly still there.&lt;br /&gt;
# The Simple functions only have two stubs which aren&amp;#039;t called by anything other than the Chao Name Machine, which doesn&amp;#039;t match SA1.&lt;br /&gt;
&lt;br /&gt;
=== Lighting Data ===&lt;br /&gt;
The data sources for the lights are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Light&lt;br /&gt;
!Type&lt;br /&gt;
!Direction&lt;br /&gt;
!Color&lt;br /&gt;
!Diffuse, specular, ambient intensity&lt;br /&gt;
|-&lt;br /&gt;
|Regular - light 1&lt;br /&gt;
|Directional&lt;br /&gt;
|&amp;lt;code&amp;gt;(0, -1, 0)&amp;lt;/code&amp;gt; rotated using &amp;lt;code&amp;gt;RY&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RZ&amp;lt;/code&amp;gt; values from the SL file&lt;br /&gt;
|From the SL file&lt;br /&gt;
|From the SL file&lt;br /&gt;
|-&lt;br /&gt;
|Regular - light 2&lt;br /&gt;
|Directional&lt;br /&gt;
|&amp;lt;code&amp;gt;njSetLightDirection&amp;lt;/code&amp;gt; called in the skybox display function&lt;br /&gt;
|&amp;lt;code&amp;gt;njSetLightColor&amp;lt;/code&amp;gt; called in the skybox display function&lt;br /&gt;
|&amp;lt;code&amp;gt;njSetLightIntensity&amp;lt;/code&amp;gt; called in the skybox display function&lt;br /&gt;
|-&lt;br /&gt;
|Simple&lt;br /&gt;
|Directional&lt;br /&gt;
|&amp;lt;code&amp;gt;(0, -1, 0)&amp;lt;/code&amp;gt; rotated using &amp;lt;code&amp;gt;RY&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RZ&amp;lt;/code&amp;gt; values from the SL file&lt;br /&gt;
|White (in SA1 anyway)&lt;br /&gt;
|From the SL file&lt;br /&gt;
|-&lt;br /&gt;
|Easy&lt;br /&gt;
|Directional&lt;br /&gt;
|&amp;lt;code&amp;gt;(0, -1, 0)&amp;lt;/code&amp;gt; rotated using &amp;lt;code&amp;gt;RY&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;RZ&amp;lt;/code&amp;gt; values from the SL file&lt;br /&gt;
|From the SL file&lt;br /&gt;
|From the SL file, no specular&lt;br /&gt;
|}&lt;br /&gt;
In addition to these lights, there can be custom lights set up by objects&amp;#039; code, which will affect all objects rendered with Regular functions. These custom lights can be directional, spot or point, with or without specular. The custom lights are created with the function &amp;lt;code&amp;gt;le_CreateLight&amp;lt;/code&amp;gt; (0040A510 in SADX) and deleted with the function &amp;lt;code&amp;gt;le_DeleteLight&amp;lt;/code&amp;gt; (0040A550 in SADX).&lt;br /&gt;
&lt;br /&gt;
In the Dreamcast version, these functions use pointers to actual &amp;lt;code&amp;gt;NJS_LIGHT&amp;lt;/code&amp;gt;s. In SADX, the Ninja Lights system appears to have been replaced by a system using the structure &amp;lt;code&amp;gt;LE_LIGHT_ENV&amp;lt;/code&amp;gt; (what is also known as &amp;quot;Stage lights&amp;quot;). Instead of specific pointers, there is now an array of four &amp;quot;current stage lights&amp;quot; called &amp;lt;code&amp;gt;le_env&amp;lt;/code&amp;gt; at 03ABD9F8. It also has a corresponding array of four Ninja light flags &amp;lt;code&amp;gt;le_env_typ&amp;lt;/code&amp;gt; at 03ABDBB8. So instead of &amp;lt;code&amp;gt;NJS_LIGHT&amp;lt;/code&amp;gt; pointers, the light create/delete functions manipulate data in these arrays in SADX.&lt;br /&gt;
&lt;br /&gt;
Interestingly enough, the data for the light &amp;quot;Regular- light 2&amp;quot; is completely the same in SADX. It&amp;#039;s still set up by the skybox display functions which call &amp;lt;code&amp;gt;njSetLightColor&amp;lt;/code&amp;gt; etc. with the same arguments as the Dreamcast version, so basically we don&amp;#039;t need the data from this post. However, now that these functions are redirected to modify the first entry in the &amp;lt;code&amp;gt;le_env&amp;lt;/code&amp;gt; array, this data is overwritten every time a stage loads. That is happening because the function &amp;lt;code&amp;gt;le_set_env&amp;lt;/code&amp;gt; (0040A95) copies over all light data from the SADX stage lights array (00900E88), which happens every time a light type is set and whenever a new level loads.&lt;br /&gt;
&lt;br /&gt;
The following behavior of Ninja Lights is different from palette lighting:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;NJD_FLAG_IGNORE_SPECULAR&amp;lt;/code&amp;gt; disables specular lighting &amp;#039;&amp;#039;completely&amp;#039;&amp;#039; (per material).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;NJD_FLAG_USE_FLAT&amp;lt;/code&amp;gt; enables flat shading (used by Master Emerald pieces).&lt;br /&gt;
&lt;br /&gt;
=== &amp;#039;&amp;#039;&amp;#039;Custom&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;Lights&amp;#039;&amp;#039;&amp;#039; ===&lt;br /&gt;
There&amp;#039;s a leftover function in SADX that creates custom lights associated with specific objects: &amp;lt;code&amp;gt;asSetLight&amp;lt;/code&amp;gt; at 0040ADC0. It uses a &amp;lt;code&amp;gt;taskwk&amp;lt;/code&amp;gt; pointer, an &amp;lt;code&amp;gt;NJS_LIGHT&amp;lt;/code&amp;gt; pointer and a pointer to a structure called &amp;lt;code&amp;gt;LightInfo&amp;lt;/code&amp;gt;:&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
struct LightInfo &lt;br /&gt;
{&lt;br /&gt;
int lsrc; // Ninja light flags &lt;br /&gt;
float spc; &lt;br /&gt;
float dif; &lt;br /&gt;
float amb; &lt;br /&gt;
NJS_ARGB argb; &lt;br /&gt;
NJS_POINT3 pos; // Light position (for spot and point lights) &lt;br /&gt;
NJS_POINT3 vec; // Light direction &lt;br /&gt;
float nrang; // Distance at which light source attenuation begins &lt;br /&gt;
float frang; // Distance to cut the effect of the light source (range) &lt;br /&gt;
int iang; // The angle at which the specular or spotlight is at maximum intensity &lt;br /&gt;
int oang; // The angle at which the specular or spotlight effect ceases &lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The following Ninja light flags can be used. The ones in bold are used in SA1, and the ones crossed out are unlikely to have been used in SA1.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Flags&lt;br /&gt;
!Flag name&lt;br /&gt;
!Light type&lt;br /&gt;
!Ambient&lt;br /&gt;
!Diffuse&lt;br /&gt;
!Specular&lt;br /&gt;
|-&lt;br /&gt;
|0x01&lt;br /&gt;
|NJD_AMBIENT&lt;br /&gt;
|Ambient&lt;br /&gt;
|〇&lt;br /&gt;
|×&lt;br /&gt;
|×&lt;br /&gt;
|-&lt;br /&gt;
|0x02&lt;br /&gt;
|NJD_DIR_LIGHT&lt;br /&gt;
|Directional&lt;br /&gt;
|×&lt;br /&gt;
|〇&lt;br /&gt;
|×&lt;br /&gt;
|-&lt;br /&gt;
|0x03&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;NJD_LAMBERT_DIR&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|Directional&lt;br /&gt;
|〇&lt;br /&gt;
|〇&lt;br /&gt;
|×&lt;br /&gt;
|-&lt;br /&gt;
|0x04&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;NJD_POINT_LIGHT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|Point&lt;br /&gt;
|×&lt;br /&gt;
|〇&lt;br /&gt;
|×&lt;br /&gt;
|-&lt;br /&gt;
|0x05&lt;br /&gt;
|NJD_LAMBERT_POINT&lt;br /&gt;
|Point&lt;br /&gt;
|〇&lt;br /&gt;
|〇&lt;br /&gt;
|×&lt;br /&gt;
|-&lt;br /&gt;
|0x08&lt;br /&gt;
|NJD_SPOT_LIGHT&lt;br /&gt;
|Spot&lt;br /&gt;
|×&lt;br /&gt;
|〇&lt;br /&gt;
|×&lt;br /&gt;
|-&lt;br /&gt;
|0x10&lt;br /&gt;
|NJD_SPEC_DIR&lt;br /&gt;
|Directional&lt;br /&gt;
|×&lt;br /&gt;
|〇&lt;br /&gt;
|〇&lt;br /&gt;
|-&lt;br /&gt;
|0x13&lt;br /&gt;
|NJD_PHONG_DIR&lt;br /&gt;
|Directional&lt;br /&gt;
|〇&lt;br /&gt;
|〇&lt;br /&gt;
|〇&lt;br /&gt;
|-&lt;br /&gt;
|0x20&lt;br /&gt;
|NJD_SPEC_POINT&lt;br /&gt;
|Point&lt;br /&gt;
|×&lt;br /&gt;
|〇&lt;br /&gt;
|〇&lt;br /&gt;
|-&lt;br /&gt;
|0x25&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;NJD_PHONG_POINT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|Point&lt;br /&gt;
|〇&lt;br /&gt;
|〇&lt;br /&gt;
|〇&lt;br /&gt;
|-&lt;br /&gt;
|0x40&lt;br /&gt;
|&amp;lt;del&amp;gt;NJD_USER_LIGHT&amp;lt;/del&amp;gt;&lt;br /&gt;
|Call a custom callback function&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|0x80&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;NJD_SIMPLE_LIGHT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|Simplified lighting calculations (NOT the &amp;quot;Simple light&amp;quot; described earlier)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|0xC0&lt;br /&gt;
|&amp;lt;del&amp;gt;NJD_BLOCK_LIGHT&amp;lt;/del&amp;gt;&lt;br /&gt;
|Simplified lighting calculations&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
The following custom lights have some leftover code and data in SADX. These also exist in SA1 but they aren&amp;#039;t visible normally because the models that were supposed to be lit by them are rendered with palette lighting.&lt;br /&gt;
&lt;br /&gt;
# Ice Cap background light: &amp;lt;code&amp;gt;NJD_PHONG_POINT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LightInfo&amp;lt;/code&amp;gt; structure at 00C67FA0. Uses angles.&lt;br /&gt;
# &amp;quot;Chaos underlight&amp;quot;: &amp;lt;code&amp;gt;NJD_POINT_LIGHT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;NJS_LIGHT&amp;lt;/code&amp;gt; structure at 03D0D5B8. The light is initialized using the function &amp;lt;code&amp;gt;ChaosUnderLightInit&amp;lt;/code&amp;gt; (007AD250) that has a &amp;quot;radius&amp;quot; argument which goes unused in SADX but in SA1 it should be the light range. In Chaos&amp;#039; main functions, the light&amp;#039;s matrix is transformed to match Chaos&amp;#039; position.&lt;br /&gt;
# Some light in Knuckles&amp;#039; story cutscene: &amp;lt;code&amp;gt;NJD_SIMPLE_LIGHT | NJD_LAMBERT_DIR&amp;lt;/code&amp;gt;, function at 006868F0.&lt;br /&gt;
# Lights in Gamma&amp;#039;s briefing cutscene: &amp;lt;code&amp;gt;NJD_SIMPLE_LIGHT | NJD_LAMBERT_DIR&amp;lt;/code&amp;gt;, function at 006F4570. The light is a leftover, but this effect was adapted to palette lighting, and palette-related functions are called here too.&lt;br /&gt;
&lt;br /&gt;
=== &amp;#039;&amp;#039;&amp;#039;Specular&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;Lighting&amp;#039;&amp;#039;&amp;#039; ===&lt;br /&gt;
The Specular calculation formula for the Ninja Lights is currently unknown for Basic models. For Chunk models (which SA1 DC doesn&amp;#039;t use), the formula was reversed by &amp;#039;&amp;#039;Exant&amp;#039;&amp;#039; for Simple and Easy lights:&lt;br /&gt;
[[File:Ninja Lights 1772333955721.png|none]]&lt;/div&gt;</summary>
		<author><name>PkR</name></author>
	</entry>
</feed>