# HG changeset patch # User Emmanuel Gil Peyrot # Date 1317721504 -7200 # Node ID 79dfd9765a67911fdafc6e94f60ebadc786e76c6 # Parent 9f0e37b7eeaba04b422492ae1818ea774cab64e3 I *really* should commit more often. diff --git a/06/anm.xml b/06/anm.xml --- a/06/anm.xml +++ b/06/anm.xml @@ -58,7 +58,7 @@ 7 - set_mirror + toggle_mirror Performs a scale of -1 on the x axis. @@ -195,9 +195,11 @@ 26 + set_automatic_angle - + Bitfield + If x & 1, rotate on z by pi - angle. diff --git a/06/ecl.xhtml b/06/ecl.xhtml --- a/06/ecl.xhtml +++ b/06/ecl.xhtml @@ -49,7 +49,7 @@ typedef struct { } thecl_main_instr_t; -

Most present instruction, that pops an enemy.

+

Most present instruction, that pops an enemy.

 typedef struct {
     uint16_t time;
diff --git a/06/ecl.xml b/06/ecl.xml
--- a/06/ecl.xml
+++ b/06/ecl.xml
@@ -143,91 +143,91 @@ else
 
 	
 		9
-		
+		set_random_float2
 		
-			
-			
-			
+			
+			
+			
 		
-		
+		Assign a float in the [minimum, minimum+amplitude) range to the variable.
 	
 
 	
 		10
-		
+		store_x
 		
-			
+			
 		
-		Used only one time, in 2.
+		Store the x value of the enemy in the specified variable. Equivalent to 4(variable, -10015).
 	
 
 	
 		13
-		
+		add_int
 		
-			
-			
-			
+			
+			
+			
 		
-		
+		variable = a + b;
 	
 
 	
 		14
-		
+		substract_int
 		
-			
-			
-			
+			
+			
+			
 		
-		
+		variable = a - b;
 	
 
 	
 		15
-		
+		multiply_int
 		
-			
-			
-			
+			
+			
+			
 		
-		
+		variable = a * b;
 	
 
 	
 		16
-		
+		divide_int
 		
-			
-			
-			
+			
+			
+			
 		
-		
+		variable = a / b;
 	
 
 	
 		17
-		
+		modulo
 		
-			
-			
-			
+			
+			
+			
 		
-		
+		variable = a % b;
 	
 
 	
 		18
-		
+		increment
 		
-			
+			
 		
-		
+		Increment the given integer variable of 1.
 	
 
 	
 		20
-		add
+		add_float
 		
 			
 			
@@ -238,7 +238,7 @@ else
 
 	
 		21
-		
+		substract_float
 		
 			
 			
@@ -249,35 +249,35 @@ else
 
 	
 		23
-		
+		divide_float
 		
-			
-			
-			
+			
+			
+			
 		
-		
+		variable = a / b;
 	
 
 	
 		25
-		
+		get_direction
 		
-			
-			
-			
-			
-			
+			
+			
+			
+			
+			
 		
-		
+		Compute the direction between two points. If the first is at the left of the second put 0.0f in the variable, if it is above put pi/2, etc.
 	
 
 	
 		26
-		
+		float_to_unit_circle
 		
-			
+			
 		
-		
+		Takes a float and transforms it to be in the [-pi, pi] interval.
3.1415928 -> pi; 3.1415929 -> -pi.
@@ -292,32 +292,32 @@ else 28 - + compare_floats - - + + - + Like 27, but with floats. 29 - + relative_jump_if_lower_than - - + + - + Like 2 but only when the comparison register equals to -1. 30 - + relative_jump_if_lower_or_equal - - + + - + Like 2 but only when the comparison register is different of 1. @@ -327,37 +327,37 @@ else Starting from the start of the current opcode.
- Jump if the "comparison register" equals to 0, that is, if the compared values are equal. + Like 2 but only when the comparison register equals to 0.
32 - + relative_jump_if_greater_than - - + + - Used only one time in 4 + Like 2 but only when the comparison register equals to 1. Used only one time in 4. 33 - + relative_jump_if_greater_or_equal - - + + - + Like 2 but only when the comparison register is different of -1. 34 - + relative_jump_if_not_equal - - + + - + Like 2 but only when the comparison register is different of 0. @@ -374,7 +374,7 @@ else 36 return - Almost always called at the end of the function. See stage3 for two times where it is called before 1. + When the sub is called by a 35 or a 39, returns to the calling sub. If it was called from the main, crash. @@ -383,7 +383,7 @@ else - + @@ -392,11 +392,11 @@ else 43 - set_position + set_pos - - - Ignored + + + Ignored Move the enemy to a new position, used for interpolation. @@ -440,22 +440,22 @@ else 49 - set_random_? + set_random_angle - The new angle? - Some deplacement? + + - Used only five times, in 2. Seems to involve some randomness. + Set the enemy angle in the [min, max-min) range. Used only five times, in 2. 50 - + set_random_angle_ex - + Like 49, but enclosed in boxes. TODO: document that. @@ -470,49 +470,49 @@ else 52 - + move_in_decel - - - + + + - + Like 45, but move the enemy in `duration` frames, using an decelerating interpolation function. TODO: find that function. 56 - - - - - - - - Used only two times in 7 - - - - 57 - move_to + move_to_linear Ignored - Move the enemy to the new position in this amount of frames. TODO: find the exact interpolation method + Move the enemy to the new position in `duration` amount of frames, using the x↦x function. Used only two times in 7. + + + + 57 + move_to_decel + + + + + Ignored + + Like 56, but with x↦2x-x². 59 - move_to2 + move_to_accel - Move the enemy to the new position in this amount of frames. TODO: how it is different from move_to? + Like 56, but with x↦x². @@ -553,16 +553,16 @@ else 67 - set_bullet_attributes + set_bullet_attributes_towards_player - - - + + + - + speed + (speed2 - speed) * salve / nb_salve - + >= 64, freezed Modify the attributes of the next enemy attack. Directs it to the player. @@ -570,7 +570,7 @@ else 68 - + set_bullet_attributes_to_the_right @@ -582,12 +582,12 @@ else - The same as 67, except the shot is directed to the right of the enemy. + The same as 67, except the 0.0f launch angle is to the right of the enemy, instead of towards the player. 69 - + set_bullet_attributes_towards_player_equally_distributed @@ -599,12 +599,12 @@ else - No visible difference from 67. + Like 67, except bullets of a shot are distributed equally all around the enemy, computing the angle by itself. 70 - + set_bullet_attributes_to_the_right_equally_distributed @@ -616,12 +616,12 @@ else - No visible difference from 68. + Like 68, except bullets of a shot are distributed equally all around the enemy, computing the angle by itself. 71 - + set_bullet_attributes_towards_player_equally_distributed_and_rotated @@ -629,16 +629,16 @@ else - - + + - + Like 69, but with a rotation of pi/bullets_per_shot. 74 - + set_bullet_attributes_towards_player_randomly_distributed @@ -646,16 +646,16 @@ else - - + + - Used only one time, in 3. + Used only one time, in 3. Like 70 but with some alea (?) in the angle. 75 - + set_bullet_attributes_to_the_right_with_some_random_angle @@ -667,25 +667,25 @@ else - Seems like 68, but with some differences in speed. + Like 68, but with some random angle. 76 - + bullet_interval - + - + Time between two shots, 0 is infinite. 77 - bullet_interval + bullet_interval_random - + - Time between two shots. + Like 76, but with a random delay of [0, interval) frames at the start. @@ -697,47 +697,75 @@ else 79 no_delay_attack - + Instantly start to attack. 81 bullet_launch_offset - - - Ignored + + + Ignored Change the offset of the launch of bullets. 82 - + set_extended_bullet_attributes - - - - - - - - + + + Unused + Unused + + + Unused + Unused - + Heavily linked to 67-75 last parameter, the flags:
+
1:
+
TODO: changes the bullet's speed in a strange way
+ +
2:
+
TODO: Whatever 2 does, it is in the same group as, and takes precedence over 4 and 8
+
4:
+
TODO: Whatever 4 does, it is in the same group as, and takes precedence over 8
+
8:
+
TODO
+ +
16: 82(int duration,,,, float length, float angle,,)
+
for `duration` frames, add (cos(angle) * length, sin(angle) * length) to the speed vector at each frame?
+
32: 82(int duration, int count,,, float acceleration, float angular_speed,,)
+
for `duration` frames, add acceleration to speed, and angular_speed to angle at each frame. Do that count times.
+
64: 82(int nb_frames, int count,,, float angle, float speed,,)
+
stop the bullet in nb_frames, then add angle to its angle, and sets its speed to speed. Do that count times.
+
128: 82(int nb_frames, int count,,, float angle, float speed,,)
+
stop the bullet in nb_frames, then directs the bullet towards the player, add angle to its angle, and sets its speed to speed. Do that count times.
+
256: 82(int nb_frames, int count,,, float angle, float speed,,)
+
stop the bullet in nb_frames, then sets the bullet's angle and speed to angle and speed. Do that count times.
+ +
512:
+
TODO: doesn't seem to change anything?
+ +
1024: 82(int nb_bounces,,,, float speed,,,)
+
Bullets “bounce”, reentering the screen as soon as they leave it, with a new speed set.
+
2048:
+
Like 1024, except it only bounces when colliding with the left and right edges.
83 - - No-op? Doesn't seem to change anything. + change_bullets_in_star_bonus + Isn’t called for every boss, there should be another way to do that. 84 - + @@ -761,7 +789,7 @@ else how long to allow grazing after the laser started to disappear
- + Spawn a laser and set its attributes.
@@ -783,7 +811,7 @@ else how long to allow grazing after the laser started to disappear - + Like 85, with the default direction towards the player. @@ -810,27 +838,27 @@ else - - - + Perhaps a float? + Perhaps a float? + Perhaps a float? - Used only one time, in 7. + Used only in 7. 92 - + - + Used only in 7. 93 set_spellcard - + As in the captured spellcards screen, minus 1. In SHIFT_JIS @@ -839,36 +867,37 @@ else 94 - - + end_spellcard + Finish the current spellcard. 95 - + spawn_enemy - - - - - - - + + + + + + + + - + Spawns an enemy, see the main creation of an enemy. 96 - - + kill_all_enemies + 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 117). 97 set_enemy_anim - + Set a sprite (taken from current anm) for the enemy. @@ -877,11 +906,12 @@ else 98 set_boss_anims - - - - - Perhaps two int16_t instead. + + + + + + Give a set of animations for a boss deplacements. @@ -890,8 +920,8 @@ else 99 - - + + @@ -900,7 +930,7 @@ else 100 set_death_anim - In fact, any 256n+[0-2] works and is the same; other values make the program crash. + In fact, any 256n+[0-2] works and is the same; other values make the program crash. When the enemy is destroyed, the animation used. @@ -916,15 +946,15 @@ else 102 - + create_squares - - - - + + + + - Create the "squares" running around Rumia ??? + Create the squares turning around some boss. They stay even after the destruction of the enemy. @@ -940,18 +970,18 @@ else 104 - + set_collidable - + Bitfield - noop? + if x & 1, the enemy can collide with the player, else it cannot. 105 - set_vulnerable + set_damageable - + Bitfield if x & 1, the enemy can take damage, else it cannot. @@ -960,7 +990,11 @@ else 106 play_sound - + + 0 = crash, + 1 = crash, + /11 + Play a sound. @@ -985,12 +1019,20 @@ else 109 - + memory_write_int32 - - + + - + +
int32_t memory *= enemy->data;
+memory[offset] = value;
+

Eight variables (indexes 0 to 7) seems to be available, the following data is enemy state, with:
+ 9: x, 10: y, 11: z, 12: hitbox width, 13: hitbox height, 14: hitbox depth, ...
+ TODO: see 0x00409532

+ +

This is used to set a sub to call once the MSG has finished.

+
@@ -999,16 +1041,16 @@ else - equivalent to 4(-10024, life). + Equivalent to 4(-10024, life). 112 - + set_elapsed_time - + - + Equivalent to 4(-10022, time). @@ -1022,7 +1064,7 @@ else 114 - set_boss_callback + set_boss_life_callback @@ -1035,37 +1077,36 @@ else - Sets the timeout of the current boss attack. + Set the timeout of the current boss attack. 116 - + set_timeout_callback - + - Doesn't seem to do anything. Tried to remove it, use 0, 1, 127, 1023, 1024, 4096 as an argument, nothing... ??? + Like 114, but when timeouted. 117 - + set_touchable - + Bitfield - + If 0, the player's attacks don't do anything to the enemy. RumiaA's homing attack is no more attracted by that enemy. 96 won’t kill it. 1 restores the usual comportment. 118 - + quot_explosion_quot - - - - + + + - TODO: "explosion" (dying boss). + "Explosion" (dying boss), Meiling’s moves, and various graphical effects like that. @@ -1074,53 +1115,81 @@ else - Drop a certain number of bonus at the frame it is called. If the power is not max, drop power items, else drop point items. + Drop a certain number of bonus at the frame it is called, in a square around the enemy (TODO: check its dimensions). If the power is not max, drop power items, else drop point items. 120 - + set_automatic_rotate - + Bitfield - + if x & 1, rotate the sprite according to the angle of the enemy. 121 - + call_special_function_with_param - - + + - + +

Call an hardcoded function in this list:

+ + + + + + + + + + + + + + +
FunctionDescription
0Freeze all the bullets in the screen if the parameter is 0, else unfreeze them. Do an explosion animation too.
1Launch a bullet immediately, with a launch_offset of [-param, param] for each coordinate.
3Do nothing?
4If 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.
7If 0, make a lasers web, and remove any previous. Else, a crapload of bullets directed towards the player (TODO: find their origin).
8Do nothing?
9Do an explosion animation.
11Do an explosion animation.
12Do nothing?
13Launch `param` bullets in circle towards the player with the launch point being the center of the screen.
14Do nothing?
16Do nothing?
+
122 - + call_special_function_without_param - + - + +

Call an hardcoded function in this list:

+ + + + + + + + +
FunctionDescription
-1Stop
2Do nothing?
5Sakuya’s knives, each 12 frames.
6Some graphic animation.
10Some graphic animation.
15Some graphic animation.
+
123 - + skip_frames - + - + Skip a certain amount of frames, while keeping the current instruction pointer in place. 124 - + drop_specific_bonus - + 0 = power, 1 = point, 2 = big power, 3 = bomb, 4 = full power, 5 = 1up, 6 = star bonus, greater drop nothing. - + Drop a bonus vertically. Can be called multiple times to drop more items, but they'll be superposed. @@ -1142,26 +1211,26 @@ else 127 - + 128 - + set_smooth_disappear - + Bitfield - + If x & 1, make the enemy sprite diseappear in a fade out now, not abruptly at 1. TODO: check the duration. 129 - - + Bitfield? + Bitfield? @@ -1170,7 +1239,7 @@ else 130 - + Bitfield?
@@ -1179,42 +1248,42 @@ else 131 - - - - - - + + + + + + 132 - + set_visible - + Bitfield - + If x & 1, disable drawing of the sprite and destroy it. While it isn’t set to 0, loading a new sprite won’t make it reappear. 133 - + Do not influence on the game itself. TODO: what is its utility? 134 - + Do not influence on the game itself. TODO: what is its utility? 135 - + Bitfield diff --git a/html.xsl b/html.xsl --- a/html.xsl +++ b/html.xsl @@ -98,7 +98,7 @@ - + @@ -113,21 +113,25 @@ - -

-
+

+
+
- -
-
+
+
+
- -
-
+
+ + + - -
  • -
    +
    +
  • + + + + stage