diff 06/ecl.xml @ 13:2925b0e246c6 default tip

Fix a lot of things, and add a TODO.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 17 Feb 2012 12:54:08 +0100
parents 79dfd9765a67
children
line wrap: on
line diff
--- a/06/ecl.xml
+++ b/06/ecl.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml-stylesheet type="text/xsl" href="../html.xsl"?>
 <?xml-stylesheet type="text/css" href="../style.css"?>
-<!DOCTYPE html>
 <opcodes xmlns="urn:opcodes:description">
 	<title>ECL Sub format</title>
 
@@ -50,13 +49,13 @@ else
 				<tr><td>-10014</td><td>int</td>		<td>difficulty</td>	<td>ro</td>	<td>Unused.</td></tr>
 				<tr><td>-10015</td><td>float</td>	<td>x</td>		<td>rw</td>	<td></td></tr>
 				<tr><td>-10016</td><td>float</td>	<td>y</td>		<td>rw</td>	<td></td></tr>
-				<tr><td>-10017</td><td>float</td>	<td>z</td>		<td>rw</td>	<td></td></tr>
+				<tr><td>-10017</td><td>float</td>	<td>z</td>		<td>rw</td>	<td>Actually used by Flandre. Warning!</td></tr>
 				<tr><td>-10018</td><td>float</td>	<td>player_x</td>	<td>ro</td>	<td></td></tr>
 				<tr><td>-10019</td><td>float</td>	<td>player_y</td>	<td>ro</td>	<td></td></tr>
 				<tr><td>-10020</td><td>float</td>	<td></td>		<td>ro</td>	<td>Unused.</td></tr>
-				<tr><td>-10021</td><td>float</td>	<td>enemy_player_angle</td> <td>ro</td>	<td></td></tr>
+				<tr><td>-10021</td><td>float</td>	<td>player_angle</td>	<td>ro</td>	<td></td></tr>
 				<tr><td>-10022</td><td>int</td>		<td>last_frame</td>	<td>rw</td>	<td></td></tr>
-				<tr><td>-10023</td><td>float</td>	<td>enemy_player_distance</td><td>ro</td><td>Unused.</td></tr>
+				<tr><td>-10023</td><td>float</td>	<td>player_distance</td><td>ro</td>	<td>Unused.</td></tr>
 				<tr><td>-10024</td><td>int</td>		<td>life</td>		<td>rw</td>	<td></td></tr>
 				<tr><td>-10025</td><td>int</td>		<td>player</td>		<td>ro</td>	<td>0 = ReimuA, 1 = ReimuB, 2 = MarisaA, 3 = MarisaB</td></tr>
 			</table>
@@ -337,7 +336,7 @@ else
 			<param type="S" name="new_frame" unit="frame" values="120"/>
 			<param type="S" name="relative_offset" unit="bytes" values="64"/>
 		</params>
-		<desc>Like <ref>2</ref> but only when the comparison register equals to 1. Used only one time in <stage>4</stage>.</desc>
+		<desc>Like <ref>2</ref> but only when the comparison register equals to 1.</desc>
 	</op>
 
 	<op>
@@ -445,7 +444,7 @@ else
 			<param type="f" name="min" unit="radian" values="0.7853982f"/>
 			<param type="f" name="max" unit="radian" values="2.3561945f"/>
 		</params>
-		<desc>Set the enemy angle in the [min, max-min) range. Used only five times, in <stage>2</stage>.</desc>
+		<desc>Set the enemy angle in the [min, max-min) range.</desc>
 	</op>
 
 	<op>
@@ -465,7 +464,7 @@ else
 			<param type="S" value="0">Ignored</param>
 			<param type="f" name="speed" unit="pixels/frame"/>
 		</params>
-		<desc>Sets the speed of the enemy, and change its direction to where the player is at that frame. Used only one time in <stage>2</stage>.</desc>
+		<desc>Sets the speed of the enemy, and change its direction to where the player is at that frame.</desc>
 	</op>
 
 	<op>
@@ -488,7 +487,7 @@ else
 			<param type="f" name="y" unit="pixels"/>
 			<param type="f" name="z" unit="pixels" values="0.0f">Ignored</param>
 		</params>
-		<desc>Move the enemy to the new position in `duration` amount of frames, using the <code>x↦x</code> function. Used only two times in <stage>7</stage>.</desc>
+		<desc>Move the enemy to the new position in `duration` amount of frames, using the <code>x↦x</code> function.</desc>
 	</op>
 
 	<op>
@@ -571,102 +570,42 @@ else
 	<op>
 		<num>68</num>
 		<name>set_bullet_attributes_to_the_right</name>
-		<params>
-			<param type="s"/>
-			<param type="s"/>
-			<param type="S"/>
-			<param type="S"/>
-			<param type="f"/>
-			<param type="f"/>
-			<param type="f"/>
-			<param type="f"/>
-			<param type="S"/>
-		</params>
+		<params ref="67"/>
 		<desc>The same as <ref>67</ref>, except the 0.0f launch angle is to the right of the enemy, instead of towards the player.</desc>
 	</op>
 
 	<op>
 		<num>69</num>
 		<name>set_bullet_attributes_towards_player_equally_distributed</name>
-		<params>
-			<param type="s"/>
-			<param type="s"/>
-			<param type="S"/>
-			<param type="S"/>
-			<param type="f"/>
-			<param type="f"/>
-			<param type="f"/>
-			<param type="f"/>
-			<param type="S"/>
-		</params>
+		<params ref="67"/>
 		<desc>Like <ref>67</ref>, except bullets of a shot are distributed equally all around the enemy, computing the angle by itself.</desc>
 	</op>
 
 	<op>
 		<num>70</num>
 		<name>set_bullet_attributes_to_the_right_equally_distributed</name>
-		<params>
-			<param type="s"/>
-			<param type="s"/>
-			<param type="S"/>
-			<param type="S"/>
-			<param type="f"/>
-			<param type="f"/>
-			<param type="f"/>
-			<param type="f"/>
-			<param type="S"/>
-		</params>
+		<params ref="67"/>
 		<desc>Like <ref>68</ref>, except bullets of a shot are distributed equally all around the enemy, computing the angle by itself.</desc>
 	</op>
 
 	<op>
 		<num>71</num>
 		<name>set_bullet_attributes_towards_player_equally_distributed_and_rotated</name>
-		<params>
-			<param type="s"/>
-			<param type="s"/>
-			<param type="S"/>
-			<param type="S"/>
-			<param type="f"/>
-			<param type="f"/>
-			<param type="f" values="0.0f"/>
-			<param type="f" values="0.0f"/>
-			<param type="S"/>
-		</params>
+		<params ref="67"/>
 		<desc>Like <ref>69</ref>, but with a rotation of pi/bullets_per_shot.</desc>
 	</op>
 
 	<op>
 		<num>74</num>
 		<name>set_bullet_attributes_towards_player_randomly_distributed</name>
-		<params>
-			<param type="s"/>
-			<param type="s"/>
-			<param type="S"/>
-			<param type="S"/>
-			<param type="f"/>
-			<param type="f"/>
-			<param type="f" values="0.0f"/>
-			<param type="f" values="0.0f"/>
-			<param type="S"/>
-		</params>
-		<desc>Used only one time, in <stage>3</stage>. Like <ref>70</ref> but with some alea (?) in the angle.</desc>
+		<params ref="67"/>
+		<desc>Like <ref>70</ref> but with some alea (?) in the angle.</desc>
 	</op>
 
 	<op>
 		<num>75</num>
 		<name>set_bullet_attributes_to_the_right_with_some_random_angle</name>
-		<params>
-			<param type="s"/>
-			<param type="s"/>
-			<param type="S"/>
-			<param type="S"/>
-			<param type="f"/>
-			<param type="f"/>
-			<param type="f"/>
-			<param type="f"/>
-			<param type="S"/>
-		</params>
+		<params ref="67"/>
 		<desc>Like <ref>68</ref>, but with some random angle.</desc>
 	</op>
 
@@ -752,7 +691,7 @@ else
 <dt>1024: <code><ref>82</ref>(int nb_bounces,,,, float speed,,,)</code></dt>
     <dd>Bullets “bounce”, reentering the screen as soon as they leave it, with a new speed set.</dd>
 <dt>2048:</dt>
-    <dd>Like 1024, except it only bounces when colliding with the left and right edges.</dd></dl></desc>
+    <dd>Like 1024, except it only bounces when colliding with the left, upper and right edges.</dd></dl></desc>
 	</op>
 
 	<op>
@@ -774,13 +713,13 @@ else
 		<num>85</num>
 		<name>laser</name>
 		<params>
-			<param type="s"/>
-			<param type="s"/>
-			<param type="f" name="angle" unit="radian">clockwise, from the +x axis</param>
+			<param type="s" name="laser_type" unit="script"/>
+			<param type="s" name="sprite_index_offset" unit="script"/>
+			<param type="f" name="angle" unit="radian">clockwise</param>
 			<param type="S" name="speed" unit="pixels/frame">speed of the laser along its axis</param>
 			<param type="f" name="start_offset" unit="pixels">offset along the laser axis, relative to the enemy. If negative, it is considered as 0.</param>
 			<param type="f" name="end_offset" unit="pixels">offset along the laser axis, relative to the enemy. Can be negative. In case end_offset &lt; start_offset, the laser will be in the oposite direction.</param>
-			<param type="f" name="length" unit="pixels">TODO: Not really a length, something really odd. The laser starts at max(start_offset, end_offset - length) and ends at end_offset.</param>
+			<param type="f" name="max_length" unit="pixels">TODO: Not really a length, something really odd. The laser starts at max(start_offset, end_offset - length) and ends at end_offset.</param>
 			<param type="f" name="width" unit="pixels"/>
 			<param type="S" name="start_duration" unit="frames"/>
 			<param type="S" name="duration" unit="frames"/>
@@ -795,22 +734,7 @@ else
 	<op>
 		<num>86</num>
 		<name>laser_towards_player</name>
-		<params>
-			<param type="s"/>
-			<param type="s"/>
-			<param type="f" name="angle" unit="radian">clockwise, from the enemy->player axis</param>
-			<param type="S" name="speed" unit="pixels/frame">speed of the laser along its axis</param>
-			<param type="f" name="start_offset" unit="pixels">offset along the laser axis, relative to the enemy. If negative, it is considered as 0.</param>
-			<param type="f" name="end_offset" unit="pixels">offset along the laser axis, relative to the enemy. Can be negative. In case end_offset &lt; start_offset, the laser will be in the oposite direction.</param>
-			<param type="f" name="length" unit="pixels">TODO: Not really a length, something really odd. The laser starts at max(start_offset, end_offset - length) and ends at end_offset.</param>
-			<param type="f" name="width" unit="pixels"/>
-			<param type="S" name="start_duration" unit="frames"/>
-			<param type="S" name="duration" unit="frames"/>
-			<param type="S" name="stop_duration" unit="frames"/>
-			<param type="S" name="grazing_dealy" unit="frames">how long to wait before allowing grazing</param>
-			<param type="S" name="grazing_extra_duration" unit="frames">how long to allow grazing after the laser started to disappear</param>
-			<param type="S" values="0"/>
-		</params>
+		<params ref="85"/>
 		<desc>Like <ref>85</ref>, with the default direction towards the player.</desc>
 	</op>
 
@@ -835,40 +759,56 @@ else
 
 	<op>
 		<num>90</num>
-		<name></name>
+		<name>translate_laser</name>
 		<params>
-			<param type="S" values="0 to 3"/>
-			<param type="S" values="0">Perhaps a float?</param>
-			<param type="S" values="0">Perhaps a float?</param>
-			<param type="S" values="0">Perhaps a float?</param>
+			<param type="S" values="0 to 3" name="laser" unit="laser_id"/>
+			<param type="f" values="0.0f" name="x" unit="pixels"/>
+			<param type="f" values="0.0f" name="y" unit="pixels"/>
+			<param type="f" values="0.0f" name="z" unit="pixels">Ignored</param>
 		</params>
-		<desc>Used only in <stage>7</stage>.</desc>
+		<desc>Translate a laser with the current position of the launching enemy as origin, but don’t follow her after that.</desc>
 	</op>
 
 	<op>
 		<num>92</num>
-		<name></name>
+		<name>cancel_laser</name>
 		<params>
-			<param type="S" values="0 to 3"/>
+			<param type="S" values="0 to 3" name="laser" unit="laser_id"/>
 		</params>
-		<desc>Used only in <stage>7</stage>.</desc>
+		<desc>Cancel a laser before its normal duration.</desc>
 	</op>
 
 	<op>
 		<num>93</num>
 		<name>set_spellcard</name>
 		<params>
-			<param type="s" value="0 to 3"/>
+			<param type="s" name="face" value="0 to 3">If greater than 3, it’s the character faces that are used.</param>
 			<param type="s" name="number">As in the captured spellcards screen, minus 1.</param>
 			<param type="z" name="name">In SHIFT_JIS</param>
 		</params>
-		<desc></desc>
+		<desc>
+			<p>Start a spellcard and</p>
+			<ul>
+				<li>Display the name of the spellcard in the screen.</li>
+				<li>Change the background to the eff one.</li>
+				<li>Make the enemies more resistant or the attacks weaker. The damage caused by a bullet is reduced to 6 instead of 48.</li>
+				<li>Clear all the bullets and transform them in star bonus.</li>
+			</ul>
+		</desc>
 	</op>
 
 	<op>
 		<num>94</num>
 		<name>end_spellcard</name>
-		<desc>Finish the current spellcard.</desc>
+		<desc>
+			<p>Finish the current spellcard and</p>
+			<ul>
+				<li>Remove its name.</li>
+				<li>Put back the normal background.</li>
+				<li>Return the damages to the normal.</li>
+				<li>Clear all the bullets and transform them in star bonus.</li>
+			</ul>
+		</desc>
 	</op>
 
 	<op>
@@ -881,8 +821,7 @@ else
 			<param type="f" name="z" unit="pixels" var="can" values="-10017.0f, -1.5707964f to 3.3379421f, 160.0f, 288.0f"/>
 			<param type="s" name="resistance" values="-5536, 2 to 2000"/>
 			<param type="s" name="drop_type" values="-2, 0, 1, 2"/>
-			<param type="s" name="unknown1" values="0, 10, 2000"/>
-			<param type="s" name="unknown2" values="0"/>
+			<param type="S" name="die_score" values="0, 10, 2000"/>
 		</params>
 		<desc>Spawns an enemy, see <a href="ecl.xhtml#enemy_sub">the main creation of an enemy</a>.</desc>
 	</op>
@@ -890,7 +829,7 @@ else
 	<op>
 		<num>96</num>
 		<name>kill_all_enemies</name>
-		<desc>Instantly kill all enemies presents in the screen, dropping their bonus as if they were killed by the player. Seems to not kill if the enemy is not touchable (see <ref>117</ref>).</desc>
+		<desc>Instantly kill all enemies presents in the screen, dropping their bonus as if they were killed by the player. Seems to not kill if the enemy is not touchable (see <ref>117</ref>) or a boss (see <ref>101</ref>).</desc>
 	</op>
 
 	<op>
@@ -918,12 +857,12 @@ else
 
 	<op>
 		<num>99</num>
-		<name></name>
+		<name>set_aux_anim</name>
 		<params>
-			<param type="S" values="0, 4"/>
-			<param type="S" values="16 to 18, 66"/>
+			<param type="S" name="number" values="0, 4"/>
+			<param type="S" name="animation" unit="script" values="16 to 18, 66"/>
 		</params>
-		<desc></desc>
+		<desc>Add an auxiliary animation (up to 8) with always the same coordinates as the enemy.</desc>
 	</op>
 
 	<op>
@@ -939,9 +878,9 @@ else
 		<num>101</num>
 		<name>set_boss_mode</name>
 		<params>
-			<param type="S" values="-1, 0">Unknown meaning, seems to be 0 for mid-boss and -1 for real boss.</param>
+			<param type="S" name="x" values="-1, 0">0 is activate, -1 is deactivate.</param>
 		</params>
-		<desc>Activates the boss mode, with her life bar and lives number displayed on the top. Doesn't do anything before calling <ref>126</ref>.</desc>
+		<desc>Activates the boss mode, with her life bar and lives number displayed on the top. Doesn't do anything before calling <ref>126</ref> (TODO: really?). If there are multiple boss, spawned by a <ref>95</ref>, only the last one has her life displayed, but standard enemies are blocked only until any of them is killed.</desc>
 	</op>
 
 	<op>
@@ -1005,7 +944,14 @@ else
 		<params>
 			<param type="S"/>
 		</params>
-		<desc>Control what to do when life falls to zero. 0 = normal, 1 = don't clean the sprite, 2 = don't die, 4 (unused) = don't die and don't drop bonus. These are flags that can be combined.</desc>
+		<desc>
+			<p>Control what to do when life falls to zero, only in the [0, 7] interval:</p>
+			<p>0 = normal;<br/>
+			1 = die once and unset touchable/collidable;<br/>
+			2 = die in loop (drop an item each time, start a new die animation), but keep being here, touchable/collidable;<br/>
+			3 = die once and keep being touchable/collidable if killed by the normal attack, else die as in normal (with a bomb, a collision, a <ref>96</ref>…), even after dying once from a normal attack;<br/>
+			4-7 (unused) = die in loop, with lot of sparks, but don't drop bonus.</p>
+		</desc>
 	</op>
 
 	<op>
@@ -1014,7 +960,7 @@ else
 		<params>
 			<param type="S" name="function" unit="sub"/>
 		</params>
-		<desc>Specify the subroutine to call when the enemy is killed.</desc>
+		<desc>Specify the subroutine to call when the enemy is killed. Only if the death flag is not null.</desc>
 	</op>
 
 	<op>
@@ -1140,16 +1086,19 @@ memory[offset] = value;</pre>
 				<tr><th>Function</th><th>Description</th></tr>
 				<tr><td>0</td><td>Freeze all the bullets in the screen if the parameter is 0, else unfreeze them. Do an explosion animation too.</td></tr>
 				<tr><td>1</td><td>Launch a bullet immediately, with a launch_offset of [-param, param] for each coordinate.</td></tr>
-				<tr><td>3</td><td>Do nothing?</td></tr>
+				<tr><td>3</td><td>Change the -10002, -10003 and -10004 variables according to the character. [0, 3, 1] for ReimuA, [2, 3, 4] for ReimuB, [1, 4, 0] for MarisaA and [4, 2, 3] for MarisaB. Used to choose the dual-sign spellcards of Patchouli. The parameter is unused.</td></tr>
 				<tr><td>4</td><td>If 0, unfreeze time and do an explosion animation. If 1, freeze time for the player, the bullets, the texts, but let the ECL run normally, also do an explosion animation. Else do nothing.</td></tr>
 				<tr><td>7</td><td>If 0, make a lasers web, and remove any previous. Else, a crapload of bullets directed towards the player (TODO: find their origin).</td></tr>
 				<tr><td>8</td><td>Do nothing?</td></tr>
 				<tr><td>9</td><td>Do an explosion animation.</td></tr>
 				<tr><td>11</td><td>Do an explosion animation.</td></tr>
 				<tr><td>12</td><td>Do nothing?</td></tr>
-				<tr><td>13</td><td>Launch `param` bullets in circle towards the player with the launch point being the center of the screen.</td></tr>
+				<tr><td>13</td><td>Fire `param` times the configured attack in circle, as if the enemy was at the center of the screen with:<ul>
+					<li>-10006 that overrides the launch_angle set in 67-75;</li>
+					<li>-10007 the rotation of the launch points with the center of the screen as origin;</li>
+					<li>-10008 the distance between the center of the screen and the launch points.</li></ul>Seems to be launched only each 6 frames, even if the call is each frame.</td></tr>
 				<tr><td>14</td><td>Do nothing?</td></tr>
-				<tr><td>16</td><td>Do nothing?</td></tr>
+				<tr><td>16</td><td>Used in QED: Ripples of 495 Years and probably do a temporization and modify launch_offset.</td></tr>
 			</table>
 		</desc>
 	</op>
@@ -1167,9 +1116,9 @@ memory[offset] = value;</pre>
 				<tr><td>-1</td><td>Stop</td></tr>
 				<tr><td>2</td><td>Do nothing?</td></tr>
 				<tr><td>5</td><td>Sakuya’s knives, each 12 frames.</td></tr>
-				<tr><td>6</td><td>Some graphic animation.</td></tr>
+				<tr><td>6</td><td>Add a wings flapping animation. Used by the Scarlet sisters.</td></tr>
 				<tr><td>10</td><td>Some graphic animation.</td></tr>
-				<tr><td>15</td><td>Some graphic animation.</td></tr>
+				<tr><td>15</td><td>The bullets 6, 7, 8 and 9 push the 1, 2, 3, 4 and 5 bullets. Also do some graphic animation.</td></tr>
 			</table>
 		</desc>
 	</op>
@@ -1187,7 +1136,7 @@ memory[offset] = value;</pre>
 		<num>124</num>
 		<name>drop_specific_bonus</name>
 		<params>
-			<param type="S" name="type">0 = power, 1 = point, 2 = big power, 3 = bomb, 4 = full power, 5 = 1up, 6 = star bonus, greater drop nothing.</param>
+			<param type="S" name="type" var="no">0 = power, 1 = point, 2 = big power, 3 = bomb, 4 = full power, 5 = 1up, 6 = star bonus, greater drop nothing.</param>
 		</params>
 		<desc>Drop a bonus vertically. Can be called multiple times to drop more items, but they'll be superposed.</desc>
 	</op>
@@ -1218,11 +1167,11 @@ memory[offset] = value;</pre>
 
 	<op>
 		<num>128</num>
-		<name>set_smooth_disappear</name>
+		<name>interrupt_anm</name>
 		<params>
-			<param type="S" values="1">Bitfield</param>
+			<param type="S" name="interruption" values="1"/>
 		</params>
-		<desc>If <code>x &amp; 1</code>, make the enemy sprite diseappear in a fade out now, not abruptly at <ref>1</ref>. TODO: check the duration.</desc>
+		<desc>Send this interruption to the anm.</desc>
 	</op>
 
 	<op>
@@ -1246,25 +1195,27 @@ memory[offset] = value;</pre>
 
 	<op>
 		<num>131</num>
-		<name></name>
+		<name>set_difficulty_influence</name>
 		<params>
-			<param type="f" values="-1.0f, -0.5f, -0.3f, 0.0f"/>
-			<param type="f" values="0.0f, 0.3f, 0.8f, 1.0f"/>
-			<param type="S" values="-3, -2, -1, 0"/>
-			<param type="S" values="0, 2, 4, 5, 6"/>
-			<param type="S" values="0"/>
-			<param type="S" values="0"/>
+			<param type="f" name="speed_low" values="-1.0f, -0.5f, -0.3f, 0.0f"/>
+			<param type="f" name="speed_high" values="0.0f, 0.3f, 0.8f, 1.0f"/>
+			<param type="S" name="delay_low" values="-3, -2, -1, 0"/>
+			<param type="S" name="delay_high" values="0, 2, 4, 5, 6"/>
+			<param type="S" name="shots_low" values="0"/>
+			<param type="S" name="shots_high" values="0"/>
 		</params>
-		<desc></desc>
+		<desc>Change the influence of the difficulty on the attacks. The defaults are (-0.5f, 0.5f, 0, 0, 0, 0).</desc>
 	</op>
 
 	<op>
 		<num>132</num>
-		<name>set_visible</name>
+		<name>set_invisible</name>
 		<params>
 			<param type="S" values="0, 1">Bitfield</param>
 		</params>
-		<desc>If <code>x &amp; 1</code>, disable drawing of the sprite <strong>and</strong> destroy it. While it isn’t set to 0, loading a new sprite won’t make it reappear.</desc>
+		<desc><div xmlns="http://www.w3.org/1999/xhtml">
+			If <code>x &amp; 1</code>, disable drawing of the sprite <strong>and</strong> destroy it. While it isn’t set to 0, loading a new sprite won’t make it reappear.
+		</div></desc>
 	</op>
 
 	<op>
@@ -1281,10 +1232,10 @@ memory[offset] = value;</pre>
 
 	<op>
 		<num>135</num>
-		<name></name>
+		<name>enable_spellcard_bonus</name>
 		<params>
 			<param type="S" values="0, 1">Bitfield</param>
 		</params>
-		<desc></desc>
+		<desc>If <code>x &amp; 1</code>, FIXME. Enabled is the default.</desc>
 	</op>
 </opcodes>