From f21269f373f406c68b48ffe55539692c849447a3 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Sat, 15 Feb 2020 21:13:31 +0100 Subject: [PATCH] [Reverse-engineering] [th04/th05] Bullet template structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Turns out that angles are more clearly expressed in hex after all. And if we use negative values for everything greater than 80h, we still remove those from the PI calculation. *Really* not sure about using that delta union in the TH04 one though. Might be saner to just hide the complexity of the technically two separate types after all… Let's see. Part of P0075, funded by Myles and -Tom-. --- th04/bullet/bullet.hpp | 28 + th04/bullet/pattypes.h | 7 + th04/bullet/template[bss].asm | 29 + th04_main.asm | 3026 ++++++++++++++++----------------- th05_main.asm | 2036 +++++++++++----------- 5 files changed, 2530 insertions(+), 2596 deletions(-) diff --git a/th04/bullet/bullet.hpp b/th04/bullet/bullet.hpp index 06db4051..5f66807a 100644 --- a/th04/bullet/bullet.hpp +++ b/th04/bullet/bullet.hpp @@ -114,3 +114,31 @@ int pascal near bullet_patnum_for_angle(unsigned char angle); extern bullet_t bullets[BULLET_COUNT]; #define pellets (&bullets[0]) #define bullets16 (&bullets[PELLET_COUNT]) + +struct bullet_template_t { + uint8_t spawn_type; + unsigned char patnum; // TH05: 0 = pellet + SPPoint origin; +#if GAME == 5 + bullet_pattern_t pattern; + bullet_special_motion_t special_motion; + unsigned char spread; + unsigned char spread_angle_delta; + unsigned char stack; + SubpixelLength8 stack_speed_delta; + unsigned char angle; + SubpixelLength8 speed; +#else + SPPoint velocity; + bullet_pattern_t pattern; + unsigned char angle; + SubpixelLength8 speed; + unsigned char count; + bullet_template_delta_t delta; + uint8_t unused_1; + bullet_special_motion_t special_motion; + uint8_t unused_2; +#endif +}; + +extern bullet_template_t bullet_template; diff --git a/th04/bullet/pattypes.h b/th04/bullet/pattypes.h index 1da9a272..b21b5997 100644 --- a/th04/bullet/pattypes.h +++ b/th04/bullet/pattypes.h @@ -1,5 +1,12 @@ #pragma option -b- +typedef union { + unsigned char spread_angle; + // In subpixels, obviously, but pre-C++11 doesn't let us use any of the + // Subpixel classes with their custom assignment operators in a union... + unsigned char stack_speed; +} bullet_template_delta_t; + // All _AIMED patterns define the 0° [angle] as the current player position, // relative to the bullet origin. typedef enum { diff --git a/th04/bullet/template[bss].asm b/th04/bullet/template[bss].asm index 2e7cee28..80c7f465 100644 --- a/th04/bullet/template[bss].asm +++ b/th04/bullet/template[bss].asm @@ -1,5 +1,34 @@ +if GAME eq 4 + bullet_template_delta_t union + spread_angle db ? + stack_speed db ? + bullet_template_delta_t ends +endif + bullet_template_t struc + spawn_type db ? + patnum db ? + BT_origin Point +if GAME eq 5 pattern db ? + BT_special_motion db ? + spread db ? + spread_angle_delta db ? + BT_stack db ? + stack_speed_delta db ? + BT_angle db ? + speed db ? +else + BT_velocity Point + pattern db ? + BT_angle db ? + speed db ? + count db ? + BT_delta bullet_template_delta_t + db ? + BT_special_motion db ? + db ? +endif bullet_template_t ends public _bullet_template diff --git a/th04_main.asm b/th04_main.asm index 15034fa0..e9af1ad9 100644 --- a/th04_main.asm +++ b/th04_main.asm @@ -12135,13 +12135,13 @@ loc_11CE9: mov _boss_damage_this_frame, 0 cmp byte_25A1B, 2 jnz loc_11D86 - mov ax, word_25A0C + mov ax, point_25A0C.x sar ax, 4 - add ax, 0FFF0h + add ax, (-1 shl 4) mov si, ax - mov ax, word_25A0E + mov ax, point_25A0C.y sar ax, 4 - add ax, 0FFE0h + add ax, (-2 shl 4) mov di, ax cmp byte_25A1E, 0 jz short loc_11D22 @@ -14736,12 +14736,10 @@ arg_0 = word ptr 4 push ds pop es assume es:_DATA - mov si, 53A2h + mov si, offset _bullet_template mov di, [bp+arg_0] add di, 14h - -loc_13AAC: - mov cx, 9 ; jumptable 0001F539 case 65360 + mov cx, size _bullet_template / 2 rep movsw pop di pop si @@ -14770,9 +14768,9 @@ loc_13AC3: mov byte ptr [si], 1 push si call sub_13A9C - mov ax, word ptr dword_2A8C6 + mov ax, point_2A8C6.x mov [si+2], ax - mov ax, word ptr dword_2A8C6+2 + mov ax, point_2A8C6.y mov [si+4], ax mov ax, word_2A8CE mov [si+0Eh], ax @@ -14830,9 +14828,9 @@ loc_13B2C: jnz short loc_13B7D mov byte ptr [si], 1 mov byte ptr [si+14h], 0 - mov ax, word ptr dword_2A8C6 + mov ax, point_2A8C6.x mov [si+2], ax - mov ax, word ptr dword_2A8C6+2 + mov ax, point_2A8C6.y mov [si+4], ax mov ax, word_2A8CE mov [si+0Eh], ax @@ -14925,10 +14923,10 @@ arg_0 = word ptr 4 push di push ds pop es - mov di, 53A2h + mov di, offset _bullet_template mov si, [bp+arg_0] add si, 14h - mov cx, 9 + mov cx, size _bullet_template / 2 rep movsw pop di pop si @@ -14978,9 +14976,9 @@ loc_13BE9: push si call sub_13BB3 mov ax, [si+2] - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, [si+4] - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax call fp_2D000 loc_13C25: @@ -15196,18 +15194,18 @@ loc_13FCC: idiv bx or dx, dx jnz short loc_14014 - mov byte_266E2, 2 - mov byte_266E3, 4Ch ; 'L' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE mov al, byte_25594 - mov byte_266ED, al - mov byte_266EE, 20h ; ' ' + mov _bullet_template.BT_angle, al + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_SINGLE - mov byte_266F2, 0FFh + mov _bullet_template.BT_special_motion, 0FFh call fp_2D004 call fp_2D002 mov al, 80h sub al, byte_25594 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D002 mov al, byte_25594 add al, 0Ch @@ -15415,12 +15413,12 @@ loc_1422D: mov word ptr dword_257DE+2, ax call sub_105B9 mov si, ax - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 mov ax, _midboss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _midboss_pos.cur.y add ax, (-1 shl 4) - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax call sub_13FB2 or si, si jz short loc_142E4 @@ -15478,12 +15476,12 @@ sub_142F1 proc near push ax call iatan2 mov _midboss_angle, al - mov byte_266E2, 2 - mov byte_266E3, 39h ; '9' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE mov _bullet_template.pattern, BP_RING - mov byte_266EF, 20h ; ' ' - mov byte_266EE, 28h ; '(' - mov byte_266ED, 0 + mov _bullet_template.count, 32 + mov _bullet_template.speed, (2 shl 4) + 8 + mov _bullet_template.BT_angle, 0 call fp_2D004 call fp_2D000 @@ -15495,11 +15493,11 @@ loc_14339: or dx, dx jnz short loc_1436F mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 2 - mov byte_266F0, 0Ch - mov byte_266EE, 34h ; '4' + mov _bullet_template.count, 2 + mov _bullet_template.BT_delta.spread_angle, 0Ch + mov _bullet_template.speed, (3 shl 4) + 4 mov al, _midboss_angle - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D004 call fp_2D000 call snd_se_play pascal, 3 @@ -15527,13 +15525,13 @@ sub_14383 proc near jl short loc_143C5 mov byte_25598, 0FFh mov _midboss_phase_frame, 0 - mov byte_266E2, 5 - mov byte_266E3, 39h ; '9' + mov _bullet_template.spawn_type, 5 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE mov _bullet_template.pattern, BP_RING - mov byte_266EF, 20h ; ' ' - mov byte_266EE, 28h ; '(' + mov _bullet_template.count, 32 + mov _bullet_template.speed, (2 shl 4) + 8 call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D004 call sub_1CFA2 call snd_se_play pascal, 9 @@ -15563,11 +15561,11 @@ loc_143D6: or dx, dx jnz short loc_14411 mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 2 - mov byte_266F0, 12h - mov byte_266EE, 2Eh ; '.' + mov _bullet_template.count, 2 + mov _bullet_template.BT_delta.spread_angle, 12h + mov _bullet_template.speed, (2 shl 4) + 14 mov al, _midboss_angle - mov byte_266ED, al + mov _bullet_template.BT_angle, al add al, -8 mov _midboss_angle, al call fp_2D004 @@ -15605,13 +15603,13 @@ loc_14435: idiv bx or dx, dx jnz short loc_14477 - mov byte_266E2, 2 - mov byte_266E3, 4Ch ; 'L' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE mov _bullet_template.pattern, BP_RING - mov byte_266EE, 20h ; ' ' + mov _bullet_template.speed, (2 shl 4) mov al, _midboss_angle - mov byte_266ED, al - mov byte_266EF, 18h + mov _bullet_template.BT_angle, al + mov _bullet_template.count, 24 call fp_2D004 call sub_1CFA2 call snd_se_play pascal, 9 @@ -15677,12 +15675,12 @@ loc_144F1: push offset _midboss_pos call _motion_update_2 inc _midboss_phase_frame - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 mov ax, _midboss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _midboss_pos.cur.y add ax, (-16 shl 4) - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov al, byte_25598 mov ah, 0 mov [bp+var_4], ax @@ -15725,9 +15723,9 @@ loc_14552: cmp byte_2559A, 0Bh ; jumptable 00014536 case 255 ja short loc_145A5 mov ax, _midboss_pos.cur.x - mov word ptr dword_2A8C6, ax + mov point_2A8C6.x, ax mov ax, _midboss_pos.cur.y - mov word ptr dword_2A8C6+2, ax + mov point_2A8C6.y, ax mov ax, _midboss_phase_frame add ax, -64 push ax @@ -15940,10 +15938,10 @@ sub_1476F proc near cmp _stage_frame_mod16, 0 jnz short loc_14796 mov _bullet_template.pattern, BP_RING - mov byte_266EF, 20h ; ' ' + mov _bullet_template.count, 32 call randring2_next16 - mov byte_266ED, al - mov byte_266EE, 30h ; '0' + mov _bullet_template.BT_angle, al + mov _bullet_template.speed, (3 shl 4) call fp_2D004 call fp_2D000 @@ -15962,18 +15960,18 @@ sub_14798 proc near mov bp, sp cmp _stage_frame_mod16, 0 jnz short loc_147D9 - mov byte_266E2, 5 - mov byte_266E3, 39h ; '9' + mov _bullet_template.spawn_type, 5 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE mov _bullet_template.pattern, BP_RING - mov byte_266EF, 20h ; ' ' + mov _bullet_template.count, 32 call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al mov ax, _midboss_phase_frame mov bx, 4 cwd idiv bx - add al, 0Ah - mov byte_266EE, al + add al, 10 + mov _bullet_template.speed, al call fp_2D004 call fp_2D000 call snd_se_play pascal, 3 @@ -15993,17 +15991,16 @@ sub_147DB proc near mov bp, sp cmp _stage_frame_mod16, 0 jnz short loc_14826 - mov byte_266E2, 2 - mov byte_266F2, 87h + mov _bullet_template.spawn_type, 2 + mov _bullet_template.BT_special_motion, 87h mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 5 - mov byte_266F0, 0Ch - mov byte_266E3, 3Bh ; ';' - mov byte_266EE, 20h ; ' ' - push 0Fh - call randring2_next16_and - add al, 0B8h - mov byte_266ED, al + mov _bullet_template.count, 5 + mov _bullet_template.BT_delta.spread_angle, 0Ch + mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_YELLOW + mov _bullet_template.speed, (2 shl 4) + call randring2_next16_and pascal, 0Fh + add al, -048h + mov _bullet_template.BT_angle, al call fp_2D004 mov byte_2CFF7, 2 call fp_2D002 @@ -16025,17 +16022,17 @@ sub_14828 proc near cmp _stage_frame_mod16, 0 jnz short loc_1486C mov _bullet_template.pattern, BP_RING - mov byte_266EF, 20h ; ' ' + mov _bullet_template.count, 32 call randring2_next16 - mov byte_266ED, al - mov byte_266EE, 20h ; ' ' + mov _bullet_template.BT_angle, al + mov _bullet_template.speed, (2 shl 4) call fp_2D004 call fp_2D000 mov _bullet_template.pattern, BP_RING - mov byte_266EF, 10h + mov _bullet_template.count, 16 call randring2_next16 - mov byte_266ED, al - mov byte_266EE, 30h ; '0' + mov _bullet_template.BT_angle, al + mov _bullet_template.speed, (3 shl 4) call fp_2D004 call fp_2D000 @@ -16082,10 +16079,10 @@ loc_14891: loc_148A4: call snd_se_play pascal, 3 ; jumptable 0001488D cases 290,298,306,314,390,398,406,414,490,498,506,514 mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte_266EF, 5 - mov byte_266F0, 6 - mov byte_266ED, 0 - mov byte_266EE, 40h + mov _bullet_template.count, 5 + mov _bullet_template.BT_delta.spread_angle, 6 + mov _bullet_template.BT_angle, 0 + mov _bullet_template.speed, (4 shl 4) call fp_2D004 call fp_2D000 leave @@ -16155,10 +16152,10 @@ midbossx_update proc far push bp mov bp, sp mov ax, _midboss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _midboss_pos.cur.y - mov point_266E4.y, ax - mov byte_266E2, 1 + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.spawn_type, 1 mov al, _midboss_phase mov ah, 0 mov bx, ax @@ -16378,31 +16375,31 @@ sub_14AF2 proc near call snd_se_play pascal, 3 mov al, byte_255B3 shl al, 5 - add al, 20h ; ' ' - mov byte_266ED, al + add al, 20h + mov _bullet_template.BT_angle, al mov ax, si mov bx, 8 cwd idiv bx test al, 1 jz short loc_14B47 - mov byte_266E2, 4 - mov byte_266E3, 39h ; '9' + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE mov _bullet_template.pattern, BP_SINGLE - mov byte_266EE, 2Ah ; '*' + mov _bullet_template.speed, (2 shl 4) + 10 call fp_2D004 call fp_2D000 - mov byte_266F0, 0Fh + mov _bullet_template.BT_delta.spread_angle, 0Fh jmp short loc_14B4C ; --------------------------------------------------------------------------- loc_14B47: - mov byte_266F0, 0Ah + mov _bullet_template.BT_delta.spread_angle, 0Ah loc_14B4C: mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 6 - mov byte_266EE, 24h ; '$' + mov _bullet_template.count, 6 + mov _bullet_template.speed, (2 shl 4) + 4 call fp_2D004 call fp_2D000 @@ -16437,16 +16434,16 @@ sub_14B76 proc near call snd_se_play pascal, 3 mov al, byte_255B3 shl al, 5 - add al, 20h ; ' ' - mov byte_266ED, al + add al, 20h + mov _bullet_template.BT_angle, al mov ax, si cwd sub ax, dx sar ax, 1 - add al, 20h ; ' ' - mov byte_266EE, al + add al, (2 shl 4) + mov _bullet_template.speed, al mov _bullet_template.pattern, BP_RING - mov byte_266EF, 20h ; ' ' + mov _bullet_template.count, 32 call fp_2D004 call fp_2D000 @@ -16479,28 +16476,28 @@ sub_14BCD proc near or dx, dx jnz short loc_14C32 call snd_se_play pascal, 3 - mov byte_266EE, 40h + mov _bullet_template.speed, (4 shl 4) mov _bullet_template.pattern, BP_SINGLE mov al, byte_255B3 shl al, 5 add al, 8 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D004 call fp_2D000 mov al, byte_255B3 shl al, 5 add al, 10h - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 mov al, byte_255B3 shl al, 5 - add al, 38h ; '8' - mov byte_266ED, al + add al, 38h + mov _bullet_template.BT_angle, al call fp_2D000 mov al, byte_255B3 shl al, 5 - add al, 30h ; '0' - mov byte_266ED, al + add al, 30h + mov _bullet_template.BT_angle, al call fp_2D000 loc_14C32: @@ -16546,15 +16543,15 @@ loc_14C6B: or dx, dx jnz short loc_14CCC call snd_se_play pascal, 3 - mov byte_266EE, 28h ; '(' + mov _bullet_template.speed, (2 shl 4) + 8 mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 5 - mov byte_266F0, 10h + mov _bullet_template.count, 5 + mov _bullet_template.BT_delta.spread_angle, 10h mov al, _midboss_angle - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D004 call fp_2D000 - mov byte_266EE, 0Ah + mov _bullet_template.speed, 10 mov ax, _player_pos.cur.y sub ax, _midboss_pos.cur.y push ax @@ -16562,10 +16559,10 @@ loc_14C6B: sub ax, _midboss_pos.cur.x push ax call iatan2 - mov byte_266ED, al - mov byte_266E3, 4Ch ; 'L' + mov _bullet_template.BT_angle, al + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE mov _bullet_template.pattern, BP_SINGLE - mov byte_266F2, 0FFh + mov _bullet_template.BT_special_motion, 0FFh loc_14CCC: mov ax, si @@ -16574,10 +16571,10 @@ loc_14CCC: idiv bx cmp dx, 18h jl short loc_14CEA - mov byte_266E2, 4 - mov al, byte_266EE - add al, 0Ah - mov byte_266EE, al + mov _bullet_template.spawn_type, 4 + mov al, _bullet_template.speed + add al, 10 + mov _bullet_template.speed, al call fp_2D002 loc_14CEA: @@ -16634,12 +16631,12 @@ loc_14D5D: push offset _midboss_pos call _motion_update_2 inc _midboss_phase_frame - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 mov ax, _midboss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _midboss_pos.cur.y add ax, (-16 shl 4) - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov al, byte_255B2 mov ah, 0 mov [bp+var_2], ax @@ -16680,9 +16677,9 @@ loc_14DB8: loc_14DBE: mov ax, _midboss_pos.cur.x ; jumptable 00014DA2 case 255 - mov word ptr dword_2A8C6, ax + mov point_2A8C6.x, ax mov ax, _midboss_pos.cur.y - mov word ptr dword_2A8C6+2, ax + mov point_2A8C6.y, ax mov ax, _midboss_phase_frame add ax, -48 push ax @@ -16862,28 +16859,24 @@ loc_14F9B: test byte ptr _midboss_phase_frame, 3 jnz short loc_15025 mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte_266EF, 2 - mov byte_266F0, 6 - push 18h - call randring2_next16_mod - add al, 20h ; ' ' - mov byte_266EE, al - push 60h - call randring2_next16_mod - sub al, 30h ; '0' - mov byte_266ED, al + mov _bullet_template.count, 2 + mov _bullet_template.BT_delta.spread_angle, 6 + call randring2_next16_mod pascal, 18h + add al, (2 shl 4) + mov _bullet_template.speed, al + call randring2_next16_mod pascal, 60h + sub al, 30h + mov _bullet_template.BT_angle, al call fp_2D004 call fp_2D000 - mov byte_266E2, 2 - mov byte_266E3, 3Ah ; ':' - push 18h - call randring2_next16_mod - add al, 20h ; ' ' - mov byte_266EE, al - push 60h - call randring2_next16_mod - sub al, 30h ; '0' - mov byte_266ED, al + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_YELLOW + call randring2_next16_mod pascal, (1 shl 4) + 8 + add al, (2 shl 4) + mov _bullet_template.speed, al + call randring2_next16_mod pascal, 60h + sub al, 30h + mov _bullet_template.BT_angle, al call fp_2D000 push 3 @@ -16937,12 +16930,12 @@ var_1 = byte ptr -1 call snd_se_play pascal, 6 cmp _midboss_pos.cur.x, (192 shl 4) jge short loc_1505D - mov byte_266ED, 36h ; '6' + mov _bullet_template.BT_angle, 36h jmp short loc_15062 ; --------------------------------------------------------------------------- loc_1505D: - mov byte_266ED, 56h ; 'V' + mov _bullet_template.BT_angle, 56h loc_15062: inc byte_22B9E @@ -16971,24 +16964,24 @@ loc_15068: ; --------------------------------------------------------------------------- loc_150A1: - mov al, byte_266ED - add al, 0F8h + mov al, _bullet_template.BT_angle + add al, -8 loc_150A6: - mov byte_266ED, al - mov al, byte_266ED + mov _bullet_template.BT_angle, al + mov al, _bullet_template.BT_angle mov [bp+var_1], al call snd_se_play pascal, 3 - mov byte_266E2, 2 - mov byte_266E3, 3Ah ; ':' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_YELLOW call fp_2D004 - mov byte_266EE, 10h - mov byte_266EF, 0Ch - mov byte_266F0, 7 + mov _bullet_template.speed, (1 shl 4) + mov _bullet_template.count, 12 + mov _bullet_template.BT_delta.stack_speed, 7 call sub_1CFA2 cmp _midboss_pos.cur.x, (192 shl 4) jle short loc_150E2 - mov al, 0A0h + mov al, -60h jmp short loc_150E4 ; --------------------------------------------------------------------------- @@ -16996,11 +16989,11 @@ loc_150E2: mov al, 60h loc_150E4: - sub al, byte_266ED - mov byte_266ED, al + sub al, _bullet_template.BT_angle + mov _bullet_template.BT_angle, al call sub_1CFA2 mov al, [bp+var_1] - mov byte_266ED, al + mov _bullet_template.BT_angle, al leave retn ; --------------------------------------------------------------------------- @@ -17055,17 +17048,15 @@ loc_15142: test byte ptr _midboss_phase_frame, 7 jnz short loc_1517E mov _bullet_template.pattern, BP_SPREAD_AIMED - push 3 - call randring2_next16_and + call randring2_next16_and pascal, 3 add al, al inc al - mov byte_266EF, al - push 7 - call randring2_next16_and + mov _bullet_template.count, al + call randring2_next16_and pascal, 7 add al, 0Ah - mov byte_266F0, al - mov byte_266EE, 32h ; '2' - mov byte_266ED, 0 + mov _bullet_template.BT_delta.spread_angle, al + mov _bullet_template.speed, (3 shl 4) + 2 + mov _bullet_template.BT_angle, 0 call fp_2D004 call sub_1CFA2 @@ -17088,15 +17079,15 @@ loc_1517E: loc_151A5: test si, 3 jnz short loc_151FF - mov byte_266E2, 2 + mov _bullet_template.spawn_type, 2 mov _bullet_template.pattern, BP_SINGLE - mov byte_266E3, 5Ch + mov _bullet_template.patnum, PAT_BULLET16_D_YELLOW mov ax, si imul ax, 3 - add al, 28h ; '(' - mov byte_266EE, al + add al, (2 shl 4) + 8 + mov _bullet_template.speed, al mov al, _midboss_angle - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D004 call sub_1CFA2 push 3 @@ -17146,7 +17137,7 @@ sub_15202 proc near cmp _midboss_phase_frame, 24 jnz loc_152B2 call snd_se_play pascal, 6 - mov byte_266ED, 0E0h + mov _bullet_template.BT_angle, -20h pop bp retn ; --------------------------------------------------------------------------- @@ -17157,14 +17148,14 @@ loc_1522F: test byte ptr _midboss_phase_frame, 2 jnz short loc_152B2 mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 3 - mov byte_266F0, 6 - mov byte_266EE, 3Ch ; '<' + mov _bullet_template.count, 3 + mov _bullet_template.BT_delta.spread_angle, 6 + mov _bullet_template.speed, (3 shl 4) + 12 cmp _midboss_pos.cur.x, (192 shl 4) jge short loc_15263 mov al, 80h - sub al, byte_266ED - mov byte_266ED, al + sub al, _bullet_template.BT_angle + mov _bullet_template.BT_angle, al loc_15263: call fp_2D004 @@ -17172,14 +17163,14 @@ loc_15263: cmp _midboss_pos.cur.x, (192 shl 4) jge short loc_1527C mov al, 80h - sub al, byte_266ED - mov byte_266ED, al + sub al, _bullet_template.BT_angle + mov _bullet_template.BT_angle, al loc_1527C: call snd_se_play pascal, 3 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 6 - mov byte_266ED, al + mov _bullet_template.BT_angle, al pop bp retn ; --------------------------------------------------------------------------- @@ -17248,12 +17239,12 @@ loc_15314: push offset _midboss_pos call _motion_update_2 inc _midboss_phase_frame - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 mov ax, _midboss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _midboss_pos.cur.y add ax, (-16 shl 4) - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov al, byte_255C6 mov ah, 0 mov [bp+var_2], ax @@ -17809,25 +17800,25 @@ loc_157E2: loc_157EB: mov al, [si+2Ch] - mov byte_266E2, al + mov _bullet_template.spawn_type, al mov al, [si+2Dh] - mov byte_266E3, al + mov _bullet_template.patnum, al mov ax, [si+2Eh] add ax, [si+2] - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, [si+30h] add ax, [si+4] - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov al, [si+36h] mov _bullet_template.pattern, al mov al, [si+37h] - mov byte_266ED, al + mov _bullet_template.BT_angle, al mov al, [si+38h] - mov byte_266EE, al + mov _bullet_template.speed, al mov al, [si+39h] - mov byte_266EF, al + mov _bullet_template.count, al mov al, [si+3Ah] - mov byte_266F0, al + mov _bullet_template.BT_delta, al push es call fp_2D004 call fp_2D000 @@ -18702,12 +18693,12 @@ sub_15F97 proc near mov ax, _boss_pos.cur.x add ax, (-32 shl 4) mov word_25662, ax - mov byte_266E2, 2 - mov byte_266E3, 3Bh ; ';' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_YELLOW mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 0Bh - mov byte_266F0, 5 - mov byte_266EE, 28h ; '(' + mov _bullet_template.count, 11 + mov _bullet_template.BT_delta.spread_angle, 5 + mov _bullet_template.speed, (2 shl 4) + 8 call fp_2D004 jmp loc_1607E ; --------------------------------------------------------------------------- @@ -18715,7 +18706,7 @@ sub_15F97 proc near loc_15FCF: cmp _boss_phase_frame, 15 jnz short loc_15FDE - mov byte_266ED, 0 + mov _bullet_template.BT_angle, 0 jmp loc_1607E ; --------------------------------------------------------------------------- @@ -18723,7 +18714,7 @@ loc_15FDE: cmp _boss_phase_frame, 31 jnz short loc_15FF3 add word_25662, 400h - mov byte_266ED, 80h + mov _bullet_template.BT_angle, 80h jmp loc_1607E ; --------------------------------------------------------------------------- @@ -18731,7 +18722,7 @@ loc_15FF3: cmp _boss_phase_frame, 47 jnz short loc_16007 sub word_25662, 400h - mov byte_266ED, 10h + mov _bullet_template.BT_angle, 10h jmp short loc_1607E ; --------------------------------------------------------------------------- @@ -18739,7 +18730,7 @@ loc_16007: cmp _boss_phase_frame, 63 jnz short loc_1601B add word_25662, 400h - mov byte_266ED, 70h ; 'p' + mov _bullet_template.BT_angle, 70h jmp short loc_1607E ; --------------------------------------------------------------------------- @@ -18747,7 +18738,7 @@ loc_1601B: cmp _boss_phase_frame, 79 jnz short loc_1602F sub word_25662, 400h - mov byte_266ED, 20h ; ' ' + mov _bullet_template.BT_angle, 20h jmp short loc_1607E ; --------------------------------------------------------------------------- @@ -18755,7 +18746,7 @@ loc_1602F: cmp _boss_phase_frame, 95 jnz short loc_16043 add word_25662, 400h - mov byte_266ED, 60h + mov _bullet_template.BT_angle, 60h jmp short loc_1607E ; --------------------------------------------------------------------------- @@ -18763,7 +18754,7 @@ loc_16043: cmp _boss_phase_frame, 111 jnz short loc_16057 sub word_25662, 400h - mov byte_266ED, 30h ; '0' + mov _bullet_template.BT_angle, 30h jmp short loc_1607E ; --------------------------------------------------------------------------- @@ -18771,7 +18762,7 @@ loc_16057: cmp _boss_phase_frame, 127 jnz short loc_1606B add word_25662, 400h - mov byte_266ED, 50h ; 'P' + mov _bullet_template.BT_angle, 50h jmp short loc_1607E ; --------------------------------------------------------------------------- @@ -18789,9 +18780,9 @@ loc_1607E: cmp dx, 15 jnz short loc_160A3 mov ax, word_25662 - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax call fp_2D000 call snd_se_play pascal, 3 @@ -18810,14 +18801,14 @@ sub_160A5 proc near mov bp, sp cmp _boss_phase_frame, 1 jnz short loc_160DC - mov byte_266ED, 0 - mov byte_266E2, 4 - mov byte_266E3, 4Ch ; 'L' + mov _bullet_template.BT_angle, 0 + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE mov _bullet_template.pattern, BP_RING mov al, _rank inc al - mov byte_266EF, al - mov byte_266EE, 40h + mov _bullet_template.count, al + mov _bullet_template.speed, (4 shl 4) mov byte_25664, 1 mov byte_25665, 0 pop bp @@ -18829,7 +18820,7 @@ loc_160DC: jge short loc_160F4 cmp byte_25665, 10h jb loc_1617E - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 7 jmp short loc_16164 ; --------------------------------------------------------------------------- @@ -18837,24 +18828,24 @@ loc_160DC: loc_160F4: cmp _boss_phase_frame, 128 jnz short loc_16150 - mov byte_266E2, 2 - mov byte_266E3, 3Bh ; ';' - mov byte_266ED, 80h - mov byte_266EE, 10h - mov byte_266F2, 82h + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_YELLOW + mov _bullet_template.BT_angle, 80h + mov _bullet_template.speed, (1 shl 4) + mov _bullet_template.BT_special_motion, 82h mov byte_2CFF7, 1 - mov byte_266EF, 20h ; ' ' + mov _bullet_template.count, 32 call fp_2D004 call sub_1CFB5 - mov byte_266E2, 4 - mov byte_266EE, 40h + mov _bullet_template.spawn_type, 4 + mov _bullet_template.speed, (4 shl 4) mov al, _rank inc al - mov byte_266EF, al + mov _bullet_template.count, al mov byte_25664, 1 mov byte_25665, 0 call snd_se_play pascal, 9 - mov byte_266E3, 4Ch ; 'L' + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE pop bp retn ; --------------------------------------------------------------------------- @@ -18864,16 +18855,16 @@ loc_16150: jge short loc_16187 cmp byte_25665, 10h jb short loc_1617E - mov al, byte_266ED - add al, 0F9h + mov al, _bullet_template.BT_angle + add al, -7 loc_16164: - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 call snd_se_play pascal, 3 inc byte_25664 mov al, byte_25665 - add al, 0F0h + add al, -10h mov byte_25665, al loc_1617E: @@ -18886,13 +18877,13 @@ loc_1617E: loc_16187: cmp _boss_phase_frame, 256 jnz short loc_161C2 - mov byte_266E2, 2 - mov byte_266E3, 3Bh ; ';' - mov byte_266ED, 0 - mov byte_266EE, 10h - mov byte_266F2, 82h + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_YELLOW + mov _bullet_template.BT_angle, 0 + mov _bullet_template.speed, (1 shl 4) + mov _bullet_template.BT_special_motion, 82h mov byte_2CFF7, 1 - mov byte_266EF, 20h ; ' ' + mov _bullet_template.count, 32 call fp_2D004 call sub_1CFB5 call snd_se_play pascal, 9 @@ -18939,10 +18930,10 @@ loc_161F6: jmp word ptr cs:[bx+8] ; switch jump loc_161FA: - mov ax, point_266E4.x ; jumptable 000161F6 case 1 - mov word ptr dword_2A8C6, ax - mov ax, point_266E4.y - mov word ptr dword_2A8C6+2, ax + mov ax, _bullet_template.BT_origin.x ; jumptable 000161F6 case 1 + mov point_2A8C6.x, ax + mov ax, _bullet_template.BT_origin.y + mov point_2A8C6.y, ax mov word_2A8D0, 20h ; ' ' mov byte_2A8D2, 0Bh mov word_2A8CE, 1000h @@ -18959,16 +18950,16 @@ loc_16221: ; --------------------------------------------------------------------------- loc_16228: - call circles_add_shrinking pascal, point_266E4.x, point_266E4.y + call circles_add_shrinking pascal, _bullet_template.BT_origin.x, _bullet_template.BT_origin.y mov _circles_color, 0Fh - mov byte_266E2, 2 - mov byte_266EE, 10h - mov byte_266F2, 87h + mov _bullet_template.spawn_type, 2 + mov _bullet_template.speed, (1 shl 4) + mov _bullet_template.BT_special_motion, 87h mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 7 - mov byte_266F0, 8 - mov byte_266E3, 3Bh ; ';' - mov byte_266EE, 20h ; ' ' + mov _bullet_template.count, 7 + mov _bullet_template.BT_delta.spread_angle, 8 + mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_YELLOW + mov _bullet_template.speed, (2 shl 4) call fp_2D004 mov byte_2CFF7, 1 @@ -18982,7 +18973,7 @@ loc_1626B: or dx, dx jnz short locret_16290 call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D002 call snd_se_play pascal, 9 @@ -19009,13 +19000,13 @@ sub_162A3 proc near mov bp, sp cmp _boss_phase_frame, 1 jnz short loc_162D7 - mov byte_266E2, 2 - mov byte_266E3, 3Bh ; ';' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_YELLOW mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266F0, 6 - mov byte_266EE, 10h - mov byte_266F2, 82h - mov byte_266EF, 8 + mov _bullet_template.BT_delta.spread_angle, 6 + mov _bullet_template.speed, (1 shl 4) + mov _bullet_template.BT_special_motion, 82h + mov _bullet_template.count, 8 mov byte_2CFF7, 1 jmp short loc_162EA ; --------------------------------------------------------------------------- @@ -19034,9 +19025,9 @@ loc_162EA: cmp dx, 15 jnz short loc_1630B call fp_2D002 - mov al, byte_266EF + mov al, _bullet_template.count add al, 3 - mov byte_266EF, al + mov _bullet_template.count, al call snd_se_play pascal, 3 loc_1630B: @@ -19055,21 +19046,21 @@ sub_1630D proc near cmp _boss_phase_frame, 1 jnz short loc_16353 mov ax, _player_pos.cur.y - sub ax, point_266E4.y + sub ax, _bullet_template.BT_origin.y push ax mov ax, _player_pos.cur.x - sub ax, point_266E4.x + sub ax, _bullet_template.BT_origin.x push ax call iatan2 - mov byte_266ED, al + mov _bullet_template.BT_angle, al loc_1632F: - mov byte_266E2, 4 - mov byte_266E3, 39h ; '9' + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 5 - mov byte_266F0, 42h ; 'B' - mov byte_266EE, 50h ; 'P' + mov _bullet_template.count, 5 + mov _bullet_template.BT_delta.spread_angle, 42h + mov _bullet_template.speed, (5 shl 4) call fp_2D004 jmp short loc_16366 ; --------------------------------------------------------------------------- @@ -19087,9 +19078,9 @@ loc_16366: idiv bx cmp dx, 7 jnz short loc_16387 - mov al, byte_266F0 - add al, 0FCh - mov byte_266F0, al + mov al, _bullet_template.BT_delta.spread_angle + add al, -4 + mov _bullet_template.BT_delta.spread_angle, al call fp_2D000 call snd_se_play pascal, 3 @@ -19131,22 +19122,22 @@ loc_163AD: ; --------------------------------------------------------------------------- loc_163B5: - mov byte_266ED, 0 ; jumptable 000163A9 case 48 + mov _bullet_template.BT_angle, 0 ; jumptable 000163A9 case 48 call snd_se_play pascal, 8 mov byte_25666, 64h ; 'd' loc_163C6: mov _circles_color, 0Fh ; jumptable 000163A9 cases 56,64,72,80 - call circles_add_shrinking pascal, point_266E4.x, point_266E4.y + call circles_add_shrinking pascal, _bullet_template.BT_origin.x, _bullet_template.BT_origin.y loc_163D8: mov al, byte_2A8D3 ; jumptable 000163A9 case 40 neg al mov byte_2A8D3, al - mov ax, point_266E4.x - mov word ptr dword_2A8C6, ax - mov ax, point_266E4.y - mov word ptr dword_2A8C6+2, ax + mov ax, _bullet_template.BT_origin.x + mov point_2A8C6.x, ax + mov ax, _bullet_template.BT_origin.y + mov point_2A8C6.y, ax mov word_2A8D0, 8 mov byte_2A8D2, 9 mov word_2A8CE, 1000h @@ -19162,10 +19153,10 @@ loc_16402: ; --------------------------------------------------------------------------- loc_16409: - mov ax, point_266E4.x ; jumptable 000163A9 case 96 - mov word_2561A, ax - mov ax, point_266E4.y - mov word_2561C, ax + mov ax, _bullet_template.BT_origin.x ; jumptable 000163A9 case 96 + mov point_2561A.x, ax + mov ax, _bullet_template.BT_origin.y + mov point_2561A.y, ax mov al, byte_2D01E mov ah, 0 mov word_2562A, ax @@ -19210,16 +19201,16 @@ loc_16476: idiv bx or dx, dx jnz short loc_164BB - mov byte_266E2, 2 + mov _bullet_template.spawn_type, 2 mov _bullet_template.pattern, BP_RING - mov byte_266EF, 20h ; ' ' - mov byte_266E3, 4Ch ; 'L' - mov byte_266EE, 48h ; 'H' + mov _bullet_template.count, 32 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE + mov _bullet_template.speed, (4 shl 4) + 8 call fp_2D004 call fp_2D000 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 2 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call snd_se_play pascal, 9 loc_164BB: @@ -19227,11 +19218,11 @@ loc_164BB: jl short locret_164EB cmp _stage_frame_mod2, 0 jz short locret_164EB - mov byte_266E2, 2 + mov _bullet_template.spawn_type, 2 mov _bullet_template.pattern, BP_RANDOM_ANGLE - mov byte_266E3, 37h ; '7' - mov byte_266EE, 20h ; ' ' - mov byte_266EF, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE + mov _bullet_template.speed, (2 shl 4) + mov _bullet_template.count, 2 call fp_2D004 call fp_2D000 @@ -19276,11 +19267,11 @@ sub_1653D proc near mov bp, sp cmp _boss_phase_frame, 48 jnz short loc_1656A - call circles_add_shrinking pascal, point_266E4.x, point_266E4.y + call circles_add_shrinking pascal, _bullet_template.BT_origin.x, _bullet_template.BT_origin.y mov _circles_color, 0Fh mov _boss_angle, 16 mov byte_2D02D, 10h - mov byte_266F2, 0FFh + mov _bullet_template.BT_special_motion, 0FFh pop bp retn ; --------------------------------------------------------------------------- @@ -19294,36 +19285,36 @@ loc_1656A: idiv bx or dx, dx jnz loc_1660E - mov byte_266E2, 4 - mov byte_266EF, 5 - mov byte_266F0, 1 + mov _bullet_template.spawn_type, 4 + mov _bullet_template.count, 5 + mov _bullet_template.BT_delta.spread_angle, 1 mov _bullet_template.pattern, BP_SPREAD - mov byte_266E3, 39h ; '9' - mov byte_266EE, 28h ; '(' + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE + mov _bullet_template.speed, (2 shl 4) + 8 call fp_2D004 - add point_266E4.x, (32 shl 4) + add _bullet_template.BT_origin.x, (32 shl 4) mov al, _boss_angle - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D002 - sub point_266E4.x, (64 shl 4) - mov al, 128 + sub _bullet_template.BT_origin.x, (64 shl 4) + mov al, 80h sub al, _boss_angle - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D002 mov al, _boss_angle add al, -16 mov _boss_angle, al - mov byte_266E2, 1 - mov byte_266EF, 3 - mov byte_266EE, 18h + mov _bullet_template.spawn_type, 1 + mov _bullet_template.count, 3 + mov _bullet_template.speed, (1 shl 4) + 8 call fp_2D004 mov al, byte_2D02D - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D002 - add point_266E4.x, (64 shl 4) - mov al, 128 + add _bullet_template.BT_origin.x, (64 shl 4) + mov al, 80h sub al, byte_2D02D - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D002 mov al, byte_2D02D add al, 9 @@ -19347,10 +19338,10 @@ var_2 = word ptr -2 enter 4, 0 mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (16 shl 4) - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov al, _boss_phase mov ah, 0 mov bx, ax @@ -19783,10 +19774,10 @@ sub_16A1A proc near loc_16A3F: mov ax, _boss_pos.cur.x add ax, (-20 shl 4) - mov word ptr dword_2A8C6, ax + mov point_2A8C6.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) - mov word ptr dword_2A8C6+2, ax + mov point_2A8C6.y, ax mov word_2A8D0, 10h mov byte_2A8D3, 0FEh mov byte_2A8D2, 3 @@ -20294,11 +20285,11 @@ var_1 = byte ptr -1 mov [bp+var_1], al cmp [bp+var_1], 2 jnz short loc_16E2E - mov byte_266E2, 4 - mov byte_266E3, 39h ; '9' + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE mov _bullet_template.pattern, BP_SPREAD - mov byte_266ED, 80h - mov byte_266F0, 8 + mov _bullet_template.BT_angle, 80h + mov _bullet_template.BT_delta.spread_angle, 8 call fp_2D004 leave retn @@ -20313,32 +20304,28 @@ loc_16E2E: idiv bx or dx, dx jnz short loc_16E84 - push 3 - call randring2_next16_and + call randring2_next16_and pascal, 3 inc al - mov byte_266EF, al - push 1Fh - call randring2_next16_and - add al, 20h ; ' ' - mov byte_266EE, al - mov al, byte_266ED - add al, 0F8h - mov byte_266ED, al - sub point_266E4.x, (6 shl 4) + mov _bullet_template.count, al + call randring2_next16_and pascal, 1Fh + add al, (2 shl 4) + mov _bullet_template.speed, al + mov al, _bullet_template.BT_angle + add al, -8 + mov _bullet_template.BT_angle, al + sub _bullet_template.BT_origin.x, (6 shl 4) call fp_2D000 - push 3 - call randring2_next16_and + call randring2_next16_and pascal, 3 inc al - mov byte_266EF, al - push 1Fh - call randring2_next16_and - add al, 20h ; ' ' - mov byte_266EE, al - add point_266E4.x, (12 shl 4) + mov _bullet_template.count, al + call randring2_next16_and pascal, 1Fh + add al, (2 shl 4) + mov _bullet_template.speed, al + add _bullet_template.BT_origin.x, (12 shl 4) call fp_2D000 loc_16E84: - cmp byte_266ED, 0 + cmp _bullet_template.BT_angle, 0 jnz short locret_16E9B mov _boss_phase_frame, 0 mov _boss_mode, 0FFh @@ -20379,9 +20366,9 @@ loc_16EBF: loc_16EC3: mov ax, _boss_pos.cur.x ; jumptable 00016EBF case 32 - mov word ptr dword_2A8C6, ax + mov point_2A8C6.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_2A8C6+2, ax + mov point_2A8C6.y, ax mov word_2A8D0, 20h ; ' ' mov byte_2A8D3, 0FEh mov byte_2A8D2, 9 @@ -20432,7 +20419,7 @@ word_16F10 dw 20h, 22h, 24h, 40h sub_16F24 proc near -var_1 = byte ptr -1 +@@angle = byte ptr -1 arg_0 = word ptr 4 enter 2, 0 @@ -20440,12 +20427,12 @@ arg_0 = word ptr 4 mov si, [bp+arg_0] cmp byte_25672, 2 ja short loc_16F38 - mov byte_266EF, 5 + mov _bullet_template.count, 5 loc_16F38: cmp byte ptr [si+19h], 0 jl short loc_16F42 - mov al, 0C0h + mov al, -40h jmp short loc_16F44 ; --------------------------------------------------------------------------- @@ -20453,12 +20440,12 @@ loc_16F42: mov al, 40h loc_16F44: - mov [bp+var_1], al + mov [bp+@@angle], al mov al, [si+1] - add al, [bp+var_1] - mov byte_266ED, al + add al, [bp+@@angle] + mov _bullet_template.BT_angle, al mov eax, [si+2] - mov point_266E4, eax + mov _bullet_template.BT_origin, eax call fp_2D000 pop si leave @@ -20481,11 +20468,11 @@ var_1 = byte ptr -1 mov [bp+var_1], al cmp [bp+var_1], 2 jnz short loc_16F9F - mov byte_266E2, 1 - mov byte_266EE, 38h ; '8' + mov _bullet_template.spawn_type, 1 + mov _bullet_template.speed, (3 shl 4) + 8 mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 3 - mov byte_266F0, 8 + mov _bullet_template.count, 3 + mov _bullet_template.BT_delta.spread_angle, 8 call fp_2D004 mov fp_25676, offset sub_16F24 mov al, byte ptr _boss_phase_frame @@ -20517,28 +20504,28 @@ loc_16FC6: sub dx, ax push dx call sub_16B85 - mov byte_266E2, 2 - mov byte_266E3, 4Ch ; 'L' - mov byte_266EE, 34h ; '4' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE + mov _bullet_template.speed, (3 shl 4) + 4 mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 3 - mov byte_266F0, 6 - mov al, byte_266ED + mov _bullet_template.count, 3 + mov _bullet_template.BT_delta.spread_angle, 6 + mov al, _bullet_template.BT_angle add al, 6 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D004 call fp_2D000 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 40h - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 40h - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 40h - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 loc_17026: @@ -20587,7 +20574,7 @@ arg_0 = word ptr 4 push si mov si, [bp+4] mov eax, [si+2] - mov point_266E4, eax + mov _bullet_template.BT_origin, eax call fp_2D000 pop si pop bp @@ -20610,8 +20597,8 @@ var_1 = byte ptr -1 mov [bp+var_1], al cmp [bp+var_1], 2 jnz short loc_170C3 - mov byte_266E2, 1 - mov byte_266EE, 10h + mov _bullet_template.spawn_type, 1 + mov _bullet_template.speed, (1 shl 4) mov _bullet_template.pattern, BP_SINGLE call fp_2D004 mov fp_25676, offset sub_17061 @@ -20650,7 +20637,7 @@ loc_170C3: sub ax, _boss_pos.cur.x push ax call iatan2 - mov byte_266ED, al + mov _bullet_template.BT_angle, al cmp byte_25672, 0 jz short loc_17102 call sub_16DD7 @@ -20666,19 +20653,19 @@ loc_17102: sub dx, ax push dx call sub_16B85 - mov byte_266E2, 2 - mov byte_266E3, 38h ; '8' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_STAR mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte_266EF, 3 - mov byte_266F0, 0Ch - mov byte_266ED, 0 + mov _bullet_template.count, 3 + mov _bullet_template.BT_delta.spread_angle, 0Ch + mov _bullet_template.BT_angle, 0 call fp_2D004 call fp_2D000 loc_17136: - mov al, byte_266EE + mov al, _bullet_template.speed add al, 4 - mov byte_266EE, al + mov _bullet_template.speed, al call snd_se_play pascal, 9 loc_17145: @@ -20729,7 +20716,7 @@ var_1 = byte ptr -1 mov [bp+var_1], al cmp [bp+var_1], 2 jnz short loc_171A2 - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 mov fp_25676, offset sub_16F24 mov byte_2D02D, 0 jmp loc_17331 @@ -20773,18 +20760,18 @@ loc_171D2: idiv bx or dx, dx jnz short loc_1720D - mov byte_266EE, 20h ; ' ' + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 10h + mov _bullet_template.count, 16 call fp_2D004 call fp_2D000 loc_1720D: mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 3 - mov byte_266F0, 6 + mov _bullet_template.count, 3 + mov _bullet_template.BT_delta.spread_angle, 6 call fp_2D004 - mov byte_266EE, 40h + mov _bullet_template.speed, (4 shl 4) call snd_se_play pascal, 9 call sub_16DD7 jmp loc_17331 @@ -20834,11 +20821,11 @@ loc_1726E: cmp byte_2D02D, 0 jnz short loc_1729F mov byte_2D02D, 1 - mov byte_266E2, 4 - mov byte_266E3, 39h ; '9' + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE mov _bullet_template.pattern, BP_SPREAD - mov byte_266ED, 80h - mov byte_266F0, 8 + mov _bullet_template.BT_angle, 80h + mov _bullet_template.BT_delta.spread_angle, 8 call snd_se_play pascal, 15 loc_1729F: @@ -20848,42 +20835,38 @@ loc_1729F: idiv bx or dx, dx jnz loc_17331 - push 3 - call randring2_next16_and + call randring2_next16_and pascal, 3 inc al - mov byte_266EF, al - push 1Fh - call randring2_next16_and - add al, 10h - mov byte_266EE, al + mov _bullet_template.count, al + call randring2_next16_and pascal, 1Fh + add al, (1 shl 4) + mov _bullet_template.speed, al test byte_2D02D, 1 jz short loc_172D0 - mov al, byte_266ED - add al, 0F8h + mov al, _bullet_template.BT_angle + add al, -8 jmp short loc_172D5 ; --------------------------------------------------------------------------- loc_172D0: - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 8 loc_172D5: - mov byte_266ED, al - sub point_266E4.x, (6 shl 4) + mov _bullet_template.BT_angle, al + sub _bullet_template.BT_origin.x, (6 shl 4) call fp_2D000 - push 3 - call randring2_next16_and + call randring2_next16_and pascal, 3 inc al - mov byte_266EF, al - push 1Fh - call randring2_next16_and - add al, 10h - mov byte_266EE, al - add point_266E4.x, (12 shl 4) + mov _bullet_template.count, al + call randring2_next16_and pascal, 1Fh + add al, (1 shl 4) + mov _bullet_template.speed, al + add _bullet_template.BT_origin.x, (12 shl 4) call fp_2D000 - cmp byte_266ED, 0 + cmp _bullet_template.BT_angle, 0 jz short loc_1730D - cmp byte_266ED, 80h + cmp _bullet_template.BT_angle, 80h jb short loc_17331 loc_1730D: @@ -20916,7 +20899,7 @@ sub_1717D endp sub_17335 proc near var_3 = byte ptr -3 -var_2 = word ptr -2 +@@speed = word ptr -2 enter 4, 0 push si @@ -20925,11 +20908,11 @@ var_2 = word ptr -2 mov [bp+var_3], al cmp [bp+var_3], 2 jnz short loc_1736D - mov byte_266E2, 5 - mov byte_266E3, 39h ; '9' - mov byte_266EE, 32h ; '2' + mov _bullet_template.spawn_type, 5 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE + mov _bullet_template.speed, (3 shl 4) + 2 mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266ED, 0 + mov _bullet_template.BT_angle, 0 call fp_2D004 mov fp_25676, offset sub_17061 jmp loc_1748D @@ -20948,12 +20931,12 @@ loc_1736D: jnz short loc_173AC mov al, byte_25672 add al, al - mov dl, 18h + mov dl, 24 sub dl, al - mov byte_266EF, dl + mov _bullet_template.count, dl cmp byte_25674, 2 jnz short loc_173A2 - mov byte_266EF, 1Ch + mov _bullet_template.count, 28 loc_173A2: call sub_16DD7 @@ -20991,54 +20974,51 @@ loc_173D3: idiv bx or dx, dx jnz loc_1748D - mov byte_266E2, 4 - mov byte_266E3, 3Dh ; '=' + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_RED mov _bullet_template.pattern, BP_SINGLE_AIMED - mov byte_266F2, 0FFh + mov _bullet_template.BT_special_motion, 0FFh call fp_2D004 xor si, si jmp short loc_1746F ; --------------------------------------------------------------------------- loc_17409: - push (64 shl 4) - call randring2_next16_mod + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.x add dx, (-52 shl 4) add ax, dx - mov point_266E4.x, ax - push (64 shl 4) - call randring2_next16_mod + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.y add dx, (-40 shl 4) add ax, dx - mov point_266E4.y, ax - push 60h - call randring2_next16_mod - add ax, 10h - mov [bp+var_2], ax - mov al, byte ptr [bp+var_2] - mov byte_266EE, al - cmp [bp+var_2], 40h + mov _bullet_template.BT_origin.y, ax + call randring2_next16_mod pascal, (6 shl 4) + add ax, (1 shl 4) + mov [bp+@@speed], ax + mov al, byte ptr [bp+@@speed] + mov _bullet_template.speed, al + cmp [bp+@@speed], (4 shl 4) jl short loc_1744D - mov byte_266ED, 0 + mov _bullet_template.BT_angle, 0 jmp short loc_1746A ; --------------------------------------------------------------------------- loc_1744D: - mov ax, 40h - sub ax, [bp+var_2] - mov [bp+var_2], ax + mov ax, (4 shl 4) + sub ax, [bp+@@speed] + mov [bp+@@speed], ax push ax call randring2_next16_mod push ax - mov ax, [bp+var_2] + mov ax, [bp+@@speed] cwd sub ax, dx sar ax, 1 pop dx sub dl, al - mov byte_266ED, dl + mov _bullet_template.BT_angle, dl loc_1746A: call fp_2D002 @@ -21078,11 +21058,11 @@ var_1 = byte ptr -1 mov [bp+var_1], al cmp [bp+var_1], 2 jnz short loc_174CD - mov byte_266E2, 2 - mov byte_266E3, 38h ; '8' - mov byte_266EE, 5Ch + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_STAR + mov _bullet_template.speed, (5 shl 4) + 12 mov _bullet_template.pattern, BP_SINGLE - mov byte_266F2, 83h + mov _bullet_template.BT_special_motion, 83h call fp_2D004 mov fp_25676, offset sub_17061 mov byte_2D02D, 0 @@ -21103,16 +21083,16 @@ loc_174CD: or dx, dx jnz loc_17683 mov byte_2CFF8, 40h - mov byte_266ED, 10h + mov _bullet_template.BT_angle, 10h xor si, si jmp short loc_1750E ; --------------------------------------------------------------------------- loc_17502: call sub_1CFB5 - mov al, byte_266ED - add al, 20h ; ' ' - mov byte_266ED, al + mov al, _bullet_template.BT_angle + add al, 20h + mov _bullet_template.BT_angle, al inc si loc_1750E: @@ -21131,16 +21111,16 @@ loc_17515: or dx, dx jnz loc_17683 mov byte_2CFF8, 30h ; '0' - mov byte_266ED, 90h + mov _bullet_template.BT_angle, -70h call sub_1CFB5 mov byte_2CFF8, 50h ; 'P' - mov byte_266ED, 0B0h ; '°' + mov _bullet_template.BT_angle, -50h call sub_1CFB5 mov byte_2CFF8, 30h ; '0' - mov byte_266ED, 0D0h + mov _bullet_template.BT_angle, -30h call sub_1CFB5 mov byte_2CFF8, 50h ; 'P' - mov byte_266ED, 0F0h + mov _bullet_template.BT_angle, -10h call sub_1CFB5 loc_17560: @@ -21158,16 +21138,16 @@ loc_1756A: or dx, dx jnz loc_17683 mov byte_2CFF8, 70h ; 'p' - mov byte_266ED, 10h + mov _bullet_template.BT_angle, 10h xor si, si jmp short loc_1759B ; --------------------------------------------------------------------------- loc_1758F: call sub_1CFB5 - mov al, byte_266ED - add al, 20h ; ' ' - mov byte_266ED, al + mov al, _bullet_template.BT_angle + add al, 20h + mov _bullet_template.BT_angle, al inc si loc_1759B: @@ -21186,16 +21166,16 @@ loc_175A2: or dx, dx jnz loc_17683 mov byte_2CFF8, 10h - mov byte_266ED, 10h + mov _bullet_template.BT_angle, 10h xor si, si jmp short loc_175D3 ; --------------------------------------------------------------------------- loc_175C7: call sub_1CFB5 - mov al, byte_266ED - add al, 20h ; ' ' - mov byte_266ED, al + mov al, _bullet_template.BT_angle + add al, 20h + mov _bullet_template.BT_angle, al inc si loc_175D3: @@ -21214,16 +21194,16 @@ loc_175DA: or dx, dx jnz loc_17683 mov byte_2CFF8, 40h - mov byte_266ED, 10h + mov _bullet_template.BT_angle, 10h xor si, si jmp short loc_1760D ; --------------------------------------------------------------------------- loc_17601: call sub_1CFB5 - mov al, byte_266ED - add al, 20h ; ' ' - mov byte_266ED, al + mov al, _bullet_template.BT_angle + add al, 20h + mov _bullet_template.BT_angle, al inc si loc_1760D: @@ -21237,11 +21217,10 @@ loc_17615: call sub_16B85 cmp byte_2D02D, 0 jnz short loc_17634 - push 1Fh - call randring2_next16_and + call randring2_next16_and pascal, 1Fh mov dl, 80h sub dl, al - mov byte_266ED, dl + mov _bullet_template.BT_angle, dl mov byte_2D02D, 1 loc_17634: @@ -21251,23 +21230,23 @@ loc_17634: idiv bx or dx, dx jnz short loc_17675 - mov byte_266E2, 4 - mov byte_266E3, 39h ; '9' + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE mov _bullet_template.pattern, BP_STACK - mov byte_266EF, 10h - mov byte_266F0, 5 - mov byte_266EE, 10h + mov _bullet_template.count, 16 + mov _bullet_template.BT_delta.stack_speed, 5 + mov _bullet_template.speed, (1 shl 4) call fp_2D004 call sub_1CFA2 - mov al, byte_266ED - add al, 0F8h - mov byte_266ED, al + mov al, _bullet_template.BT_angle + add al, -8 + mov _bullet_template.BT_angle, al call snd_se_play pascal, 15 loc_17675: - cmp byte_266ED, 80h + cmp _bullet_template.BT_angle, 80h jbe short loc_17683 - cmp byte_266ED, 0E0h + cmp _bullet_template.BT_angle, -20h jbe short loc_1768B loc_17683: @@ -21299,12 +21278,12 @@ var_1 = byte ptr -1 mov [bp+var_1], al cmp [bp+var_1], 2 jnz short loc_176D9 - mov byte_266E2, 2 - mov byte_266E3, 38h ; '8' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_STAR mov _bullet_template.pattern, BP_SINGLE - mov byte_266F2, 0FFh - mov byte_266ED, 0C0h - mov byte_266EE, 60h + mov _bullet_template.BT_special_motion, 0FFh + mov _bullet_template.BT_angle, -40h + mov _bullet_template.speed, (6 shl 4) mov fp_25676, offset sub_17061 mov byte_2D02D, 0 leave @@ -21331,45 +21310,36 @@ loc_17707: jg loc_17794 cmp _stage_frame_mod4, 0 jnz locret_17811 - mov point_266E4.x, 0 - push 0C00h - call randring2_next16_mod - mov point_266E4.y, ax - push 1Fh - call randring2_next16_and - add al, 10h - mov byte_266EE, al - push 1Fh - call randring2_next16_and - mov dl, 30h ; '0' + mov _bullet_template.BT_origin.x, 0 + call randring2_next16_mod pascal, (192 shl 4) + mov _bullet_template.BT_origin.y, ax + call randring2_next16_and pascal, 1Fh + add al, (1 shl 4) + mov _bullet_template.speed, al + call randring2_next16_and pascal, 1Fh + mov dl, 30h sub dl, al - mov byte_266ED, dl + mov _bullet_template.BT_angle, dl call fp_2D002 - mov point_266E4.x, (384 shl 4) - push 0C00h - call randring2_next16_mod - mov point_266E4.y, ax - push 1Fh - call randring2_next16_and - add al, 10h - mov byte_266EE, al - push 1Fh - call randring2_next16_and - add al, 50h ; 'P' - mov byte_266ED, al + mov _bullet_template.BT_origin.x, (384 shl 4) + call randring2_next16_mod pascal, (192 shl 4) + mov _bullet_template.BT_origin.y, ax + call randring2_next16_and pascal, 1Fh + add al, (1 shl 4) + mov _bullet_template.speed, al + call randring2_next16_and pascal, 1Fh + add al, 50h + mov _bullet_template.BT_angle, al call fp_2D002 - push 1800h - call randring2_next16_mod - mov point_266E4.x, ax - mov point_266E4.y, 0 - push 1Fh - call randring2_next16_and - add al, 10h - mov byte_266EE, al - push 1Fh - call randring2_next16_and - add al, 30h ; '0' - mov byte_266ED, al + call randring2_next16_mod pascal, (384 shl 4) + mov _bullet_template.BT_origin.x, ax + mov _bullet_template.BT_origin.y, 0 + call randring2_next16_and pascal, 1Fh + add al, (1 shl 4) + mov _bullet_template.speed, al + call randring2_next16_and pascal, 1Fh + add al, 30h + mov _bullet_template.BT_angle, al call fp_2D002 leave retn @@ -21386,9 +21356,8 @@ loc_1779E: call sub_16B85 cmp byte_2D02D, 0 jnz short loc_177B8 - push 1Fh - call randring2_next16_and - mov byte_266ED, al + call randring2_next16_and pascal, 1Fh + mov _bullet_template.BT_angle, al mov byte_2D02D, 1 loc_177B8: @@ -21398,17 +21367,17 @@ loc_177B8: idiv bx or dx, dx jnz short loc_177F9 - mov byte_266E2, 4 - mov byte_266E3, 39h ; '9' + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE mov _bullet_template.pattern, BP_STACK - mov byte_266EF, 10h - mov byte_266F0, 5 - mov byte_266EE, 10h + mov _bullet_template.count, 16 + mov _bullet_template.BT_delta.stack_speed, 5 + mov _bullet_template.speed, (1 shl 4) call fp_2D004 call sub_1CFA2 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 8 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call snd_se_play pascal, 15 loc_177F9: @@ -21439,10 +21408,10 @@ var_1 = byte ptr -1 mov [bp+var_1], al cmp [bp+var_1], 2 jnz short loc_1784F - mov byte_266E2, 1 - mov byte_266EF, 20h ; ' ' + mov _bullet_template.spawn_type, 1 + mov _bullet_template.count, 32 mov _bullet_template.pattern, BP_RING - mov byte_266EE, 38h ; '8' + mov _bullet_template.speed, (3 shl 4) + 8 call fp_2D004 push 1 call randring2_next16_and @@ -21472,7 +21441,7 @@ loc_1784F: jnz short loc_17874 call fp_2D000 mov al, byte_2D02D - add byte_266ED, al + add _bullet_template.BT_angle, al call snd_se_play pascal, 9 loc_17874: @@ -21521,16 +21490,16 @@ loc_178AD: or dx, dx jnz short loc_1793D mov fp_25676, offset sub_17061 - mov byte_266E2, 1 - mov byte_266EE, 20h ; ' ' + mov _bullet_template.spawn_type, 1 + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_SINGLE mov al, byte ptr _stage_frame shl al, 3 - mov byte_266ED, al + mov _bullet_template.BT_angle, al cmp byte_2D02D, 0 jz short loc_178F6 neg al - mov byte_266ED, al + mov _bullet_template.BT_angle, al loc_178F6: call fp_2D004 @@ -21542,14 +21511,14 @@ loc_178F6: or dx, dx jnz short loc_17936 mov fp_25676, offset sub_16F24 - mov byte_266E2, 4 - mov byte_266E3, 39h ; '9' + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE mov al, byte_2D02C - mov byte_266EE, al + mov _bullet_template.speed, al add al, 2 mov byte_2D02C, al mov _bullet_template.pattern, BP_SINGLE - mov byte_266ED, 0 + mov _bullet_template.BT_angle, 0 call fp_2D004 call sub_16DD7 @@ -21588,13 +21557,13 @@ loc_1795F: idiv bx or dx, dx jnz short loc_179B8 - mov byte_266E2, 4 - mov byte_266E3, 39h ; '9' + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE mov _bullet_template.pattern, BP_STACK_AIMED - mov byte_266EF, 10h - mov byte_266F0, 5 - mov byte_266ED, 0 - mov byte_266EE, 10h + mov _bullet_template.count, 16 + mov _bullet_template.BT_delta.stack_speed, 5 + mov _bullet_template.BT_angle, 0 + mov _bullet_template.speed, (1 shl 4) call fp_2D004 call sub_1CFA2 call snd_se_play pascal, 15 @@ -21660,10 +21629,10 @@ var_2 = word ptr -2 enter 4, 0 mov ax, _boss_pos.cur.x add ax, (-20 shl 4) - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov al, _boss_phase mov ah, 0 mov bx, ax @@ -22145,10 +22114,10 @@ arg_0 = word ptr 4 mov bp, sp push si push di - mov cx, 9 + mov cx, size _bullet_template / 2 mov si, [bp+arg_0] add si, 2Ch ; ',' - mov di, 53A2h + mov di, offset _bullet_template push ds pop es assume es:_DATA @@ -22304,9 +22273,9 @@ loc_17FD1: push si call sub_17E3E mov ax, [si+2] - add point_266E4.x, ax + add _bullet_template.BT_origin.x, ax mov ax, [si+4] - add point_266E4.y, ax + add _bullet_template.BT_origin.y, ax call fp_2D004 call fp_2D000 @@ -22394,11 +22363,11 @@ loc_18067: loc_1806B: mov word_2A8CE, 1400h ; jumptable 00018067 case 32 - mov ax, word_259EC - add ax, 0FF60h - mov word ptr dword_2A8C6+2, ax - mov ax, word_259EA - mov word ptr dword_2A8C6, ax + mov ax, point_259EA.y + add ax, (-10 shl 4) + mov point_2A8C6.y, ax + mov ax, point_259EA.x + mov point_2A8C6.x, ax mov word_2A8D0, 10h mov byte_2A8D2, 0Eh @@ -22414,8 +22383,8 @@ loc_18090: ; --------------------------------------------------------------------------- loc_18097: - push word ptr dword_2A8C6 ; jumptable 00018067 case 48 - push word ptr dword_2A8C6+2 + push point_2A8C6.x ; jumptable 00018067 case 48 + push point_2A8C6.y call circles_add_shrinking mov _circles_color, 0Fh @@ -22513,9 +22482,9 @@ sub_1812A proc near loc_18149: mov _boss_sprite, 0 - mov ax, word_259EA + mov ax, point_259EA.x mov _boss_pos.cur.x, ax - mov ax, word_259EC + mov ax, point_259EA.y mov _boss_pos.cur.y, ax jmp short loc_18184 ; --------------------------------------------------------------------------- @@ -22656,9 +22625,9 @@ sub_1821E proc near loc_1823D: mov _boss_sprite, 0 - mov ax, word_259EA + mov ax, point_259EA.x mov _boss_pos.cur.x, ax - mov ax, word_259EC + mov ax, point_259EA.y mov _boss_pos.cur.y, ax jmp short loc_18278 ; --------------------------------------------------------------------------- @@ -22802,10 +22771,10 @@ sub_18314 proc near loc_1832E: mov _bullet_template.pattern, BP_RING - mov byte_266EF, 8 - mov byte_266EE, 20h ; ' ' + mov _bullet_template.count, 8 + mov _bullet_template.speed, (2 shl 4) call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al push 1 call randring2_next16_and mov byte_2D02D, al @@ -22817,9 +22786,9 @@ loc_1834D: cmp _stage_frame_mod4, 0 jnz short loc_18388 call fp_2D000 - mov al, byte_266EE + mov al, _bullet_template.speed add al, 3 - mov byte_266EE, al + mov _bullet_template.speed, al cmp byte_2D02D, 0 jz short loc_1836B mov al, 4 @@ -22827,11 +22796,11 @@ loc_1834D: ; --------------------------------------------------------------------------- loc_1836B: - mov al, 0FCh + mov al, -4 loc_1836D: - add al, byte_266ED - mov byte_266ED, al + add al, _bullet_template.BT_angle + mov _bullet_template.BT_angle, al call snd_se_play pascal, 3 pop bp retn @@ -22870,13 +22839,13 @@ var_2 = word ptr -2 loc_183A7: call snd_se_play pascal, 15 - mov byte_266E2, 2 - mov byte_266E3, 3Bh ; ';' - mov byte_266ED, 0 + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_YELLOW + mov _bullet_template.BT_angle, 0 mov _bullet_template.pattern, BP_RING - mov byte_266EF, 20h ; ' ' - mov byte_266F2, 81h - mov byte_266EE, 28h ; '(' + mov _bullet_template.count, 32 + mov _bullet_template.BT_special_motion, 81h + mov _bullet_template.speed, (2 shl 4) + 8 mov byte_2CFF7, 2 mov byte_2CFF8, 0E0h call fp_2D004 @@ -22890,8 +22859,8 @@ loc_183A7: sub ax, _boss_pos.cur.x push ax call iatan2 - mov byte_266ED, al - mov byte_266F0, 42h ; 'B' + mov _bullet_template.BT_angle, al + mov _bullet_template.BT_delta.spread_angle, 42h leave retn ; --------------------------------------------------------------------------- @@ -22902,19 +22871,19 @@ loc_18409: mov [bp+var_2], ax or ax, ax jnz short loc_1841E - mov al, byte_266F0 - add al, 0F8h - mov byte_266F0, al + mov al, _bullet_template.BT_delta.spread_angle + add al, -8 + mov _bullet_template.BT_delta.spread_angle, al loc_1841E: - mov byte_266E2, 2 - mov byte_266E3, 4Ch ; 'L' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE mov ax, [bp+var_2] - imul ax, 0Ch - add al, 20h ; ' ' - mov byte_266EE, al + imul ax, 12 + add al, (2 shl 4) + mov _bullet_template.speed, al mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 2 + mov _bullet_template.count, 2 call fp_2D000 cmp _stage_frame_mod4, 0 jnz short locret_1845C @@ -22951,13 +22920,13 @@ sub_1845E proc near ; --------------------------------------------------------------------------- loc_18473: - mov byte_266E2, 5 - mov byte_266E3, 39h ; '9' + mov _bullet_template.spawn_type, 5 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE mov _bullet_template.pattern, BP_RING - mov byte_266EF, 28h ; '(' - mov byte_266EE, 10h + mov _bullet_template.count, 40 + mov _bullet_template.speed, (1 shl 4) call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 call snd_se_play pascal, 15 pop bp @@ -22992,7 +22961,7 @@ sub_184AC proc near ; --------------------------------------------------------------------------- loc_184C8: - mov byte_266F2, 81h + mov _bullet_template.BT_special_motion, 81h mov _bullet_template.pattern, BP_SINGLE mov byte_2CFF7, 1 pop bp @@ -23002,32 +22971,28 @@ loc_184C8: loc_184D9: cmp _stage_frame_mod2, 0 jz short loc_18554 - mov byte_266E2, 2 - mov byte_266E3, 3Ah ; ':' - push 3Fh ; '?' - call randring2_next16_and - add al, 10h - mov byte_266EE, al - push (64 shl 4) - call randring2_next16_mod + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_YELLOW + call randring2_next16_and pascal, 3Fh + add al, (1 shl 4) + mov _bullet_template.speed, al + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov point_266E4.x, ax - push (32 shl 4) - call randring2_next16_mod + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (32 shl 4) mov dx, _boss_pos.cur.y add dx, (-26 shl 4) add ax, dx - mov point_266E4.y, ax - mov byte_266ED, 0 + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.BT_angle, 0 mov byte_2CFF8, 40h call fp_2D002 - push 3Fh ; '?' - call randring2_next16_and - add al, 10h - mov byte_266EE, al - mov byte_266ED, 80h + call randring2_next16_and pascal, 3Fh + add al, (1 shl 4) + mov _bullet_template.speed, al + mov _bullet_template.BT_angle, 80h mov byte_2CFF8, 0C0h call fp_2D002 call snd_se_play pascal, 9 @@ -23066,7 +23031,7 @@ sub_18556 proc near loc_18570: mov _bullet_template.pattern, BP_RING - mov byte_266EF, 20h ; ' ' + mov _bullet_template.count, 32 call fp_2D004 pop bp retn @@ -23075,28 +23040,24 @@ loc_18570: loc_18580: cmp _stage_frame_mod8, 0 jnz short loc_185E2 - push 1 - call randring2_next16_and - mov byte_266E2, al - mov byte_266E3, 39h ; '9' - push 3Fh ; '?' - call randring2_next16_and - add al, 10h - mov byte_266EE, al - push 400h - call randring2_next16_mod + call randring2_next16_and pascal, 1 + mov _bullet_template.spawn_type, al + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE + call randring2_next16_and pascal, 3Fh + add al, (1 shl 4) + mov _bullet_template.speed, al + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov point_266E4.x, ax - push 200h - call randring2_next16_mod + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (32 shl 4) mov dx, _boss_pos.cur.y add dx, (-26 shl 4) add ax, dx - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 call snd_se_play pascal, 3 pop bp @@ -23123,26 +23084,26 @@ sub_185E4 proc near cmp _stage_frame_mod8, 0 jnz short loc_18653 mov al, _boss_angle - mov byte_266ED, al + mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_RING - mov byte_266EF, 10h + mov _bullet_template.count, 16 mov ax, _boss_phase_frame mov bx, 256 cwd idiv bx - add al, 20h ; ' ' - mov byte_266EE, al + add al, (2 shl 4) + mov _bullet_template.speed, al call fp_2D000 - mov byte_266E3, 4Ch ; 'L' - mov byte_266E2, 2 - mov al, byte_266ED + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE + mov _bullet_template.spawn_type, 2 + mov al, _bullet_template.BT_angle neg al add al, al - mov byte_266ED, al - mov byte_266EF, 4 - mov al, byte_266EE - add al, 10h - mov byte_266EE, al + mov _bullet_template.BT_angle, al + mov _bullet_template.count, 4 + mov al, _bullet_template.speed + add al, (1 shl 4) + mov _bullet_template.speed, al call fp_2D000 mov ax, _boss_phase_frame mov bx, 1024 @@ -23178,12 +23139,12 @@ sub_18655 proc near cmp _stage_frame_mod8, 0 jnz short loc_18682 mov _bullet_template.pattern, BP_RING - mov byte_266EF, 20h ; ' ' - mov byte_266E3, 4Ch ; 'L' - mov byte_266E2, 2 + mov _bullet_template.count, 32 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE + mov _bullet_template.spawn_type, 2 call randring2_next16 - mov byte_266ED, al - mov byte_266EE, 70h ; 'p' + mov _bullet_template.BT_angle, al + mov _bullet_template.speed, (7 shl 4) call fp_2D000 loc_18682: @@ -23273,11 +23234,11 @@ loc_186FB: loc_18706: mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-10 shl 4) - mov point_266E4.y, ax - mov byte_266E2, 1 + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.spawn_type, 1 mov al, _boss_phase mov ah, 0 mov bx, ax @@ -23296,9 +23257,9 @@ loc_1872F: mov _boss_hp, 9400 mov _boss_phase_end_hp, 3700 mov ax, _boss_pos.cur.x - mov word_259EA, ax + mov point_259EA.x, ax mov ax, _boss_pos.cur.y - mov word_259EC, ax + mov point_259EA.y, ax loc_1876B: call sub_186B9 @@ -23394,9 +23355,9 @@ loc_1881A: shl ax, 6 shl ax, 4 add ax, (64 shl 4) - mov word_259EA, ax + mov point_259EA.x, ax mov ax, _boss_pos.cur.y - mov word_259EC, ax + mov point_259EA.y, ax loc_18844: mov _boss_phase_frame, 0 @@ -23431,7 +23392,7 @@ loc_18883: loc_1888F: pushd 0 call sub_18684 - mov word_259EA, 0C00h + mov point_259EA.x, (192 shl 4) jmp loc_189A1 ; --------------------------------------------------------------------------- @@ -23702,23 +23663,23 @@ loc_18A94: loc_18AC4: mov ax, [si+2] sub ax, [si+0Ah] - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, [si+4] sub ax, [si+0Ch] - mov point_266E4.y, ax - mov byte_266F2, 82h + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.BT_special_motion, 82h mov byte_2CFF7, 1 mov [bp+var_4], 0 - mov byte_266EE, 20h ; ' ' + mov _bullet_template.speed, (2 shl 4) jmp short loc_18AFA ; --------------------------------------------------------------------------- loc_18AEC: call sub_1CFA2 inc [bp+var_4] - mov al, byte_266EE + mov al, _bullet_template.speed add al, 6 - mov byte_266EE, al + mov _bullet_template.speed, al loc_18AFA: cmp [bp+var_4], 3 @@ -23726,7 +23687,7 @@ loc_18AFA: inc byte ptr [si] call snd_se_play pascal, 6 mov _circles_color, GC_RG - call circles_add_growing pascal, point_266E4.x, point_266E4.y + call circles_add_growing pascal, _bullet_template.BT_origin.x, _bullet_template.BT_origin.y jmp short loc_18B4D ; --------------------------------------------------------------------------- @@ -23880,11 +23841,11 @@ loc_18C1F: loc_18C3E: cmp _boss_phase_frame, 64 jle short loc_18C74 - mov byte_266E2, 2 - mov byte_266E3, 37h ; '7' - mov byte_266ED, 0 + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE + mov _bullet_template.BT_angle, 0 mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 10h + mov _bullet_template.count, 16 call fp_2D004 call sub_18A79 or al, al @@ -23944,11 +23905,11 @@ loc_18CAF: loc_18CCC: cmp _boss_phase_frame, 64 jle short loc_18D02 - mov byte_266E2, 2 - mov byte_266E3, 37h ; '7' - mov byte_266ED, 0 + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE + mov _bullet_template.BT_angle, 0 mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 10h + mov _bullet_template.count, 16 call fp_2D004 call sub_18A79 or al, al @@ -24024,11 +23985,11 @@ loc_18D51: loc_18D7E: cmp _boss_phase_frame, 64 jle short locret_18DB4 - mov byte_266E2, 2 - mov byte_266E3, 37h ; '7' - mov byte_266ED, 0 + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE + mov _bullet_template.BT_angle, 0 mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 8 + mov _bullet_template.count, 8 call fp_2D004 call sub_18A79 or al, al @@ -24066,16 +24027,16 @@ loc_18DCF: div bx or dx, dx jnz short loc_18E41 - mov byte_266E2, 2 - mov byte_266E3, 37h ; '7' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE mov eax, _boss_pos.cur - mov point_266E4, eax + mov _bullet_template.BT_origin, eax mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 10h - mov byte_266F2, 81h - mov byte_266EE, 30h ; '0' + mov _bullet_template.count, 16 + mov _bullet_template.BT_special_motion, 81h + mov _bullet_template.speed, (3 shl 4) call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al mov byte_2CFF7, 1 test byte_259F0, 1 jz short loc_18E19 @@ -24093,9 +24054,9 @@ loc_18E1B: mov al, byte_2CFF8 add al, 80h mov byte_2CFF8, al - mov byte_266EE, 20h ; ' ' + mov _bullet_template.speed, (2 shl 4) call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D002 inc byte_259F0 @@ -24166,11 +24127,11 @@ loc_18EB3: call sub_18A14 loc_18EB6: - mov byte_266E2, 2 - mov byte_266E3, 37h ; '7' - mov byte_266ED, 0 + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE + mov _bullet_template.BT_angle, 0 mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 0Ch + mov _bullet_template.count, 12 call fp_2D004 call sub_18A79 or al, al @@ -24244,11 +24205,11 @@ loc_18F57: call sub_18A14 loc_18F5A: - mov byte_266E2, 2 - mov byte_266E3, 37h ; '7' - mov byte_266ED, 0 + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE + mov _bullet_template.BT_angle, 0 mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 0Ch + mov _bullet_template.count, 12 call fp_2D004 call sub_18A79 or al, al @@ -24339,11 +24300,11 @@ loc_19026: call sub_18A14 loc_19029: - mov byte_266E2, 2 - mov byte_266E3, 37h ; '7' - mov byte_266ED, 0 + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE + mov _bullet_template.BT_angle, 0 mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 6 + mov _bullet_template.count, 6 call fp_2D004 call sub_18A79 or al, al @@ -24378,7 +24339,7 @@ sub_1905A proc near add al, 0A0h mov byte_2D02C, al mov byte_2D02B, 0 - mov byte_266E3, 4Ch ; 'L' + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE loc_1908E: mov ax, _boss_phase_frame @@ -24387,7 +24348,7 @@ loc_1908E: idiv bx or dx, dx jnz short loc_190DE - mov byte_266EE, 10h + mov _bullet_template.speed, (1 shl 4) mov al, byte_2D02D add al, 10h mov byte_2D02D, al @@ -24412,24 +24373,24 @@ loc_190D7: call snd_se_play pascal, 15 loc_190DE: - mov byte_266E2, 4 + mov _bullet_template.spawn_type, 4 mov _bullet_template.pattern, BP_SINGLE mov ax, _boss_pos.cur.y add ax, (-10 shl 4) - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov ax, _boss_pos.cur.x add ax, (12 shl 4) - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov al, byte_2D02D - mov byte_266ED, al + mov _bullet_template.BT_angle, al call sub_1CFA2 - sub point_266E4.x, (24 shl 4) + sub _bullet_template.BT_origin.x, (24 shl 4) mov al, byte_2D02C - mov byte_266ED, al + mov _bullet_template.BT_angle, al call sub_1CFA2 - mov al, byte_266EE - add al, 0Ah - mov byte_266EE, al + mov al, _bullet_template.speed + add al, 10 + mov _bullet_template.speed, al mov al, byte_2D01E mov ah, 0 push ax @@ -24440,15 +24401,14 @@ loc_190DE: or dx, dx jnz short loc_1915B mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte_266EF, 5 - mov byte_266F0, 9 - mov byte_266ED, 0 - mov byte_266E2, 1 - push 0Fh - call randring2_next16_and - add al, 20h ; ' ' - mov byte_266EE, al - mov byte_266F2, 0FFh + mov _bullet_template.count, 5 + mov _bullet_template.BT_delta.spread_angle, 9 + mov _bullet_template.BT_angle, 0 + mov _bullet_template.spawn_type, 1 + call randring2_next16_and pascal, 0Fh + add al, (2 shl 4) + mov _bullet_template.speed, al + mov _bullet_template.BT_special_motion, 0FFh call fp_2D004 call fp_2D002 @@ -24501,9 +24461,9 @@ loc_191B3: cmp si, 6 jl short loc_191A8 mov ax, _boss_pos.cur.x - mov word ptr dword_2A8C6, ax + mov point_2A8C6.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_2A8C6+2, ax + mov point_2A8C6.y, ax mov word_2A8D0, 20h ; ' ' mov word_2A8CE, 1400h mov byte_2A8D3, 0FDh @@ -24578,18 +24538,18 @@ loc_19279: inc _boss_mode_change cmp _boss_mode_change, 10 ja short loc_19317 - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax - mov byte_266E3, 37h ; '7' + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE mov _bullet_template.pattern, BP_RING - mov byte_266EF, 16h + mov _bullet_template.count, 22 call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D004 - mov byte_266EE, 10h + mov _bullet_template.speed, (1 shl 4) mov al, _boss_mode_change mov ah, 0 mov di, ax @@ -24605,12 +24565,12 @@ loc_192DE: loc_192E2: call sub_1CFA2 inc si - mov al, byte_266EE + mov al, _bullet_template.speed add al, 8 - mov byte_266EE, al - mov al, byte_266ED - add al, 0FDh - mov byte_266ED, al + mov _bullet_template.speed, al + mov al, _bullet_template.BT_angle + add al, -3 + mov _bullet_template.BT_angle, al loc_192F6: cmp si, di @@ -24702,18 +24662,18 @@ loc_19387: inc _boss_mode_change cmp _boss_mode_change, 10 ja short loc_19425 - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax - mov byte_266E3, 37h ; '7' + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE mov _bullet_template.pattern, BP_RING - mov byte_266EF, 16h + mov _bullet_template.count, 22 call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D004 - mov byte_266EE, 10h + mov _bullet_template.speed, (1 shl 4) mov al, _boss_mode_change mov ah, 0 mov di, ax @@ -24729,12 +24689,12 @@ loc_193EC: loc_193F0: call sub_1CFA2 inc si - mov al, byte_266EE + mov al, _bullet_template.speed add al, 8 - mov byte_266EE, al - mov al, byte_266ED + mov _bullet_template.speed, al + mov al, _bullet_template.BT_angle add al, 3 - mov byte_266ED, al + mov _bullet_template.BT_angle, al loc_19404: cmp si, di @@ -25073,21 +25033,21 @@ loc_196BF: loc_196C2: cmp _stage_frame_mod2, 0 jnz short loc_19712 - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov _bullet_template.pattern, BP_RING - mov byte_266EF, 2 + mov _bullet_template.count, 2 mov al, _boss_angle - mov byte_266ED, al - mov byte_266EE, 1Eh + mov _bullet_template.BT_angle, al + mov _bullet_template.speed, (1 shl 4) + 14 call fp_2D000 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 5 - mov byte_266ED, al - mov byte_266EE, 14h + mov _bullet_template.BT_angle, al + mov _bullet_template.speed, (1 shl 4) + 4 call fp_2D000 mov al, _boss_mode_change add _boss_angle, al @@ -25124,34 +25084,34 @@ sub_19720 proc near push ax call iatan2 mov _boss_angle, al - mov byte_266EE, 10h + mov _bullet_template.speed, (1 shl 4) loc_19751: cmp _stage_frame_mod4, 0 jnz short loc_197AD - mov byte_266E2, 4 - mov byte_266E3, 34h ; '4' + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_WHITE mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 3 - mov byte_266F0, 0Ch - mov byte_266F2, 0FFh + mov _bullet_template.count, 3 + mov _bullet_template.BT_delta.spread_angle, 0Ch + mov _bullet_template.BT_special_motion, 0FFh mov al, _boss_angle - add al, 0E0h - mov byte_266ED, al + add al, -20h + mov _bullet_template.BT_angle, al call fp_2D004 call fp_2D002 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 40h - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D002 call snd_se_play pascal, 3 - mov al, byte_266EE + mov al, _bullet_template.speed add al, 6 - mov byte_266EE, al + mov _bullet_template.speed, al loc_197AD: cmp _boss_phase_frame, 118 @@ -25176,16 +25136,16 @@ sub_197BB proc near jnz short loc_19812 cmp _stage_frame_mod8, 0 jnz short loc_19806 - mov byte_266E2, 2 - mov byte_266E3, 34h ; '4' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_WHITE mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 10h - mov byte_266EE, 20h ; ' ' - mov byte_266ED, 0 + mov _bullet_template.count, 16 + mov _bullet_template.speed, (2 shl 4) + mov _bullet_template.BT_angle, 0 call fp_2D004 call fp_2D000 call snd_se_play pascal, 9 @@ -25213,21 +25173,21 @@ sub_19814 proc near jnz short loc_19876 cmp _stage_frame_mod8, 0 jnz short loc_1986A - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 mov ax, _boss_pos.cur.x add ax, (-32 shl 4) - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov _bullet_template.pattern, BP_RING - mov byte_266EF, 8 - mov byte_266EE, 1Eh - mov al, byte_266ED + mov _bullet_template.count, 8 + mov _bullet_template.speed, (1 shl 4) + 14 + mov al, _bullet_template.BT_angle add al, 8 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D004 call fp_2D000 - add point_266E4.x, (64 shl 4) + add _bullet_template.BT_origin.x, (64 shl 4) call fp_2D000 call snd_se_play pascal, 9 @@ -25307,27 +25267,27 @@ loc_198F0: jz loc_19989 loc_19909: - mov byte_266E3, 34h ; '4' + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_WHITE mov ax, _boss_pos.cur.x add ax, (-32 shl 4) - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov _bullet_template.pattern, BP_RANDOM_ANGLE - mov byte_266EF, 1 + mov _bullet_template.count, 1 cmp _boss_hp, 700 jg short loc_19942 cmp _rank, RANK_LUNATIC jnb short loc_1993D - mov byte_266EF, 2 + mov _bullet_template.count, 2 jmp short loc_19942 ; --------------------------------------------------------------------------- loc_1993D: - mov byte_266EF, 4 + mov _bullet_template.count, 4 loc_19942: - mov byte_266EE, 20h ; ' ' + mov _bullet_template.speed, (2 shl 4) push 1 call randring2_next16_and or ax, ax @@ -25340,12 +25300,12 @@ loc_19954: mov al, 4 loc_19956: - mov byte_266E2, al + mov _bullet_template.spawn_type, al call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D004 call fp_2D000 - add point_266E4.x, (64 shl 4) + add _bullet_template.BT_origin.x, (64 shl 4) push 1 call randring2_next16_and or ax, ax @@ -25358,9 +25318,9 @@ loc_1997A: mov al, 4 loc_1997C: - mov byte_266E2, al + mov _bullet_template.spawn_type, al call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 loc_19989: @@ -25386,10 +25346,10 @@ sub_1998B proc near jnz short loc_199BC loc_199AD: - mov ax, point_266E4.x - mov word ptr dword_2A8C6, ax - mov ax, point_266E4.y - mov word ptr dword_2A8C6+2, ax + mov ax, _bullet_template.BT_origin.x + mov point_2A8C6.x, ax + mov ax, _bullet_template.BT_origin.y + mov point_2A8C6.y, ax call sub_13B21 loc_199BC: @@ -25403,19 +25363,19 @@ loc_199BC: jnz short loc_199ED loc_199DB: - call circles_add_shrinking pascal, point_266E4.x, point_266E4.y + call circles_add_shrinking pascal, _bullet_template.BT_origin.x, _bullet_template.BT_origin.y mov _circles_color, 0Fh loc_199ED: cmp _stage_frame_mod4, 0 jnz loc_19AA1 - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 mov _bullet_template.pattern, BP_SINGLE mov al, _boss_angle - add al, 0F9h + add al, -7 mov _boss_angle, al - mov byte_266EE, 20h ; ' ' - mov byte_266ED, al + mov _bullet_template.speed, (2 shl 4) + mov _bullet_template.BT_angle, al call fp_2D004 call sub_1CFA2 cmp _boss_phase_frame, 128 @@ -25426,51 +25386,51 @@ loc_199ED: jl short loc_19A44 cmp _boss_phase_frame, 320 jge short loc_19A56 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 40h - mov byte_266ED, al + mov _bullet_template.BT_angle, al call sub_1CFA2 loc_19A44: - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 40h - mov byte_266ED, al + mov _bullet_template.BT_angle, al call sub_1CFA2 loc_19A4F: - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 40h jmp short loc_19A9B ; --------------------------------------------------------------------------- loc_19A56: - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 40h - mov byte_266ED, al + mov _bullet_template.BT_angle, al call sub_1CFA2 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 40h - mov byte_266ED, al + mov _bullet_template.BT_angle, al call sub_1CFA2 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 40h - mov byte_266ED, al + mov _bullet_template.BT_angle, al call sub_1CFA2 - mov al, byte_266EE - add al, 10h - mov byte_266EE, al - mov byte_266E2, 2 - mov byte_266E3, 34h ; '4' - mov al, byte_266ED + mov al, _bullet_template.speed + add al, (1 shl 4) + mov _bullet_template.speed, al + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_WHITE + mov al, _bullet_template.BT_angle neg al - add al, 0E0h - mov byte_266ED, al + add al, -20h + mov _bullet_template.BT_angle, al call sub_1CFA2 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 80h loc_19A9B: - mov byte_266ED, al + mov _bullet_template.BT_angle, al call sub_1CFA2 loc_19AA1: @@ -25488,9 +25448,9 @@ orange_update proc far mov bp, sp push si mov ax, _boss_pos.cur.x - mov word ptr dword_2A8C6, ax + mov point_2A8C6.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_2A8C6+2, ax + mov point_2A8C6.y, ax mov al, _boss_phase mov ah, 0 mov bx, ax @@ -25519,10 +25479,10 @@ loc_19AEF: call snd_se_play pascal, 8 mov ax, _boss_pos.cur.x add ax, (8 shl 4) - mov word ptr dword_2A8C6, ax + mov point_2A8C6.x, ax mov ax, _boss_pos.cur.y add ax, (-40 shl 4) - mov word ptr dword_2A8C6+2, ax + mov point_2A8C6.y, ax mov word_2A8CE, 1400h mov word_2A8D0, 20h ; ' ' mov byte_2A8D3, 3 @@ -25568,15 +25528,15 @@ loc_19B88: mov al, _boss_sprite add al, 2 mov _boss_sprite, al - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov _bullet_template.pattern, BP_RING - mov byte_266EF, 10h - mov byte_266EE, 40h - mov byte_266ED, 0 + mov _bullet_template.count, 16 + mov _bullet_template.speed, (4 shl 4) + mov _bullet_template.BT_angle, 0 call fp_2D004 xor si, si jmp short loc_19BF6 @@ -25584,9 +25544,9 @@ loc_19B88: loc_19BE9: call fp_2D000 - mov al, byte_266EE - add al, 0F0h - mov byte_266EE, al + mov al, _bullet_template.speed + add al, (-1 shl 4) + mov _bullet_template.speed, al inc si loc_19BF6: @@ -25709,10 +25669,10 @@ loc_19CC8: loc_19CF0: mov ax, _boss_pos.cur.x add ax, (8 shl 4) - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-16 shl 4) - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov al, _boss_mode mov ah, 0 or ax, ax @@ -25725,16 +25685,16 @@ loc_19CF0: loc_19D15: cmp _boss_phase_frame, 96 jnz short loc_19D2B - mov ax, point_266E4.x - mov word ptr dword_2A8C6, ax - mov ax, point_266E4.y - mov word ptr dword_2A8C6+2, ax + mov ax, _bullet_template.BT_origin.x + mov point_2A8C6.x, ax + mov ax, _bullet_template.BT_origin.y + mov point_2A8C6.y, ax call sub_13B21 loc_19D2B: cmp _boss_phase_frame, 112 jnz short loc_19D44 - call circles_add_shrinking pascal, point_266E4.x, point_266E4.y + call circles_add_shrinking pascal, _bullet_template.BT_origin.x, _bullet_template.BT_origin.y mov _circles_color, 0Fh loc_19D44: @@ -26438,23 +26398,23 @@ loc_1A2BE: test byte ptr [si+0Eh], 1Fh jnz short loc_1A309 mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (32 shl 4) - mov point_266E4.y, ax - mov byte_266E2, 2 - mov byte_266E3, 3Ch ; '<' + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 20h ; ' ' - mov byte_266EE, 10h - mov byte_266ED, 0 + mov _bullet_template.count, 32 + mov _bullet_template.speed, (1 shl 4) + mov _bullet_template.BT_angle, 0 call fp_2D004 call fp_2D000 mov [bp+var_6], 40h loc_1A309: - mov byte_266E2, 1 - mov byte_266F0, 0Ch + mov _bullet_template.spawn_type, 1 + mov _bullet_template.BT_delta.spread_angle, 0Ch mov ax, _stage_frame mov bx, 5 xor dx, dx @@ -26470,8 +26430,8 @@ loc_1A309: loc_1A32D: mov al, [bp+var_5] add al, [bp+var_6] - mov byte_266ED, al - push offset point_266E4 + mov _bullet_template.BT_angle, al + push offset _bullet_template.BT_origin push word ptr [si+2] push word ptr [si+4] push [bp+var_2] @@ -26479,21 +26439,21 @@ loc_1A32D: mov ah, 0 push ax call vector2_at - sub point_266E4.x, (2 shl 4) - sub point_266E4.y, (1 shl 4) + sub _bullet_template.BT_origin.x, (2 shl 4) + sub _bullet_template.BT_origin.y, (1 shl 4) mov ax, (1 shl 4) - imul point_266E4.x - mov point_266E4.x, ax + imul _bullet_template.BT_origin.x + mov _bullet_template.BT_origin.x, ax mov ax, (1 shl 4) - imul point_266E4.y - mov point_266E4.y, ax + imul _bullet_template.BT_origin.y + mov _bullet_template.BT_origin.y, ax mov _bullet_template.pattern, BP_STACK - mov byte_266EF, 8 - mov byte_266EE, 10h + mov _bullet_template.count, 8 + mov _bullet_template.speed, (1 shl 4) call fp_2D000 mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 4 - mov byte_266EE, 30h ; '0' + mov _bullet_template.count, 4 + mov _bullet_template.speed, (3 shl 4) call fp_2D000 inc di mov al, [bp+var_5] @@ -26641,10 +26601,10 @@ loc_1A470: cmp byte_25A1B, 0 jz short loc_1A4A0 mov byte_25A1B, 2 - mov ax, 1800h + mov ax, (PLAYFIELD_W shl 4) sub ax, si - mov word_25A0C, ax - mov word_25A0E, di + mov point_25A0C.x, ax + mov point_25A0C.y, di jmp short loc_1A4A0 ; --------------------------------------------------------------------------- @@ -27415,17 +27375,17 @@ loc_1A92A: mov word_2A8CE, 1400h mov ax, _boss_pos.cur.y add ax, (-4 shl 4) - mov word ptr dword_2A8C6+2, ax + mov point_2A8C6.y, ax mov ax, _boss_pos.cur.x add ax, (24 shl 4) - mov word ptr dword_2A8C6, ax + mov point_2A8C6.x, ax mov word_2A8D0, 10h mov byte_2A8D2, 9 mov byte_2A8D3, 0FEh loc_1A959: call sub_13B21 ; jumptable 0001A926 case 20 - sub word ptr dword_2A8C6, 2C0h + sub point_2A8C6.x, (44 shl 4) mov byte_2A8D3, 2 loc_1A967: @@ -27437,19 +27397,19 @@ loc_1A967: loc_1A96C: mov byte_2A8D2, 8 ; jumptable 0001A926 case 18 call sub_13B21 - add word ptr dword_2A8C6, 2C0h + add point_2A8C6.x, (44 shl 4) mov byte_2A8D3, 0FEh jmp short loc_1A967 ; --------------------------------------------------------------------------- loc_1A981: - push word ptr dword_2A8C6 ; jumptable 0001A926 case 32 - push word ptr dword_2A8C6+2 + push point_2A8C6.x ; jumptable 0001A926 case 32 + push point_2A8C6.y call circles_add_shrinking - mov ax, word ptr dword_2A8C6 - add ax, 2C0h + mov ax, point_2A8C6.x + add ax, (44 shl 4) push ax - push word ptr dword_2A8C6+2 + push point_2A8C6.y call circles_add_shrinking mov _circles_color, 0Fh @@ -27513,9 +27473,9 @@ loc_1A9ED: mov word_2A8CE, 1400h mov ax, _boss_pos.cur.y add ax, (32 shl 4) - mov word ptr dword_2A8C6+2, ax + mov point_2A8C6.y, ax mov ax, _boss_pos.cur.x - mov word ptr dword_2A8C6, ax + mov point_2A8C6.x, ax mov word_2A8D0, 8 mov byte_2A8D2, 9 @@ -27531,8 +27491,8 @@ loc_1AA19: ; --------------------------------------------------------------------------- loc_1AA20: - push word ptr dword_2A8C6 ; jumptable 0001A9E9 case 64 - push word ptr dword_2A8C6+2 + push point_2A8C6.x ; jumptable 0001A9E9 case 64 + push point_2A8C6.y call circles_add_shrinking mov _circles_color, 0Fh @@ -27585,15 +27545,15 @@ loc_1AA68: loc_1AA80: mov ax, _boss_pos.cur.y ; jumptable 0001AA64 case 36 add ax, (32 shl 4) - mov word ptr dword_2A8C6+2, ax + mov point_2A8C6.y, ax mov ax, _boss_pos.cur.x - mov word ptr dword_2A8C6, ax + mov point_2A8C6.x, ax call sub_1A9B5 - mov ax, word_25A0E - add ax, 200h - mov word ptr dword_2A8C6+2, ax - mov ax, word_25A0C - mov word ptr dword_2A8C6, ax + mov ax, point_25A0C.y + add ax, (32 shl 4) + mov point_2A8C6.y, ax + mov ax, point_25A0C.x + mov point_2A8C6.x, ax call sub_1A9B5 leave retn @@ -27610,9 +27570,9 @@ loc_1AAAD: add ax, (32 shl 4) push ax call circles_add_shrinking - push word_25A0C - mov ax, word_25A0E - add ax, 200h + push point_25A0C.x + mov ax, point_25A0C.y + add ax, (32 shl 4) push ax call circles_add_shrinking mov _circles_color, 0Fh @@ -27661,9 +27621,9 @@ loc_1AB08: call snd_se_play pascal, 8 ; jumptable 0001AB04 case 16 mov word_2A8CE, 1400h mov ax, _boss_pos.cur.y - mov word ptr dword_2A8C6+2, ax + mov point_2A8C6.y, ax mov ax, _boss_pos.cur.x - mov word ptr dword_2A8C6, ax + mov point_2A8C6.x, ax mov word_2A8D0, 10h mov byte_2A8D2, 7 @@ -27679,8 +27639,8 @@ loc_1AB31: ; --------------------------------------------------------------------------- loc_1AB38: - push word ptr dword_2A8C6 ; jumptable 0001AB04 case 32 - push word ptr dword_2A8C6+2 + push point_2A8C6.x ; jumptable 0001AB04 case 32 + push point_2A8C6.y call circles_add_shrinking mov _circles_color, 0Fh @@ -27723,29 +27683,29 @@ loc_1AB6A: ; --------------------------------------------------------------------------- loc_1AB81: - mov byte_266EE, 28h ; '(' + mov _bullet_template.speed, (2 shl 4) + 8 loc_1AB86: - mov byte_266E2, 2 - mov byte_266E3, 3Bh ; ';' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_YELLOW mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-4 shl 4) - mov point_266E4.y, ax - mov byte_266ED, 0 + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.BT_angle, 0 mov _bullet_template.pattern, BP_RING - mov byte_266F2, 81h - mov byte_266EF, 14h + mov _bullet_template.BT_special_motion, 81h + mov _bullet_template.count, 20 mov byte_2CFF8, 0C0h call fp_2D004 call sub_1CFB5 mov byte_2CFF8, 40h call sub_1CFB5 call snd_se_play pascal, 9 - mov al, byte_266EE - add al, 10h - mov byte_266EE, al + mov al, _bullet_template.speed + add al, (1 shl 4) + mov _bullet_template.speed, al pop bp retn ; --------------------------------------------------------------------------- @@ -27781,19 +27741,19 @@ loc_1ABFF: call sub_1A6E5 cmp _boss_phase_frame, 80 jg loc_1AC96 - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 mov _bullet_template.pattern, BP_RING mov al, byte_2D01F - mov byte_266EF, al + mov _bullet_template.count, al mov al, byte ptr _boss_phase_frame shl al, 3 mov dl, 0 sub dl, al mov [bp+var_1], dl - mov byte_266EE, 28h ; '(' + mov _bullet_template.speed, (2 shl 4) + 8 mov al, [bp+var_1] - mov byte_266ED, al - push offset point_266E4 + mov _bullet_template.BT_angle, al + push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (34 shl 4) @@ -27804,7 +27764,7 @@ loc_1ABFF: mov al, 80h sub al, [bp+var_1] mov [bp+var_1], al - push offset point_266E4 + push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (34 shl 4) @@ -27815,9 +27775,9 @@ loc_1ABFF: cwd sub ax, dx sar ax, 1 - mov dl, 3Ch ; '<' + mov dl, (3 shl 4) + 12 sub dl, al - mov byte_266EE, dl + mov _bullet_template.speed, dl call fp_2D000 cmp _stage_frame_mod4, 0 jnz short loc_1AC96 @@ -27878,29 +27838,28 @@ loc_1ACD9: cwd idiv bx inc al - mov byte_266E2, al - mov byte_266E3, 3Ch ; '<' + mov _bullet_template.spawn_type, al + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED mov ax, _boss_pos.cur.y add ax, (-4 shl 4) - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED - mov byte_266EF, 4 - mov byte_266F2, 88h - push 18h - call randring2_next16_mod + mov _bullet_template.count, 4 + mov _bullet_template.BT_special_motion, 88h + call randring2_next16_mod pascal, (1 shl 4) + 8 add al, 8 - mov byte_266EE, al + mov _bullet_template.speed, al mov ax, _boss_pos.cur.x add ax, (-20 shl 4) - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al mov byte_2CFF7, 1 call fp_2D004 call sub_1CFB5 call randring2_next16 - mov byte_266ED, al - add point_266E4.x, (44 shl 4) + mov _bullet_template.BT_angle, al + add _bullet_template.BT_origin.x, (44 shl 4) call sub_1CFB5 call snd_se_play pascal, 9 jmp short loc_1AD6A @@ -27988,47 +27947,47 @@ sub_1ADDB proc near cmp _stage_frame_mod16, 0 jnz loc_1AE8D mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax cmp _boss_phase, 6 jnz short loc_1AE40 - mov byte_266E2, 2 - mov byte_266E3, 3Ch ; '<' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_RING - mov byte_266EF, 10h - mov byte_266EE, 1Eh + mov _bullet_template.count, 16 + mov _bullet_template.speed, (1 shl 4) + 14 call fp_2D004 call fp_2D000 - mov byte_266E2, 4 - mov byte_266E3, 39h ; '9' + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx add al, 2 - mov byte_266EF, al - mov byte_266EE, 22h ; '"' + mov _bullet_template.count, al + mov _bullet_template.speed, (2 shl 4) + 2 jmp short loc_1AE85 ; --------------------------------------------------------------------------- loc_1AE40: - mov byte_266E2, 4 - mov byte_266E3, 4Ch ; 'L' - mov byte_266ED, 0 + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE + mov _bullet_template.BT_angle, 0 mov _bullet_template.pattern, BP_STACK_AIMED - mov byte_266EF, 7 - mov byte_266EE, 20h ; ' ' - mov byte_266F0, 0Ah + mov _bullet_template.count, 7 + mov _bullet_template.speed, (2 shl 4) + mov _bullet_template.BT_delta.spread_angle, 0Ah call fp_2D004 call sub_1CFA2 call snd_se_play pascal, 15 - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED - mov byte_266EF, 4 - mov byte_266EE, 18h + mov _bullet_template.count, 4 + mov _bullet_template.speed, (1 shl 4) + 8 loc_1AE85: call fp_2D004 @@ -28061,7 +28020,7 @@ loc_1AEA5: call sub_1A61C loc_1AEAF: - mov byte_266EE, 10h + mov _bullet_template.speed, (1 shl 4) jmp loc_1AF59 ; --------------------------------------------------------------------------- @@ -28074,27 +28033,27 @@ loc_1AEB7: cmp _stage_frame_mod8, 0 jnz loc_1AF59 mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax - mov byte_266E2, 4 - mov byte_266E3, 4Ch ; 'L' + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE mov _bullet_template.pattern, BP_SPREAD - mov byte_266F0, 8 - mov byte_266EF, 3 + mov _bullet_template.BT_delta.spread_angle, 8 + mov _bullet_template.count, 3 call fp_2D004 - mov byte_266ED, 60h + mov _bullet_template.BT_angle, 60h call fp_2D000 - mov byte_266ED, 20h ; ' ' + mov _bullet_template.BT_angle, 20h call fp_2D000 - mov ax, word_25A0C - mov point_266E4.x, ax + mov ax, point_25A0C.x + mov _bullet_template.BT_origin.x, ax call fp_2D000 - mov byte_266ED, 60h + mov _bullet_template.BT_angle, 60h call fp_2D000 - mov al, byte_266EE - add al, 0Ch - mov byte_266EE, al + mov al, _bullet_template.speed + add al, 12 + mov _bullet_template.speed, al call snd_se_play pascal, 3 jmp short loc_1AF59 ; --------------------------------------------------------------------------- @@ -28127,16 +28086,16 @@ loc_1AF59: mov word_25626, 28h ; '(' mov byte_25628, 8 mov ax, _boss_pos.cur.x - mov word_2561A, ax + mov point_2561A.x, ax mov ax, _boss_pos.cur.y - add ax, 200h - mov word_2561C, ax + add ax, (32 shl 4) + mov point_2561A.y, ax call sub_15DBD - mov ax, word_25A0C - mov word_2561A, ax - mov ax, word_25A0E - add ax, 280h - mov word_2561C, ax + mov ax, point_25A0C.x + mov point_2561A.x, ax + mov ax, point_25A0C.y + add ax, (40 shl 4) + mov point_2561A.y, ax call sub_15DBD loc_1AFA6: @@ -28180,39 +28139,36 @@ loc_1AFD0: jnz loc_1B094 mov ax, _boss_pos.cur.y add ax, (32 shl 4) - mov point_266E4.y, ax - mov byte_266E2, 2 - mov byte_266E3, 5Ch + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_D_YELLOW mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 5 - push 1Fh - call randring2_next16_and - add al, 0Ch - mov byte_266EE, al - mov byte_266F0, 10h + mov _bullet_template.count, 5 + call randring2_next16_and pascal, 1Fh + add al, 12 + mov _bullet_template.speed, al + mov _bullet_template.BT_delta.spread_angle, 10h mov al, byte_2D02D mov ah, 0 add ax, ax - push ax - call randring2_next16_mod + call randring2_next16_mod pascal, ax mov dl, 40h sub dl, byte_2D02D add al, dl - mov byte_266ED, al + mov _bullet_template.BT_angle, al mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax call fp_2D000 mov al, byte_2D02D mov ah, 0 add ax, ax - push ax - call randring2_next16_mod + call randring2_next16_mod pascal, ax mov dl, 40h sub dl, byte_2D02D add al, dl - mov byte_266ED, al - mov ax, word_25A0C - mov point_266E4.x, ax + mov _bullet_template.BT_angle, al + mov ax, point_25A0C.x + mov _bullet_template.BT_origin.x, ax call fp_2D000 call snd_se_play pascal, 9 mov al, byte_2D02D @@ -28283,7 +28239,7 @@ loc_1B0E0: cmp _boss_phase_frame, 112 jl short loc_1B125 mov al, _boss_angle - add byte_266ED, al + add _bullet_template.BT_angle, al jmp short loc_1B125 ; --------------------------------------------------------------------------- @@ -28293,7 +28249,7 @@ loc_1B0F0: cmp _boss_phase_frame, 150 jge short loc_1B120 mov al, _boss_angle - sub byte_266ED, al + sub _bullet_template.BT_angle, al cmp _stage_frame_mod2, 0 jz short loc_1B110 call sub_1CFA2 @@ -28330,20 +28286,19 @@ loc_1B13C: push ax call iatan2 add al, 10h - mov byte_266ED, al - mov byte_266E2, 4 - mov byte_266E3, 3Dh ; '=' + mov _bullet_template.BT_angle, al + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_RED mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov _bullet_template.pattern, BP_RING - mov byte_266EF, 8 - mov byte_266EE, 90h + mov _bullet_template.count, 8 + mov _bullet_template.speed, (9 shl 4) cmp _rank, RANK_EASY jz short loc_1B196 - push 1 - call randring2_next16_and + call randring2_next16_and pascal, 1 or ax, ax jz short loc_1B18F mov al, 1 @@ -28351,7 +28306,7 @@ loc_1B13C: ; --------------------------------------------------------------------------- loc_1B18F: - mov al, 0FFh + mov al, -1 loc_1B191: mov _boss_angle, al @@ -28399,19 +28354,19 @@ sub_1B1B1 proc near cmp _stage_frame_mod8, 0 jnz short loc_1B213 call snd_se_play pascal, 3 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 2 - mov byte_266ED, al + mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_RING - mov byte_266E2, 2 - mov byte_266E3, 4Ch ; 'L' - mov byte_266EE, 30h ; '0' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE + mov _bullet_template.speed, (3 shl 4) mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx add al, 4 - mov byte_266EF, al + mov _bullet_template.count, al call fp_2D004 call fp_2D000 jmp short loc_1B213 @@ -28502,34 +28457,34 @@ var_1 = byte ptr -1 test [bp+var_1], 3 jnz short loc_1B2ED mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov al, 3 - sub al, byte_266E2 - mov byte_266E2, al - mov byte_266E3, 3Ch ; '<' + sub al, _bullet_template.spawn_type + mov _bullet_template.spawn_type, al + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED mov _bullet_template.pattern, BP_RING - mov byte_266EF, 8 + mov _bullet_template.count, 8 mov al, [bp+var_1] - add al, 20h ; ' ' - mov byte_266EE, al + add al, (2 shl 4) + mov _bullet_template.speed, al call fp_2D004 - mov al, 82h - sub al, byte_266ED - mov byte_266ED, al + mov al, -7Eh + sub al, _bullet_template.BT_angle + mov _bullet_template.BT_angle, al call sub_1CFA2 mov al, 80h - sub al, byte_266ED - mov byte_266ED, al + sub al, _bullet_template.BT_angle + mov _bullet_template.BT_angle, al call sub_1CFA2 loc_1B2ED: cmp [bp+var_1], 0 jnz short locret_1B311 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 8 - mov byte_266ED, al + mov _bullet_template.BT_angle, al mov word_2A8D0, 8 mov byte_2A8D2, 9 mov al, byte_2A8D3 @@ -28573,32 +28528,32 @@ loc_1B339: mov _boss_sprite, 140 cmp _stage_frame_mod16, 0 jnz loc_1B3DD - mov byte_266E2, 2 - mov byte_266E3, 4Ch ; 'L' - mov byte_266EE, 28h ; '(' - mov byte_266F0, 0Eh + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE + mov _bullet_template.speed, (2 shl 4) + 8 + mov _bullet_template.BT_delta.spread_angle, 0Eh test byte ptr _stage_frame, 1Fh jnz short loc_1B382 - mov byte_266EF, 0Ah + mov _bullet_template.count, 10 mov _bullet_template.pattern, BP_SPREAD - mov byte_266ED, 40h + mov _bullet_template.BT_angle, 40h jmp short loc_1B391 ; --------------------------------------------------------------------------- loc_1B382: - mov byte_266EF, 7 + mov _bullet_template.count, 7 mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte_266ED, 0 + mov _bullet_template.BT_angle, 0 loc_1B391: mov ax, _boss_pos.cur.y add ax, (32 shl 4) - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax call fp_2D000 - mov ax, word_25A0C - mov point_266E4.x, ax + mov ax, point_25A0C.x + mov _bullet_template.BT_origin.x, ax call fp_2D000 call snd_se_play pascal, 3 jmp short loc_1B3DD @@ -28638,9 +28593,9 @@ sub_1B3E2 proc near jnz short loc_1B42B mov word_257E2, 180h mov word_257E4, 300h - mov ax, word_25A0C + mov ax, point_25A0C.x mov word ptr dword_257DE, ax - mov ax, word_25A0E + mov ax, point_25A0C.y mov word ptr dword_257DE+2, ax call sub_105B9 mov byte_25A1E, al @@ -29114,8 +29069,8 @@ loc_1B82D: cmp _boss_phase_frame, 128 jl loc_1B8EA inc _boss_phase - mov byte_266E2, 1 - mov byte_266ED, 0 + mov _bullet_template.spawn_type, 1 + mov _bullet_template.BT_angle, 0 jmp loc_1B8EA ; --------------------------------------------------------------------------- @@ -29675,24 +29630,24 @@ sub_1BD4B proc near cmp _boss_phase_frame, 16 jnz short loc_1BD64 call sub_1BC3C - mov byte_266ED, 0C0h + mov _bullet_template.BT_angle, -40h loc_1BD64: cmp _boss_phase_frame, 16 jle short loc_1BDB2 cmp _stage_frame_mod16, 0 jnz short loc_1BDA0 - mov byte_266E2, 2 - mov byte_266E3, 5Ch - mov byte_266EE, 30h ; '0' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_D_YELLOW + mov _bullet_template.speed, (3 shl 4) mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 5 - mov byte_266F0, 10h + mov _bullet_template.count, 5 + mov _bullet_template.BT_delta.spread_angle, 10h call fp_2D004 call fp_2D000 - mov al, byte_266ED - add al, 0F0h - mov byte_266ED, al + mov al, _bullet_template.BT_angle + add al, -10h + mov _bullet_template.BT_angle, al loc_1BDA0: cmp byte_25A26, 0 @@ -29743,9 +29698,9 @@ loc_1BDDE: loc_1BDE2: mov ax, _boss_pos.cur.x - mov word ptr dword_2A8C6, ax + mov point_2A8C6.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_2A8C6+2, ax + mov point_2A8C6.y, ax mov word_2A8D0, 8 mov word_2A8CE, 0C00h mov byte_2A8D2, 0Fh @@ -29801,12 +29756,12 @@ sub_1BE43 proc near mov bp, sp mov _boss_mode, 0FFh mov _boss_phase_frame, 0 - mov byte_266ED, 0 - mov byte_266E2, 5 - mov byte_266E3, 39h ; '9' - mov byte_266EE, 20h ; ' ' + mov _bullet_template.BT_angle, 0 + mov _bullet_template.spawn_type, 5 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 30h ; '0' + mov _bullet_template.count, 48 call fp_2D004 call sub_1CFA2 pop bp @@ -29856,14 +29811,14 @@ loc_1BEB9: idiv bx or dx, dx jnz loc_1BF50 - mov byte_266E2, 1 - mov byte_266EE, 40h + mov _bullet_template.spawn_type, 1 + mov _bullet_template.speed, (4 shl 4) mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 2 - mov byte_266F0, 0Ch + mov _bullet_template.count, 2 + mov _bullet_template.BT_delta.spread_angle, 0Ch call fp_2D004 call fp_2D000 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 4 jmp short loc_1BF40 ; --------------------------------------------------------------------------- @@ -29871,7 +29826,7 @@ loc_1BEB9: loc_1BEF7: cmp _boss_phase_frame, 72 jnz short loc_1BF05 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 40h jmp short loc_1BF40 ; --------------------------------------------------------------------------- @@ -29885,18 +29840,18 @@ loc_1BF05: idiv bx or dx, dx jnz short loc_1BF50 - mov byte_266E2, 1 - mov byte_266EE, 40h + mov _bullet_template.spawn_type, 1 + mov _bullet_template.speed, (4 shl 4) mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 2 - mov byte_266F0, 0Ch + mov _bullet_template.count, 2 + mov _bullet_template.BT_delta.spread_angle, 0Ch call fp_2D004 call fp_2D000 - mov al, byte_266ED - add al, 0FEh + mov al, _bullet_template.BT_angle + add al, -2 loc_1BF40: - mov byte_266ED, al + mov _bullet_template.BT_angle, al pop bp retn ; --------------------------------------------------------------------------- @@ -29934,11 +29889,11 @@ loc_1BF66: idiv bx or dx, dx jnz short loc_1BF97 - mov byte_266ED, 0 - mov byte_266E2, 1 - mov byte_266EE, 20h ; ' ' + mov _bullet_template.BT_angle, 0 + mov _bullet_template.spawn_type, 1 + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 8 + mov _bullet_template.count, 8 call fp_2D000 loc_1BF97: @@ -29995,24 +29950,24 @@ loc_1BFEB: idiv bx or dx, dx jnz short loc_1C042 - mov byte_266E2, 4 + mov _bullet_template.spawn_type, 4 mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx - add al, 2Ch ; ',' - mov byte_266EE, al + add al, (2 shl 4) + 12 + mov _bullet_template.speed, al mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 4 - mov byte_266F0, 0Ch - mov byte_266E3, 34h ; '4' + mov _bullet_template.count, 4 + mov _bullet_template.BT_delta.spread_angle, 0Ch + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_WHITE call fp_2D004 call fp_2D000 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 0Bh loc_1C033: - mov byte_266ED, al + mov _bullet_template.BT_angle, al pop bp retn ; --------------------------------------------------------------------------- @@ -30042,11 +29997,11 @@ sub_1C044 proc near cmp _boss_phase_frame, 16 jnz short loc_1C07C call sub_1BC3C - mov byte_266ED, 40h - mov byte_266E2, 4 - mov byte_266EE, 40h + mov _bullet_template.BT_angle, 40h + mov _bullet_template.spawn_type, 4 + mov _bullet_template.speed, (4 shl 4) mov _bullet_template.pattern, BP_SINGLE_AIMED - mov byte_266E3, 37h ; '7' + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE call fp_2D004 loc_1C07C: @@ -30055,14 +30010,14 @@ loc_1C07C: cmp _stage_frame_mod8, 0 jnz short loc_1C0AB call fp_2D000 - mov al, byte_266ED + mov al, _bullet_template.BT_angle neg al - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 - mov al, byte_266ED + mov al, _bullet_template.BT_angle neg al - add al, 0FDh - mov byte_266ED, al + add al, -3 + mov _bullet_template.BT_angle, al call snd_se_play pascal, 3 loc_1C0AB: @@ -30121,24 +30076,24 @@ loc_1C0FF: idiv bx or dx, dx jnz short loc_1C162 - mov byte_266E2, 4 + mov _bullet_template.spawn_type, 4 mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx - add al, 2Ch ; ',' - mov byte_266EE, al + add al, (2 shl 4) + 12 + mov _bullet_template.speed, al mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 4 - mov byte_266F0, 0Ch - mov byte_266E3, 34h ; '4' + mov _bullet_template.count, 4 + mov _bullet_template.BT_delta.spread_angle, 0Ch + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_WHITE call fp_2D004 call fp_2D000 - mov al, byte_266ED - add al, 0F5h + mov al, _bullet_template.BT_angle + add al, -0Bh loc_1C147: - mov byte_266ED, al + mov _bullet_template.BT_angle, al pop bp retn ; --------------------------------------------------------------------------- @@ -30146,7 +30101,7 @@ loc_1C147: loc_1C14C: cmp _boss_phase_frame, 80 jnz short loc_1C158 - mov al, byte_266ED + mov al, _bullet_template.BT_angle jmp short loc_1C0E7 ; --------------------------------------------------------------------------- @@ -30175,11 +30130,11 @@ sub_1C164 proc near cmp _boss_phase_frame, 16 jnz short loc_1C19C call sub_1BC3C - mov byte_266ED, 0 - mov byte_266E2, 1 - mov byte_266EE, 20h ; ' ' + mov _bullet_template.BT_angle, 0 + mov _bullet_template.spawn_type, 1 + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 10h + mov _bullet_template.count, 16 call fp_2D004 loc_1C19C: @@ -30220,29 +30175,29 @@ sub_1C1CF proc near jz short loc_1C245 cmp ax, 2 jnz short loc_1C24F - mov byte_266E2, 1 - mov byte_266EE, 20h ; ' ' + mov _bullet_template.spawn_type, 1 + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_RING - mov byte_266EF, 10h + mov _bullet_template.count, 16 call randring2_next16 - mov byte_266ED, al - sub point_266E4.x, (32 shl 4) + mov _bullet_template.BT_angle, al + sub _bullet_template.BT_origin.x, (32 shl 4) call fp_2D004 call fp_2D000 call randring2_next16 - mov byte_266ED, al - add point_266E4.x, (64 shl 4) + mov _bullet_template.BT_angle, al + add _bullet_template.BT_origin.x, (64 shl 4) call fp_2D000 call randring2_next16 loc_1C21B: - mov byte_266ED, al - sub point_266E4.x, (32 shl 4) - sub point_266E4.y, (32 shl 4) + mov _bullet_template.BT_angle, al + sub _bullet_template.BT_origin.x, (32 shl 4) + sub _bullet_template.BT_origin.y, (32 shl 4) call fp_2D000 call randring2_next16 - mov byte_266ED, al - add point_266E4.y, (64 shl 4) + mov _bullet_template.BT_angle, al + add _bullet_template.BT_origin.y, (64 shl 4) call fp_2D000 call snd_se_play pascal, 9 @@ -30280,12 +30235,12 @@ loc_1C26C: idiv bx or dx, dx jnz short loc_1C2AD - mov byte_266E2, 2 - mov byte_266E3, 4Ch ; 'L' - mov byte_266EE, 38h ; '8' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE + mov _bullet_template.speed, (3 shl 4) + 8 mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 10h - mov byte_266ED, 0 + mov _bullet_template.count, 16 + mov _bullet_template.BT_angle, 0 call fp_2D004 call fp_2D000 call snd_se_play pascal, 3 @@ -30293,10 +30248,10 @@ loc_1C26C: loc_1C2AD: cmp _boss_hp, 200 jg short loc_1C2D1 - mov byte_266E2, 1 - mov byte_266EE, 20h ; ' ' + mov _bullet_template.spawn_type, 1 + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_RANDOM_ANGLE - mov byte_266EF, 2 + mov _bullet_template.count, 2 call fp_2D004 call fp_2D000 @@ -30450,9 +30405,9 @@ loc_1C400: loc_1C445: mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov al, _boss_mode mov ah, 0 mov [bp+var_2], ax @@ -31443,38 +31398,38 @@ sub_1CC33 proc near jmp cs:off_1CC8C[bx] @@stack: - mov al, byte_266F0 + mov al, _bullet_template.BT_delta.stack_speed mov ah, 0 mov bx, 4 cwd idiv bx - mov dl, byte_266F0 + mov dl, _bullet_template.BT_delta.stack_speed sub dl, al - mov byte_266F0, dl - cmp byte_266EF, 2 + mov _bullet_template.BT_delta.stack_speed, dl + cmp _bullet_template.count, 2 jb short @@ret - dec byte_266EF + dec _bullet_template.count pop bp retn ; --------------------------------------------------------------------------- @@spread: - cmp byte_266EF, 3 + cmp _bullet_template.count, 3 jb short @@ret - mov al, byte_266EF - add al, 0FEh + mov al, _bullet_template.count + add al, -2 jmp short loc_1CC86 ; --------------------------------------------------------------------------- loc_1CC7C: - mov al, byte_266EF + mov al, _bullet_template.count mov ah, 0 cwd sub ax, dx sar ax, 1 loc_1CC86: - mov byte_266EF, al + mov _bullet_template.count, al @@ret: pop bp @@ -31543,57 +31498,57 @@ loc_1CCD9: mov _bullet_template.pattern, BP_STACK loc_1CCE9: - mov byte_266EF, 2 - mov byte_266F0, 6 + mov _bullet_template.count, 2 + mov _bullet_template.BT_delta.stack_speed, 6 leave retn ; --------------------------------------------------------------------------- @@stack: - mov al, byte_266F0 + mov al, _bullet_template.BT_delta.stack_speed mov ah, 0 cwd sub ax, dx sar ax, 1 - add al, byte_266F0 - mov byte_266F0, al + add al, _bullet_template.BT_delta.stack_speed + mov _bullet_template.BT_delta.stack_speed, al leave retn ; --------------------------------------------------------------------------- @@spread: - mov al, byte_266EF + mov al, _bullet_template.count add al, 2 jmp short loc_1CD40 ; --------------------------------------------------------------------------- @@ring: - mov al, byte_266EF + mov al, _bullet_template.count mov ah, 0 imul ax, 3 - mov byte_266EF, al + mov _bullet_template.count, al mov ah, 0 cwd sub ax, dx sar ax, 1 - mov byte_266EF, al - cmp byte_266EF, 30h ; '0' + mov _bullet_template.count, al + cmp _bullet_template.count, 48 jbe short locret_1CD43 ; default - mov byte_266EF, 30h ; '0' + mov _bullet_template.count, 48 leave retn ; --------------------------------------------------------------------------- @@random: - mov al, byte_266EF + mov al, _bullet_template.count mov ah, 0 cwd sub ax, dx sar ax, 1 - add al, byte_266EF + add al, _bullet_template.count loc_1CD40: - mov byte_266EF, al + mov _bullet_template.count, al locret_1CD43: leave ; default @@ -31660,48 +31615,48 @@ loc_1CD8F: mov _bullet_template.pattern, BP_SPREAD loc_1CD9F: - mov byte_266EF, 3 - mov byte_266F0, 6 + mov _bullet_template.count, 3 + mov _bullet_template.BT_delta.spread_angle, 6 leave retn ; --------------------------------------------------------------------------- @@stack: - mov al, byte_266F0 + mov al, _bullet_template.BT_delta.stack_speed mov ah, 0 cwd sub ax, dx sar ax, 1 - add al, byte_266F0 - mov byte_266F0, al - inc byte_266EF + add al, _bullet_template.BT_delta.stack_speed + mov _bullet_template.BT_delta.stack_speed, al + inc _bullet_template.count leave retn ; --------------------------------------------------------------------------- @@spread: - mov al, byte_266EF + mov al, _bullet_template.count add al, 4 jmp short loc_1CDE4 ; --------------------------------------------------------------------------- @@ring: - mov al, byte_266EF + mov al, _bullet_template.count add al, al - mov byte_266EF, al - cmp byte_266EF, 30h ; '0' + mov _bullet_template.count, al + cmp _bullet_template.count, 48 jbe short locret_1CDE7 ; default - mov byte_266EF, 30h ; '0' + mov _bullet_template.count, 48 leave retn ; --------------------------------------------------------------------------- @@random: - mov al, byte_266EF + mov al, _bullet_template.count add al, al loc_1CDE4: - mov byte_266EF, al + mov _bullet_template.count, al locret_1CDE7: leave ; default @@ -31750,7 +31705,7 @@ sub_1CE12 proc near @@stack: cmp _playperf, 24 jb short loc_1CE3A - inc byte_266EF + inc _bullet_template.count pop bp retn ; --------------------------------------------------------------------------- @@ -31758,9 +31713,9 @@ sub_1CE12 proc near loc_1CE3A: cmp _playperf, 6 ja short @@ret - cmp byte_266EF, 2 + cmp _bullet_template.count, 2 jb short @@ret - dec byte_266EF + dec _bullet_template.count pop bp retn ; --------------------------------------------------------------------------- @@ -31774,17 +31729,17 @@ loc_1CE3A: loc_1CE57: cmp _playperf, 6 ja short @@ret - cmp byte_266EF, 3 + cmp _bullet_template.count, 3 jb short @@ret - mov al, byte_266EF - add al, 0FEh + mov al, _bullet_template.count + add al, -2 jmp short loc_1CEAA ; --------------------------------------------------------------------------- @@ring: cmp _playperf, 24 jb short loc_1CE7A - mov al, byte_266EF + mov al, _bullet_template.count add al, 4 jmp short loc_1CEAA ; --------------------------------------------------------------------------- @@ -31794,28 +31749,28 @@ loc_1CE7A: jb short loc_1CE88 loc_1CE81: - mov al, byte_266EF + mov al, _bullet_template.count add al, 2 jmp short loc_1CEAA ; --------------------------------------------------------------------------- loc_1CE88: - cmp byte_266EF, 5 + cmp _bullet_template.count, 5 jb short @@ret cmp _playperf, 10 ja short loc_1CE9E - mov al, byte_266EF - add al, 0FEh - mov byte_266EF, al + mov al, _bullet_template.count + add al, -2 + mov _bullet_template.count, al loc_1CE9E: cmp _playperf, 4 ja short @@ret - mov al, byte_266EF - add al, 0FCh + mov al, _bullet_template.count + add al, -4 loc_1CEAA: - mov byte_266EF, al + mov _bullet_template.count, al @@ret: pop bp @@ -31902,15 +31857,15 @@ var_1 = byte ptr -1 enter 2, 0 cmp _bullet_clear_trigger, 0 jnz short locret_1CF14 - mov al, byte_266EF + mov al, _bullet_template.count mov [bp+var_2], al - mov al, byte_266EE + mov al, _bullet_template.speed mov [bp+var_1], al call sub_1D294 mov al, [bp+var_2] - mov byte_266EF, al + mov _bullet_template.count, al mov al, [bp+var_1] - mov byte_266EE, al + mov _bullet_template.speed, al locret_1CF14: leave @@ -31929,11 +31884,11 @@ var_1 = byte ptr -1 enter 2, 0 cmp _bullet_clear_trigger, 0 jnz short locret_1CF30 - mov al, byte_266EE + mov al, _bullet_template.speed mov [bp+var_1], al call sub_1D294 mov al, [bp+var_1] - mov byte_266EE, al + mov _bullet_template.speed, al locret_1CF30: leave @@ -31952,11 +31907,11 @@ var_1 = byte ptr -1 enter 2, 0 cmp _bullet_clear_trigger, 0 jnz short locret_1CF4C - mov al, byte_266EE + mov al, _bullet_template.speed mov [bp+var_1], al call sub_1D294 mov al, [bp+var_1] - mov byte_266EE, al + mov _bullet_template.speed, al locret_1CF4C: leave @@ -31975,11 +31930,11 @@ var_1 = byte ptr -1 enter 2, 0 cmp _bullet_clear_trigger, 0 jnz short locret_1CF68 - mov al, byte_266EE + mov al, _bullet_template.speed mov [bp+var_1], al call sub_1D3BF mov al, [bp+var_1] - mov byte_266EE, al + mov _bullet_template.speed, al locret_1CF68: leave @@ -31998,11 +31953,11 @@ var_1 = byte ptr -1 enter 2, 0 cmp _bullet_clear_trigger, 0 jnz short locret_1CF84 - mov al, byte_266EE + mov al, _bullet_template.speed mov [bp+var_1], al call sub_1D3BF mov al, [bp+var_1] - mov byte_266EE, al + mov _bullet_template.speed, al locret_1CF84: leave @@ -32021,11 +31976,11 @@ var_1 = byte ptr -1 enter 2, 0 cmp _bullet_clear_trigger, 0 jnz short locret_1CFA0 - mov al, byte_266EE + mov al, _bullet_template.speed mov [bp+var_1], al call sub_1D3BF mov al, [bp+var_1] - mov byte_266EE, al + mov _bullet_template.speed, al locret_1CFA0: leave @@ -32081,7 +32036,7 @@ arg_0 = word ptr 4 mov si, [bp+arg_0] mov [bp+var_2], 0 mov [bp+var_4], 0 - mov al, byte_266EE + mov al, _bullet_template.speed mov [bp+var_3], al mov al, _bullet_template.pattern mov ah, 0 @@ -32132,7 +32087,7 @@ loc_1D044: ; --------------------------------------------------------------------------- @@spread: - test byte_266EF, 1 + test _bullet_template.count, 1 jz short loc_1D088 or si, si jnz short loc_1D06C @@ -32144,7 +32099,7 @@ loc_1D044: loc_1D06C: test si, 1 jz short loc_1D0A8 - mov al, byte_266F0 + mov al, _bullet_template.BT_delta.spread_angle add byte_2CFF6, al loc_1D079: @@ -32159,7 +32114,7 @@ loc_1D079: loc_1D088: or si, si jnz short loc_1D09B - mov al, byte_266F0 + mov al, _bullet_template.BT_delta.spread_angle mov ah, 0 cwd sub ax, dx @@ -32171,7 +32126,7 @@ loc_1D088: loc_1D09B: test si, 1 jnz short loc_1D079 - mov al, byte_266F0 + mov al, _bullet_template.BT_delta.spread_angle add byte_2CFF6, al loc_1D0A8: @@ -32180,7 +32135,7 @@ loc_1D0A8: mov [bp+var_2], ax loc_1D0B0: - mov al, byte_266EF + mov al, _bullet_template.count mov ah, 0 dec ax cmp ax, si @@ -32196,14 +32151,14 @@ loc_1D0BE: @@ring: mov ax, si shl ax, 8 - mov dl, byte_266EF + mov dl, _bullet_template.count mov dh, 0 push dx cwd pop bx idiv bx mov [bp+var_2], ax - mov al, byte_266EF + mov al, _bullet_template.count mov ah, 0 dec ax cmp ax, si @@ -32214,14 +32169,14 @@ loc_1D0BE: @@ring_aimed: mov ax, si shl ax, 8 - mov dl, byte_266EF + mov dl, _bullet_template.count mov dh, 0 push dx cwd pop bx idiv bx mov [bp+var_2], ax - mov al, byte_266EF + mov al, _bullet_template.count mov ah, 0 dec ax cmp ax, si @@ -32241,7 +32196,7 @@ loc_1D0BE: @@random_angle: call randring2_next16 mov [bp+var_2], ax - mov al, byte_266EF + mov al, _bullet_template.count mov ah, 0 dec ax cmp ax, si @@ -32252,11 +32207,10 @@ loc_1D0BE: @@random_angle_and_speed: call randring2_next16 mov [bp+var_2], ax - push 1Fh - call randring2_next16_and + call randring2_next16_and pascal, 1Fh add al, [bp+var_3] mov [bp+var_3], al - mov al, byte_266EF + mov al, _bullet_template.count mov ah, 0 dec ax cmp ax, si @@ -32265,11 +32219,10 @@ loc_1D0BE: ; --------------------------------------------------------------------------- @@spread_random_angle_aimed: - push 1Fh - call randring2_next16_and + call randring2_next16_and pascal, 1Fh mov [bp+var_2], ax sub [bp+var_2], 10h - mov al, byte_266EF + mov al, _bullet_template.count mov ah, 0 dec ax cmp ax, si @@ -32281,17 +32234,17 @@ loc_1D0BE: ; --------------------------------------------------------------------------- @@stack: - mov al, byte_266F0 + mov al, _bullet_template.BT_delta.stack_speed mov ah, 0 imul si add al, [bp+var_3] mov [bp+var_3], al - mov al, byte_266EF + mov al, _bullet_template.count mov ah, 0 dec ax cmp ax, si jle short loc_1D182 - cmp byte_266EE, 0A0h + cmp _bullet_template.speed, (10 shl 4) jb short loc_1D186 loc_1D182: @@ -32303,25 +32256,25 @@ loc_1D186: @@aim: mov ax, _player_pos.cur.y - sub ax, point_266E4.y + sub ax, _bullet_template.BT_origin.y push ax mov ax, _player_pos.cur.x - sub ax, point_266E4.x + sub ax, _bullet_template.BT_origin.x push ax call iatan2 add [bp+var_2], ax @@static: - push offset point_266E8 + push offset _bullet_template.BT_velocity mov al, byte ptr [bp+var_2] - add al, byte_266ED + add al, _bullet_template.BT_angle push ax mov al, [bp+var_3] mov ah, 0 push ax call vector2_near mov al, byte ptr [bp+var_2] - add al, byte_266ED + add al, _bullet_template.BT_angle mov angle_2D008, al mov al, [bp+var_4] mov ah, 0 @@ -32338,12 +32291,12 @@ sub_1CFC8 endp sub_1D1CD proc near push bp mov bp, sp - mov al, byte_266EE + mov al, _bullet_template.speed mov ah, 0 cwd sub ax, dx sar ax, 1 - mov byte_266EE, al + mov _bullet_template.speed, al mov ah, 0 mov cx, ax mov al, _playperf @@ -32355,20 +32308,20 @@ sub_1D1CD proc near cwd idiv bx mov cx, ax - mov al, byte_266EE + mov al, _bullet_template.speed add al, cl - mov byte_266EE, al - cmp byte_266EE, 80h + mov _bullet_template.speed, al + cmp _bullet_template.speed, (8 shl 4) jbe short loc_1D20A - mov byte_266EE, 80h + mov _bullet_template.speed, (8 shl 4) pop bp retn ; --------------------------------------------------------------------------- loc_1D20A: - cmp byte_266EE, 8 + cmp _bullet_template.speed, 8 jnb short loc_1D216 - mov byte_266EE, 8 + mov _bullet_template.speed, 8 loc_1D216: pop bp @@ -32390,20 +32343,20 @@ sub_1D230 proc near jbe short loc_1D282 loc_1D241: - cmp point_266E4.x, (-8 shl 4) + cmp _bullet_template.BT_origin.x, (-8 shl 4) jle short loc_1D282 - cmp point_266E4.x, ((PLAYFIELD_W + 8) shl 4) + cmp _bullet_template.BT_origin.x, ((PLAYFIELD_W + 8) shl 4) jge short loc_1D282 - cmp point_266E4.y, (-8 shl 4) + cmp _bullet_template.BT_origin.y, (-8 shl 4) jle short loc_1D282 - cmp point_266E4.y, ((PLAYFIELD_H + 8) shl 4) + cmp _bullet_template.BT_origin.y, ((PLAYFIELD_H + 8) shl 4) jge short loc_1D282 - mov ax, point_266E4.x + mov ax, _bullet_template.BT_origin.x sub ax, _player_pos.cur.x add ax, (4 shl 4) cmp ax, (8 shl 4) ja short loc_1D286 - mov ax, point_266E4.y + mov ax, _bullet_template.BT_origin.y sub ax, _player_pos.cur.y add ax, (4 shl 4) cmp ax, (8 shl 4) @@ -32444,16 +32397,16 @@ var_4 = byte ptr -4 sub sp, 6 push si push di - cmp byte_266E2, 3 + cmp _bullet_template.spawn_type, 3 jnz short loc_1D2D5 - mov eax, point_266E4 - mov dword_2A8C6, eax + mov eax, _bullet_template.BT_origin + mov point_2A8C6, eax mov dword_2A8CA, 0 mov word_2A8CE, 400h mov byte_2A8D3, 2 mov byte_2A8D2, 9 mov word_2A8D0, 8 - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 call sub_13AB7 jmp loc_1D3BB ; --------------------------------------------------------------------------- @@ -32463,7 +32416,7 @@ loc_1D2D5: or al, al jnz loc_1D3BB mov [bp+@@spawn_state], BSS_GRAZEABLE - mov al, byte_266E2 + mov al, _bullet_template.spawn_type mov ah, 0 cmp ax, 1 jz short loc_1D2F8 @@ -32494,7 +32447,7 @@ loc_1D30C: loc_1D314: mov [bp+@@move_state], BMS_NORMAL - cmp byte_266EE, 40h + cmp _bullet_template.speed, (4 shl 4) jb short loc_1D326 cmp _bullet_clear_time, 0 jz short loc_1D338 @@ -32519,14 +32472,14 @@ loc_1D33C: mov [si+bullet_t.move_state], al mov [si+bullet_t.slowdown_time], BMS_SLOWDOWN_FRAMES mov al, BMS_SLOWDOWN_BASE_SPEED - sub al, byte_266EE + sub al, _bullet_template.speed mov [si+bullet_t.slowdown_speed_delta], al mov [si+bullet_t.age], 0 - mov eax, point_266E4 + mov eax, _bullet_template.BT_origin mov dword ptr [si+bullet_t.pos.cur], eax mov al, _bullet_template.pattern mov [si+bullet_t.from_pattern], al - mov al, byte_266E3 + mov al, _bullet_template.patnum mov ah, 0 mov [si+bullet_t.BULLET_patnum], ax mov al, [bp+@@spawn_state] @@ -32534,18 +32487,18 @@ loc_1D33C: push di call sub_1CFC8 mov [bp+var_4], al - cmp byte_266E3, PAT_BULLET16_D + cmp _bullet_template.patnum, PAT_BULLET16_D jb short loc_1D391 call bullet_patnum_for_angle pascal, word ptr angle_2D008 mov ah, 0 add [si+bullet_t.BULLET_patnum], ax loc_1D391: - mov eax, point_266E8 + mov eax, _bullet_template.BT_velocity mov dword ptr [si+bullet_t.pos.velocity], eax mov al, angle_2D008 mov [si+bullet_t.BULLET_angle], al - mov al, byte_266EE + mov al, _bullet_template.speed mov [si+bullet_t.speed_final], al mov [si+bullet_t.speed_cur], al cmp [bp+var_4], 0 @@ -32587,7 +32540,7 @@ var_3 = byte ptr -3 or al, al jnz loc_1D48A mov [bp+@@spawn_state], 0 - mov al, byte_266E2 + mov al, _bullet_template.spawn_type mov ah, 0 cmp ax, 1 jz short loc_1D3EA @@ -32626,17 +32579,17 @@ loc_1D40A: jnz short loc_1D47E mov [si+bullet_t.flag], 1 mov [si+bullet_t.move_state], BMS_SPECIAL - mov al, byte_266F2 + mov al, _bullet_template.BT_special_motion mov [si+bullet_t.special_motion], al mov [si+bullet_t.turn_count], 0 mov al, byte_2CFF8 mov [si+bullet_t.turn_angle], al mov [si+bullet_t.age], 0 - mov eax, point_266E4 + mov eax, _bullet_template.BT_origin mov dword ptr [si+bullet_t.pos.cur], eax mov al, _bullet_template.pattern mov [si+bullet_t.from_pattern], al - mov al, byte_266E3 + mov al, _bullet_template.patnum mov ah, 0 mov [si+bullet_t.BULLET_patnum], ax mov al, [bp+@@spawn_state] @@ -32644,18 +32597,18 @@ loc_1D40A: push di call sub_1CFC8 mov [bp+var_3], al - cmp byte_266E3, PAT_BULLET16_D + cmp _bullet_template.patnum, PAT_BULLET16_D jb short loc_1D460 call bullet_patnum_for_angle pascal, word ptr angle_2D008 mov ah, 0 add [si+bullet_t.BULLET_patnum], ax loc_1D460: - mov eax, point_266E8 + mov eax, _bullet_template.BT_velocity mov dword ptr [si+bullet_t.pos.velocity], eax mov al, angle_2D008 mov [si+bullet_t.BULLET_angle], al - mov al, byte_266EE + mov al, _bullet_template.speed mov [si+bullet_t.speed_final], al mov [si+bullet_t.speed_cur], al cmp [bp+var_3], 0 @@ -34727,10 +34680,10 @@ loc_1EA6B: loc_1EA6F: mov ax, _boss_pos.cur.x add ax, (4 shl 4) - mov word ptr dword_2A8C6, ax + mov point_2A8C6.x, ax mov ax, _boss_pos.cur.y add ax, (-28 shl 4) - mov word ptr dword_2A8C6+2, ax + mov point_2A8C6.y, ax mov word_2A8D0, 10h mov word_2A8CE, 1000h mov byte_2A8D2, 9 @@ -34761,8 +34714,8 @@ loc_1EAB9: loc_1EAC0: mov _boss_sprite, 132 - push word ptr dword_2A8C6 - push word ptr dword_2A8C6+2 + push point_2A8C6.x + push point_2A8C6.y call circles_add_shrinking jmp short loc_1EAF9 ; default ; --------------------------------------------------------------------------- @@ -35095,9 +35048,9 @@ var_1 = byte ptr -1 mov [bp+var_1], al cmp [bp+var_1], 2 jnz short loc_1ED71 - mov byte_266E2, 2 - mov byte_266E3, 5Ch - mov byte_266EE, 60h + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_D_YELLOW + mov _bullet_template.speed, (6 shl 4) mov ax, _player_pos.cur.y sub ax, _boss_pos.cur.y push ax @@ -35107,9 +35060,9 @@ var_1 = byte ptr -1 call iatan2 mov _boss_angle, al mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 6 + mov _bullet_template.count, 6 mov al, byte_2D023 - mov byte_266F0, al + mov _bullet_template.BT_delta.spread_angle, al call fp_2D004 cmp _player_pos.cur.x, 192 * 16 jge short loc_1ED6C @@ -35133,7 +35086,7 @@ loc_1ED71: or dx, dx jnz short loc_1EDA3 mov al, _boss_angle - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 call snd_se_play pascal, 3 cmp _boss_phase_frame, 64 @@ -35167,16 +35120,16 @@ var_1 = byte ptr -1 mov [bp+var_1], al cmp [bp+var_1], 2 jnz short loc_1EE01 - mov byte_266E2, 4 - mov byte_266E3, 39h ; '9' - mov byte_266EE, 55h ; 'U' - mov byte_266ED, 0 - mov byte_266F2, 80h + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE + mov _bullet_template.speed, (5 shl 4) + 5 + mov _bullet_template.BT_angle, 0 + mov _bullet_template.BT_special_motion, 80h mov al, byte_2D020 mov byte_2CFF7, al mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte_266EF, 9 - mov byte_266F0, 6 + mov _bullet_template.count, 9 + mov _bullet_template.BT_delta.spread_angle, 6 call fp_2D004 call sub_1CFB5 @@ -35252,28 +35205,26 @@ var_1 = byte ptr -1 idiv bx or dx, dx jnz short loc_1EEF5 - push (64 shl 4) - call randring2_next16_mod + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov point_266E4.x, ax - push (64 shl 4) - call randring2_next16_mod + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.y add dx, (-32 shl 4) add ax, dx - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax call randring2_next16 - mov byte_266ED, al - mov byte_266E2, 5 - mov byte_266E3, 39h ; '9' - mov byte_266EE, 10h - mov byte_266ED, 0 - mov byte_266F2, 82h + mov _bullet_template.BT_angle, al + mov _bullet_template.spawn_type, 5 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE + mov _bullet_template.speed, (1 shl 4) + mov _bullet_template.BT_angle, 0 + mov _bullet_template.BT_special_motion, 82h mov byte_2CFF7, 1 mov _bullet_template.pattern, BP_RING - mov byte_266EF, 10h + mov _bullet_template.count, 16 call fp_2D004 call sub_1CFB5 call snd_se_play pascal, 3 @@ -35285,25 +35236,23 @@ loc_1EEF5: idiv bx cmp dx, 10h jnz short loc_1EF6C - push (64 shl 4) - call randring2_next16_mod + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov point_266E4.x, ax - push (64 shl 4) - call randring2_next16_mod + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.y add dx, (-32 shl 4) add ax, dx - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax call randring2_next16 - mov byte_266ED, al - mov byte_266E2, 1 - mov byte_266EE, 18h + mov _bullet_template.BT_angle, al + mov _bullet_template.spawn_type, 1 + mov _bullet_template.speed, (1 shl 4) + 8 mov _bullet_template.pattern, BP_STACK - mov byte_266EF, 4 - mov byte_266F0, 8 + mov _bullet_template.count, 4 + mov _bullet_template.BT_delta.stack_speed, 8 call fp_2D004 xor si, si call randring2_next16 @@ -35313,11 +35262,11 @@ loc_1EEF5: loc_1EF53: call fp_2D000 inc si - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 15h loc_1EF5D: - mov byte_266ED, al + mov _bullet_template.BT_angle, al cmp si, 0Ch jl short loc_1EF53 call snd_se_play pascal, 3 @@ -35354,17 +35303,16 @@ var_1 = byte ptr -1 idiv bx or dx, dx jnz loc_1F034 - mov byte_266E2, 1 - mov byte_266EE, 80h - push 7 - call randring2_next16_and - add al, 0BCh - mov byte_266ED, al + mov _bullet_template.spawn_type, 1 + mov _bullet_template.speed, (8 shl 4) + call randring2_next16_and pascal, 7 + add al, -44h + mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_SPREAD mov al, byte_2D021 - mov byte_266EF, al + mov _bullet_template.count, al mov al, byte_2D022 - mov byte_266F0, al + mov _bullet_template.BT_delta.spread_angle, al call sub_1CFA2 mov ax, _boss_phase_frame mov bx, 16 @@ -35372,27 +35320,25 @@ var_1 = byte ptr -1 idiv bx or dx, dx jnz short loc_1F034 - push (64 shl 4) - call randring2_next16_mod + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov point_266E4.x, ax - push (64 shl 4) - call randring2_next16_mod + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.y add dx, (-32 shl 4) add ax, dx - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov _bullet_template.pattern, BP_STACK_AIMED mov al, _rank add al, 3 - mov byte_266EF, al - mov byte_266F0, 10h - mov byte_266E2, 4 - mov byte_266EE, 20h ; ' ' - mov byte_266ED, 0 - mov byte_266E3, 3Dh ; '=' + mov _bullet_template.count, al + mov _bullet_template.BT_delta.stack_speed, (1 shl 4) + mov _bullet_template.spawn_type, 4 + mov _bullet_template.speed, (2 shl 4) + mov _bullet_template.BT_angle, 0 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_RED call fp_2D000 call snd_se_play pascal, 3 @@ -35422,8 +35368,8 @@ var_1 = byte ptr -1 mov [bp+var_1], al cmp [bp+var_1], 2 jnz short loc_1F08E - mov byte_266E2, 1 - mov byte_266EE, 36h ; '6' + mov _bullet_template.spawn_type, 1 + mov _bullet_template.speed, (3 shl 4) + 6 mov ax, _player_pos.cur.y sub ax, _boss_pos.cur.y push ax @@ -35431,9 +35377,9 @@ var_1 = byte ptr -1 sub ax, _boss_pos.cur.x push ax call iatan2 - mov byte_266ED, al + mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED - mov byte_266EF, 3 + mov _bullet_template.count, 3 call fp_2D004 loc_1F08E: @@ -35461,14 +35407,14 @@ loc_1F0B0: idiv bx or dx, dx jnz short locret_1F10F - mov byte_266E2, 5 - mov byte_266E3, 39h ; '9' + mov _bullet_template.spawn_type, 5 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE mov _bullet_template.pattern, BP_RING - mov byte_266EF, 20h ; ' ' + mov _bullet_template.count, 32 call randring2_next16 - mov byte_266ED, al - mov byte_266EE, 30h ; '0' - mov byte_266F2, 82h + mov _bullet_template.BT_angle, al + mov _bullet_template.speed, (3 shl 4) + mov _bullet_template.BT_special_motion, 82h mov byte_2CFF7, 1 call fp_2D004 call fp_2D002 @@ -35552,11 +35498,11 @@ sub_1F17C proc near jnz short loc_1F1AA mov _boss_sprite, 136 mov _boss_angle, 0 - mov byte_266E2, 4 - mov byte_266E3, 39h ; '9' - mov byte_266ED, 0C0h - mov byte_266F2, 0FFh - mov byte_266F0, 8 + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE + mov _bullet_template.BT_angle, -40h + mov _bullet_template.BT_special_motion, 0FFh + mov _bullet_template.BT_delta.stack_speed, 8 loc_1F1AA: cmp _boss_phase_frame, 32 @@ -35567,25 +35513,23 @@ loc_1F1AA: idiv bx or dx, dx jnz short loc_1F227 - push (64 shl 4) - call randring2_next16_mod + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov point_266E4.x, ax - push (64 shl 4) - call randring2_next16_mod + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.y add dx, (-32 shl 4) add ax, dx - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax call randring2_next16 - mov byte_266ED, al - mov byte_266E2, 1 - mov byte_266EE, 18h + mov _bullet_template.BT_angle, al + mov _bullet_template.spawn_type, 1 + mov _bullet_template.speed, (1 shl 4) + 8 mov _bullet_template.pattern, BP_STACK - mov byte_266EF, 4 - mov byte_266F0, 0Ah + mov _bullet_template.count, 4 + mov _bullet_template.BT_delta.stack_speed, 10 call fp_2D004 xor si, si call randring2_next16 @@ -35595,11 +35539,11 @@ loc_1F1AA: loc_1F20E: call fp_2D000 inc si - mov al, byte_266ED - add al, 20h ; ' ' + mov al, _bullet_template.BT_angle + add al, 20h loc_1F218: - mov byte_266ED, al + mov _bullet_template.BT_angle, al cmp si, 8 jl short loc_1F20E call snd_se_play pascal, 3 @@ -35624,11 +35568,11 @@ var_1 = byte ptr -1 mov [bp+var_1], al cmp [bp+var_1], 2 jnz short loc_1F263 - mov byte_266E2, 4 - mov byte_266E3, 39h ; '9' - mov byte_266ED, 0C0h - mov byte_266F2, 0FFh - mov byte_266F0, 8 + mov _bullet_template.spawn_type, 4 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE + mov _bullet_template.BT_angle, -40h + mov _bullet_template.BT_special_motion, 0FFh + mov _bullet_template.BT_delta.spread_angle, 8 cmp byte_237F6, 78h ; 'x' jz short loc_1F25E mov al, 78h ; 'x' @@ -35650,34 +35594,30 @@ loc_1F263: idiv bx or dx, dx jnz short loc_1F2D9 - push 1Fh - call randring2_next16_and - add al, 10h - mov byte_266EE, al + call randring2_next16_and pascal, 1Fh + add al, (1 shl 4) + mov _bullet_template.speed, al mov _bullet_template.pattern, BP_SPREAD - push 3 - call randring2_next16_and + call randring2_next16_and pascal, 3 add al, 2 - mov byte_266EF, al + mov _bullet_template.count, al call fp_2D004 - push (64 shl 4) - call randring2_next16_mod + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov point_266E4.x, ax - push (64 shl 4) - call randring2_next16_mod + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.y add dx, (-32 shl 4) add ax, dx - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov al, byte_237F6 - add byte_266ED, al + add _bullet_template.BT_angle, al call fp_2D002 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 80h - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D002 call snd_se_play pascal, 3 @@ -35708,14 +35648,14 @@ var_1 = byte ptr -1 mov [bp+var_1], al cmp [bp+var_1], 2 jnz short loc_1F328 - mov byte_266E2, 4 + mov _bullet_template.spawn_type, 4 mov _bullet_template.pattern, BP_STACK_AIMED mov al, byte_2D024 - mov byte_266EF, al - mov byte_266F0, 0Ch - mov byte_266F2, 0FFh - mov byte_266ED, 0 - mov byte_266E3, 39h ; '9' + mov _bullet_template.count, al + mov _bullet_template.BT_delta.stack_speed, 12 + mov _bullet_template.BT_special_motion, 0FFh + mov _bullet_template.BT_angle, 0 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE loc_1F328: cmp [bp+var_1], 1 @@ -35727,16 +35667,16 @@ loc_1F328: cmp dx, 10h jnz short loc_1F35D xor si, si - mov byte_266ED, 20h ; ' ' + mov _bullet_template.BT_angle, 20h jmp short loc_1F351 ; --------------------------------------------------------------------------- loc_1F345: call sub_1CFB5 inc si - mov al, byte_266ED - add al, 0F0h - mov byte_266ED, al + mov al, _bullet_template.BT_angle + add al, -10h + mov _bullet_template.BT_angle, al loc_1F351: cmp si, 5 @@ -35797,10 +35737,10 @@ var_2 = word ptr -2 enter 2, 0 mov ax, _boss_pos.cur.x add ax, (4 shl 4) - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-28 shl 4) - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov al, _boss_phase mov ah, 0 mov bx, ax @@ -36285,9 +36225,9 @@ loc_1F7E1: loc_1F802: mov ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax call sub_1F17C call sub_1E64E or al, al @@ -36428,10 +36368,10 @@ loc_1F926: mov word_2A8CE, 1400h mov ax, _boss_pos.cur.y add ax, (-48 shl 4) - mov word ptr dword_2A8C6+2, ax + mov point_2A8C6.y, ax mov ax, _boss_pos.cur.x add ax, (-13 shl 4) - mov word ptr dword_2A8C6, ax + mov point_2A8C6.x, ax mov word_2A8D0, 10h mov byte_2A8D2, 0Fh @@ -36447,8 +36387,8 @@ loc_1F94E: ; --------------------------------------------------------------------------- loc_1F955: - push word ptr dword_2A8C6 - push word ptr dword_2A8C6+2 + push point_2A8C6.x + push point_2A8C6.y call circles_add_shrinking mov _circles_color, 0Fh @@ -36671,13 +36611,13 @@ sub_1FAAA proc near ; --------------------------------------------------------------------------- loc_1FABE: - mov byte_266E2, 5 - mov byte_266E3, 3Eh ; '>' - mov byte_266EE, 46h ; 'F' + mov _bullet_template.spawn_type, 5 + mov _bullet_template.patnum, PAT_BULLET16_N_HEART_BALL_RED + mov _bullet_template.speed, (4 shl 4) + 6 mov _bullet_template.pattern, BP_RING - mov byte_266EF, 5Ah ; 'Z' + mov _bullet_template.count, 90 call randring2_next16 - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 call snd_se_play pascal, 9 pop bp @@ -36713,12 +36653,12 @@ sub_1FAF7 proc near loc_1FB10: mov _bullet_template.pattern, BP_SPREAD - mov byte_266F0, 8 + mov _bullet_template.BT_delta.spread_angle, 8 mov ax, _player_pos.cur.y - sub ax, point_266E4.y + sub ax, _bullet_template.BT_origin.y push ax mov ax, _player_pos.cur.x - sub ax, point_266E4.x + sub ax, _bullet_template.BT_origin.x push ax call iatan2 add al, 0C0h @@ -36730,20 +36670,18 @@ loc_1FB10: loc_1FB36: cmp _stage_frame_mod2, 0 jnz short loc_1FB84 - push 3Fh ; '?' - call randring2_next16_and + call randring2_next16_and pascal, 3Fh add al, 8 - mov byte_266EE, al - push 3 - call randring2_next16_and + mov _bullet_template.speed, al + call randring2_next16_and pascal, 3 add al, 5 - mov byte_266EF, al + mov _bullet_template.count, al mov al, byte_2D02D - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 mov al, 80h sub al, byte_2D02D - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 mov al, byte_2D02D add al, 7 @@ -36783,7 +36721,7 @@ sub_1FB86 proc near ; --------------------------------------------------------------------------- loc_1FBA1: - mov byte_266F2, 86h + mov _bullet_template.BT_special_motion, 86h mov byte_2CFF7, 4 pop bp retn @@ -36793,39 +36731,35 @@ loc_1FBAD: cmp _stage_frame_mod2, 0 jz loc_1FC44 mov _bullet_template.pattern, BP_SINGLE - mov byte_266E2, 2 - mov byte_266E3, 3Bh ; ';' - push 3Fh ; '?' - call randring2_next16_and - add al, 2Ah ; '*' - mov byte_266EE, al - push (64 shl 4) - call randring2_next16_mod + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_YELLOW + call randring2_next16_and pascal, 3Fh + add al, (2 shl 4) + 10 + mov _bullet_template.speed, al + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov point_266E4.x, ax - push (32 shl 4) - call randring2_next16_mod + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (32 shl 4) mov dx, _boss_pos.cur.y add dx, (-32 shl 4) add ax, dx - mov point_266E4.y, ax - mov byte_266ED, 0E0h + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.BT_angle, -20h call fp_2D002 - push 3Fh ; '?' - call randring2_next16_and - add al, 2Ah ; '*' - mov byte_266EE, al - mov byte_266ED, 0A0h + call randring2_next16_and pascal, 3Fh + add al, (2 shl 4) + 10 + mov _bullet_template.speed, al + mov _bullet_template.BT_angle, -60h call fp_2D002 call snd_se_play pascal, 9 cmp _stage_frame_mod16, 1 jnz short loc_1FC44 - mov byte_266E3, 4Ch ; 'L' + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 20h ; ' ' - mov byte_266EE, 50h ; 'P' + mov _bullet_template.count, 32 + mov _bullet_template.speed, (5 shl 4) call fp_2D000 pop bp retn @@ -36869,34 +36803,32 @@ loc_1FC61: loc_1FC68: cmp _stage_frame_mod2, 0 jz short loc_1FCE0 - mov byte_266F2, 81h + mov _bullet_template.BT_special_motion, 81h mov _bullet_template.pattern, BP_SINGLE - mov byte_266E2, 2 - mov byte_266E3, 3Ah ; ':' - push 3Fh ; '?' - call randring2_next16_and - add al, 10h - mov byte_266EE, al + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_YELLOW + call randring2_next16_and pascal, 3Fh + add al, (1 shl 4) + mov _bullet_template.speed, al push (64 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.x ; jumptable 0001EA6B case 32792 add dx, (-32 shl 4) add ax, dx - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax push (32 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y add dx, (-26 shl 4) add ax, dx - mov point_266E4.y, ax - push 3Fh ; '?' - call randring2_next16_and - add al, 10h - mov byte_266EE, al - mov byte_266ED, 80h + mov _bullet_template.BT_origin.y, ax + call randring2_next16_and pascal, 3Fh + add al, (1 shl 4) + mov _bullet_template.speed, al + mov _bullet_template.BT_angle, 80h mov byte_2CFF8, 0C0h call fp_2D002 - mov byte_266ED, 0 + mov _bullet_template.BT_angle, 0 mov byte_2CFF8, 40h call fp_2D002 call snd_se_play pascal, 9 @@ -36907,16 +36839,15 @@ loc_1FCE0: mov word_2A8D0, 8 mov word_2A8CE, 400h mov byte_2A8D2, 0Eh - mov byte_266E2, 1 - mov ax, point_266E4.y - mov word ptr dword_2A8C6+2, ax - push 1400h - call randring2_next16_mod - add ax, 200h - mov word ptr dword_2A8C6, ax + mov _bullet_template.spawn_type, 1 + mov ax, _bullet_template.BT_origin.y + mov point_2A8C6.y, ax + call randring2_next16_mod pascal, (320 shl 4) + add ax, (32 shl 4) + mov point_2A8C6.x, ax mov _bullet_template.pattern, BP_RING_AIMED - mov byte_266EF, 10h - mov byte_266EE, 40h + mov _bullet_template.count, 16 + mov _bullet_template.speed, (4 shl 4) call sub_13AB7 pop bp retn @@ -36949,12 +36880,12 @@ sub_1FD30 proc near jmp cs:off_1FDF4[bx] loc_1FD49: - mov byte_266E3, 3Eh ; '>' + mov _bullet_template.patnum, PAT_BULLET16_N_HEART_BALL_RED mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte_266F2, 0FFh - mov byte_266F0, 10h - mov byte_266ED, 0 - mov byte_266EF, 2 + mov _bullet_template.BT_special_motion, 0FFh + mov _bullet_template.BT_delta.spread_angle, 10h + mov _bullet_template.BT_angle, 0 + mov _bullet_template.count, 2 jmp loc_1FDF1 ; --------------------------------------------------------------------------- @@ -36963,46 +36894,46 @@ loc_1FD6A: and ax, 0Fh cmp ax, 8 jnz short loc_1FDF1 - mov byte_266E2, 4 + mov _bullet_template.spawn_type, 4 xor si, si - mov byte_266EE, 10h + mov _bullet_template.speed, (1 shl 4) jmp short loc_1FD8F ; --------------------------------------------------------------------------- loc_1FD83: call sub_1CFB5 inc si - mov al, byte_266EE - add al, 14h - mov byte_266EE, al + mov al, _bullet_template.speed + add al, (1 shl 4) + 4 + mov _bullet_template.speed, al loc_1FD8F: cmp si, 4 jl short loc_1FD83 call snd_se_play pascal, 15 - mov al, byte_266EF + mov al, _bullet_template.count add al, 2 - mov byte_266EF, al - mov al, byte_266F0 - add al, 0FEh - mov byte_266F0, al + mov _bullet_template.count, al + mov al, _bullet_template.BT_delta + add al, -2 + mov _bullet_template.BT_delta, al jmp short loc_1FDF1 ; --------------------------------------------------------------------------- loc_1FDAD: mov _bullet_template.pattern, BP_STACK_AIMED - mov byte_266EF, 8 - mov byte_266F0, 0Ah - mov byte_266EE, 20h ; ' ' - mov byte_266E3, 39h ; '9' - mov byte_266ED, 0 + mov _bullet_template.count, 8 + mov _bullet_template.BT_delta.stack_speed, 10 + mov _bullet_template.speed, (2 shl 4) + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE + mov _bullet_template.BT_angle, 0 jmp short loc_1FDF1 ; --------------------------------------------------------------------------- loc_1FDCD: test byte ptr _boss_phase_frame, 3 jnz short loc_1FDF1 - mov byte_266E2, 4 + mov _bullet_template.spawn_type, 4 call fp_2D000 call snd_se_play pascal, 15 jmp short loc_1FDF1 @@ -37045,18 +36976,18 @@ sub_1FDFE proc near ; --------------------------------------------------------------------------- loc_1FE17: - mov byte_266EE, 50h ; 'P' + mov _bullet_template.speed, (5 shl 4) mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 1 - mov byte_266F0, 6 + mov _bullet_template.count, 1 + mov _bullet_template.BT_delta.spread_angle, 6 mov ax, _player_pos.cur.y - sub ax, point_266E4.y + sub ax, _bullet_template.BT_origin.y push ax mov ax, _player_pos.cur.x - sub ax, point_266E4.x + sub ax, _bullet_template.BT_origin.x push ax call iatan2 - mov byte_266ED, al + mov _bullet_template.BT_angle, al pop bp retn ; --------------------------------------------------------------------------- @@ -37065,7 +36996,7 @@ loc_1FE45: cmp _stage_frame_mod4, 0 jnz short loc_1FE68 call fp_2D000 - inc byte_266EF + inc _bullet_template.count call snd_se_play pascal, 9 pop bp retn @@ -37101,12 +37032,12 @@ sub_1FE6A proc near ; --------------------------------------------------------------------------- loc_1FE83: - mov byte_266E3, 4Ch ; 'L' + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 5 - mov byte_266F0, 0Bh - mov byte_266ED, 0 - mov byte_266EE, 5Ah ; 'Z' + mov _bullet_template.count, 5 + mov _bullet_template.BT_delta.spread_angle, 0Bh + mov _bullet_template.BT_angle, 0 + mov _bullet_template.speed, (5 shl 4) + 10 pop bp retn ; --------------------------------------------------------------------------- @@ -37114,15 +37045,15 @@ loc_1FE83: loc_1FEA3: cmp _stage_frame_mod2, 0 jnz short loc_1FEDD - mov byte_266E2, 2 + mov _bullet_template.spawn_type, 2 call fp_2D000 mov al, 80h - sub al, byte_266ED - mov byte_266ED, al + sub al, _bullet_template.BT_angle + mov _bullet_template.BT_angle, al call fp_2D000 - mov al, 78h ; 'x' - sub al, byte_266ED - mov byte_266ED, al + mov al, 78h + sub al, _bullet_template.BT_angle + mov _bullet_template.BT_angle, al call snd_se_play pascal, 3 pop bp retn @@ -37197,21 +37128,21 @@ loc_1FF2E: jmp cs:off_20048[bx] loc_1FF44: - mov byte_266E2, 2 + mov _bullet_template.spawn_type, 2 mov _bullet_template.pattern, BP_SPREAD - mov byte_266EF, 5 - mov byte_266F0, 18h - mov byte_266ED, 0C0h - mov byte_266E3, 34h ; '4' - mov byte_266EE, 7Fh + mov _bullet_template.count, 5 + mov _bullet_template.BT_delta.spread_angle, 18h + mov _bullet_template.BT_angle, -40h + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_WHITE + mov _bullet_template.speed, (7 shl 4) + 15 call fp_2D004 call fp_2D000 call snd_se_play pascal, 3 mov ax, _player_pos.cur.y - sub ax, point_266E4.y + sub ax, _bullet_template.BT_origin.y push ax mov ax, _player_pos.cur.x - sub ax, point_266E4.x + sub ax, _bullet_template.BT_origin.x push ax call iatan2 add al, 0D0h @@ -37220,10 +37151,10 @@ loc_1FF44: ; --------------------------------------------------------------------------- loc_1FF93: - mov ax, point_266E4.x - mov word_2561A, ax + mov ax, _bullet_template.BT_origin.x + mov point_2561A.x, ax mov ax, _boss_pos.cur.y - mov word_2561C, ax + mov point_2561A.y, ax mov word_2562A, 40h mov word_2562E, 6 mov word_25624, 20h ; ' ' @@ -37238,23 +37169,23 @@ loc_1FFC2: jnz short loc_20044 cmp _stage_frame_mod8, 0 jnz short loc_1FFF8 - mov byte_266E2, 1 + mov _bullet_template.spawn_type, 1 mov al, byte_2D02D - mov byte_266ED, al + mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_STACK - mov byte_266EF, 0Ch - mov byte_266EE, 20h ; ' ' - mov byte_266F0, 8 + mov _bullet_template.count, 12 + mov _bullet_template.speed, (2 shl 4) + mov _bullet_template.BT_delta.stack_speed, 8 add al, 0Ch mov byte_2D02D, al call fp_2D000 loc_1FFF8: - mov byte_266EE, 80h - mov byte_266ED, 40h - mov byte_266E3, 34h ; '4' - mov byte_266E2, 2 - mov point_266E4.y, 0 + mov _bullet_template.speed, (8 shl 4) + mov _bullet_template.BT_angle, 40h + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_WHITE + mov _bullet_template.spawn_type, 2 + mov _bullet_template.BT_origin.y, 0 mov _bullet_template.pattern, BP_SINGLE mov si, 0B204h xor di, di @@ -37263,7 +37194,7 @@ loc_1FFF8: loc_2001E: mov ax, [si+2] - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax call sub_1CFA2 inc di add si, 1Ah @@ -37303,27 +37234,24 @@ sub_20050 proc near cmp _stage_frame_mod8, 0 jnz short loc_200B4 call randring2_next16 - mov byte_266ED, al - push (64 shl 4) - call randring2_next16_mod + mov _bullet_template.BT_angle, al + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov point_266E4.x, ax - push (32 shl 4) - call randring2_next16_mod + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (32 shl 4) mov dx, _boss_pos.cur.y add dx, (-26 shl 4) add ax, dx - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov _bullet_template.pattern, BP_RING - mov byte_266EF, 10h - mov byte_266E2, 2 - mov byte_266E3, 4Ch ; 'L' - push 3Fh ; '?' - call randring2_next16_and - add al, 10h - mov byte_266EE, al + mov _bullet_template.count, 16 + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE + call randring2_next16_and pascal, 3Fh + add al, (1 shl 4) + mov _bullet_template.speed, al call fp_2D000 call snd_se_play pascal, 3 @@ -37344,54 +37272,53 @@ sub_200B6 proc near jnz loc_2018E mov _boss_sprite, 134 mov _bullet_template.pattern, BP_SPREAD - mov byte_266F0, 9 - mov byte_266EF, 8 - mov byte_266EE, 38h ; '8' + mov _bullet_template.BT_delta.spread_angle, 9 + mov _bullet_template.count, 8 + mov _bullet_template.speed, (3 shl 4) + 8 mov al, byte ptr _stage_frame add al, al - mov byte_266ED, al + mov _bullet_template.BT_angle, al mov ax, _stage_frame and ax, 1FFh cmp ax, 256 jb short loc_200F6 - mov al, byte_266ED + mov al, _bullet_template.BT_angle neg al - mov byte_266ED, al + mov _bullet_template.BT_angle, al loc_200F6: call fp_2D000 - mov al, byte_266ED + mov al, _bullet_template.BT_angle add al, 80h - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 - mov byte_266EE, 20h ; ' ' - mov byte_266E2, 5 - mov byte_266F0, 1 - mov byte_266EF, 3 - mov byte_266E3, 39h ; '9' - push (32 shl 4) - call randring2_next16_mod + mov _bullet_template.speed, (2 shl 4) + mov _bullet_template.spawn_type, 5 + mov _bullet_template.BT_delta.spread_angle, 1 + mov _bullet_template.count, 3 + mov _bullet_template.patnum, PAT_BULLET16_N_BALL_BLUE + call randring2_next16_mod pascal, (32 shl 4) mov dx, _boss_pos.cur.y add dx, (-26 shl 4) add ax, dx - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov al, byte_2D02D mov ah, 0 shl ax, 4 add ax, _boss_pos.cur.x - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov al, byte_2D02C - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 mov al, byte_2D02D mov ah, 0 shl ax, 4 mov dx, _boss_pos.cur.x sub dx, ax - mov point_266E4.x, dx + mov _bullet_template.BT_origin.x, dx mov al, byte_2D02C neg al - mov byte_266ED, al + mov _bullet_template.BT_angle, al call fp_2D000 mov al, byte_2D02D add al, 10h @@ -37435,28 +37362,23 @@ loc_201A6: loc_201AB: cmp _stage_frame_mod4, 0 jnz short loc_20200 - push 1 - -loc_201B4: - call randring2_next16_and ; jumptable 0001F539 case 36296 - mov byte_266E2, al - push (64 shl 4) - call randring2_next16_mod + call randring2_next16_and pascal, 1 + mov _bullet_template.spawn_type, al + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov point_266E4.x, ax - push (32 shl 4) - call randring2_next16_mod + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (32 shl 4) mov dx, _boss_pos.cur.y add dx, (-26 shl 4) add ax, dx - mov point_266E4.y, ax + mov _bullet_template.BT_origin.y, ax mov _bullet_template.pattern, BP_RING - mov byte_266EF, 20h ; ' ' + mov _bullet_template.count, 32 call randring2_next16 - mov byte_266ED, al - mov byte_266EE, 64h ; 'd' + mov _bullet_template.BT_angle, al + mov _bullet_template.speed, (6 shl 4) + 4 call fp_2D000 call snd_se_play pascal, 3 @@ -37511,12 +37433,12 @@ sub_2023B proc near cmp _stage_frame_mod8, 0 jnz short loc_20268 mov _bullet_template.pattern, BP_RING - mov byte_266EF, 20h ; ' ' - mov byte_266E3, 4Ch ; 'L' - mov byte_266E2, 2 + mov _bullet_template.count, 32 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE + mov _bullet_template.spawn_type, 2 call randring2_next16 - mov byte_266ED, al - mov byte_266EE, 70h ; 'p' + mov _bullet_template.BT_angle, al + mov _bullet_template.speed, (7 shl 4) call fp_2D000 loc_20268: @@ -37544,11 +37466,11 @@ loc_20279: loc_20284: mov ax, _boss_pos.cur.x add ax, (-13 shl 4) - mov point_266E4.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-48 shl 4) - mov point_266E4.y, ax - mov byte_266E2, 1 + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.spawn_type, 1 mov al, _boss_phase mov ah, 0 mov bx, ax @@ -39556,8 +39478,7 @@ dword_25610 dd ? dd ? byte_25618 db ? db ? -word_2561A dw ? -word_2561C dw ? +point_2561A Point dd ? ; word_25622 dw ? word_25624 dw ? @@ -39848,8 +39769,7 @@ include th04/hud/popup[bss].asm byte_259E6 db ? db ? fp_259E8 dw ? -word_259EA dw ? -word_259EC dw ? +point_259EA Point byte_259EE db ? byte_259EF db ? byte_259F0 db ? @@ -39864,8 +39784,7 @@ byte_25A07 db ? byte_25A08 db ? db ? word_25A0A dw ? -word_25A0C dw ? -word_25A0E dw ? +point_25A0C Point dd ? ; dd ? ; db ? ; @@ -39903,18 +39822,7 @@ include th04/drawpoint[bss].asm include th04/ems[bss].asm _turbo_mode db ? db ? -byte_266E2 db ? -byte_266E3 db ? -point_266E4 Point -point_266E8 Point include th04/bullet/template[bss].asm -byte_266ED db ? -byte_266EE db ? -byte_266EF db ? -byte_266F0 db ? - db ? -byte_266F2 db ? - db ? include th04/midboss/vars[bss].asm include th04/boss/vars[bss].asm include th04/sparks[bss].asm @@ -40863,7 +40771,7 @@ byte_2A16E db ? db ? ; db ? ; db ? ; -dword_2A8C6 dd ? +point_2A8C6 Point dword_2A8CA dd ? word_2A8CE dw ? word_2A8D0 dw ? diff --git a/th05_main.asm b/th05_main.asm index dd74e405..d2a22f1d 100644 --- a/th05_main.asm +++ b/th05_main.asm @@ -12753,9 +12753,9 @@ loc_128CA: loc_128D8: mov eax, [si] - mov point_25FFC, eax + mov _bullet_template.BT_origin, eax call randring1_next16 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15DE2 loc_128EA: @@ -12943,13 +12943,13 @@ sub_15330 endp sub_15345 proc near push si push di - mov cx, 7 + mov cx, size _bullet_template / 2 add si, 28h ; '(' push es push ds pop es assume es:_DATA - mov di, 561Ah + mov di, offset _bullet_template rep movsw pop es assume es:nothing @@ -13210,9 +13210,9 @@ loc_15518: mov word_23F60, dx call sub_15345 mov ax, [si+2] - add point_25FFC.x, ax + add _bullet_template.BT_origin.x, ax mov ax, [si+4] - add point_25FFC.y, ax + add _bullet_template.BT_origin.y, ax push es call fp_25344 mov bx, word_23F60 @@ -13804,9 +13804,9 @@ include th05/playperf_adjust_speed.asm sub_15A5C proc near cmp _bullet_clear_trigger, 0 jnz short locret_15A6E - push word_26006 + push word ptr _bullet_template.BT_angle call loc_15C94 - pop word_26006 + pop word ptr _bullet_template.BT_angle locret_15A6E: retn @@ -13822,9 +13822,9 @@ sub_15A70 proc near cmp _bullet_clear_trigger, 0 jnz short locret_15A8C mov byte_221C0, 1 - push word_26006 + push word ptr _bullet_template.BT_angle call loc_15C94 - pop word_26006 + pop word ptr _bullet_template.BT_angle mov byte_221C0, 0 locret_15A8C: @@ -13864,7 +13864,7 @@ sub_15AAA proc near push di xor si, si mov ch, byte_25348 - mov cl, byte ptr word_26006+1 + mov cl, _bullet_template.speed loc_15AB6: mov bl, _bullet_template.pattern @@ -13875,8 +13875,8 @@ loc_15AB6: xor di, di add bx, bx mov ax, cs:off_15C16[bx] - mov bl, byte ptr dword_26002 - mov bh, byte ptr dword_26002+2 + mov bl, _bullet_template.spread + mov bh, _bullet_template.BT_stack or bl, bl jnz short loc_15ADD inc bl @@ -13899,7 +13899,7 @@ loc_15ADD: xor ah, ah mov al, ch div bl - mov dl, byte ptr dword_26002+3 + mov dl, _bullet_template.stack_speed_delta mul dl add cl, al mov al, bl @@ -13943,7 +13943,7 @@ loc_15B33: jz short loc_15B46 loc_15B38: - mov al, byte ptr dword_26002+1 + mov al, _bullet_template.spread_angle_delta add byte_25347, al mov al, byte_25347 mov si, ax @@ -13960,7 +13960,7 @@ loc_15B46: loc_15B4F: or ch, ch jnz short loc_15B5F - mov al, byte ptr dword_26002+1 + mov al, _bullet_template.spread_angle_delta shr al, 1 mov byte_25347, al mov si, ax @@ -14017,20 +14017,20 @@ loc_15B83: loc_15BB4: mov si, _randring_p mov si, word ptr _randring[si] - and si, 0FFh + and si, 255 inc byte ptr _randring_p jmp short @@static ; --------------------------------------------------------------------------- @@stack: - mov al, byte ptr dword_26002+3 + mov al, _bullet_template.stack_speed_delta mul ch add cl, al mov al, bh dec al cmp al, ch jle short loc_15BDA - cmp cl, 0A0h + cmp cl, (10 shl 4) jb short loc_15BDB loc_15BDA: @@ -14042,8 +14042,8 @@ loc_15BDB: @@aim: mov byte_2534A, cl - push point_25FFC.x - push point_25FFC.y + push _bullet_template.BT_origin.x + push _bullet_template.BT_origin.y push si call sub_15A24 mov cl, byte_2534A @@ -14052,7 +14052,7 @@ loc_15BDB: @@static: push offset point_2534B mov ax, si - add al, byte ptr word_26006 + add al, _bullet_template.BT_angle push ax mov angle_25349, al mov byte_2534A, cl @@ -14099,8 +14099,8 @@ loc_15C44: ; --------------------------------------------------------------------------- loc_15C47: - mov ax, point_25FFC.x - mov dx, point_25FFC.y + mov ax, _bullet_template.BT_origin.x + mov dx, _bullet_template.BT_origin.y cmp ax, (-8 shl 4) jle short loc_15C44 cmp ax, ((PLAYFIELD_W + 8) shl 4) @@ -14122,9 +14122,9 @@ loc_15C47: loc_15C81: cmp byte_25346, 0 jnz short loc_15C91 - mov al, byte ptr word_26006+1 + mov al, _bullet_template.speed call @playperf_adjust_speed - mov byte ptr word_26006+1, al + mov _bullet_template.speed, al loc_15C91: mov al, 0 @@ -14134,28 +14134,28 @@ sub_15C36 endp ; --------------------------------------------------------------------------- loc_15C94 proc near - cmp byte ptr word_25FFA, 11h + cmp _bullet_template.spawn_type, 11h jz short loc_15CA2 - cmp byte ptr word_25FFA, 1 + cmp _bullet_template.spawn_type, 1 jnz short loc_15CE5 loc_15CA2: - mov eax, point_25FFC - mov dword_2A722, eax + mov eax, _bullet_template.BT_origin + mov point_2A722, eax mov dword_2A726, 0 mov word_2A72A, 400h mov byte_2A72F, 2 mov byte_2A72E, 9 mov word_2A72C, 8 - push word_25FFA - dec byte ptr word_25FFA + push word ptr _bullet_template.spawn_type + dec _bullet_template.spawn_type cmp byte_221C0, 0 jz short loc_15CDD - mov byte ptr word_25FFA, 0FEh + mov _bullet_template.spawn_type, 0FEh loc_15CDD: call sub_16999 - pop word_25FFA + pop word ptr _bullet_template.spawn_type locret_15CE4: retn @@ -14167,7 +14167,7 @@ loc_15CE5: jnz short locret_15CE4 push si push di - cmp byte ptr word_25FFA+1, 0 + cmp _bullet_template.patnum, 0 jnz short loc_15CFD mov si, offset _pellets[(PELLET_COUNT - 1) * size bullet_t] mov di, PELLET_COUNT @@ -14180,7 +14180,7 @@ loc_15CFD: loc_15D03: mov dl, BSS_GRAZEABLE - mov al, byte ptr word_25FFA + mov al, _bullet_template.spawn_type and al, 0Fh cmp al, 3 jz short loc_15D16 @@ -14197,13 +14197,13 @@ loc_15D18: cmp byte_221C0, 0 jnz short loc_15D38 mov al, BMS_NORMAL - cmp byte ptr word_26006+1, 40h + cmp _bullet_template.speed, (4 shl 4) jb short loc_15D2F cmp _bullet_clear_time, 0 jz short loc_15D38 loc_15D2F: - test byte ptr word_25FFA, 10h + test _bullet_template.spawn_type, 10h jnz short loc_15D38 xor al, al @@ -14220,7 +14220,7 @@ loc_15D48: @@spawn_state = byte ptr $+3 mov [si+bullet_t.spawn_state], 123 - mov eax, point_25FFC + mov eax, _bullet_template.BT_origin mov dword ptr [si+bullet_t.pos.cur], eax cmp byte_221C0, 0 jnz short loc_15D78 @@ -14229,7 +14229,7 @@ loc_15D48: mov [si+bullet_t.move_state], 123 mov [si+bullet_t.slowdown_time], BMS_SLOWDOWN_FRAMES mov al, BMS_SLOWDOWN_BASE_SPEED - sub al, byte ptr word_26006+1 + sub al, _bullet_template.speed mov [si+bullet_t.slowdown_speed_delta], al jmp short loc_15D95 ; --------------------------------------------------------------------------- @@ -14241,7 +14241,7 @@ loc_15D78: mov [si+bullet_t.turn_count], 0 mov al, byte_2C977 mov [si+bullet_t.turn_angle], al - mov al, byte_26001 + mov al, _bullet_template.BT_special_motion mov [si+bullet_t.special_motion], al loc_15D95: @@ -14250,7 +14250,7 @@ loc_15D95: mov [si+bullet_t.from_pattern], al call sub_15AAA mov cl, al - mov al, byte ptr word_25FFA+1 + mov al, _bullet_template.patnum mov ah, 0 cmp al, PAT_BULLET16_D jb short loc_15DB5 @@ -14306,21 +14306,21 @@ sub_15DE6 proc near loc_15DFD: cmp al, 3 jb short @@ret - sub byte ptr dword_26002, 2 + sub _bullet_template.spread, 2 retn ; --------------------------------------------------------------------------- loc_15E07: shr dh, 2 - sub byte ptr dword_26002+3, dh + sub _bullet_template.stack_speed_delta, dh cmp ah, 2 jb short @@ret - dec byte ptr dword_26002+2 + dec _bullet_template.BT_stack retn ; --------------------------------------------------------------------------- loc_15E18: - shr byte ptr dword_26002, 1 + shr _bullet_template.spread, 1 @@ret: retn @@ -14351,8 +14351,8 @@ sub_15E2A proc near mov cx, offset off_15E78 loc_15E44: - mov ax, word ptr dword_26002 - mov dx, word ptr dword_26002+2 + mov ax, word ptr _bullet_template.spread + mov dx, word ptr _bullet_template.BT_stack and bl, (not BPC0_AIMED) add bx, cx jmp word ptr cs:[bx] @@ -14360,13 +14360,13 @@ loc_15E44: loc_15E53: add _bullet_template.pattern, BPCS_STACK - mov word ptr dword_26002+2, 602h + mov word ptr _bullet_template.BT_stack, (6 shl 8) or 2 retn ; --------------------------------------------------------------------------- loc_15E5F: shr dh, 1 - add byte ptr dword_26002+3, dh + add _bullet_template.stack_speed_delta, dh retn ; --------------------------------------------------------------------------- @@ -14377,7 +14377,7 @@ loc_15E66: mov al, 6 loc_15E6F: - add byte ptr dword_26002, al + add _bullet_template.spread, al locret_15E73: retn @@ -14408,19 +14408,19 @@ sub_15E82 proc near loc_15E91: add _bullet_template.pattern, BPCC_SPREAD - mov word ptr dword_26002, 603h + mov word ptr _bullet_template.spread, (6 shl 8) or 3 retn ; --------------------------------------------------------------------------- loc_15E9D: shr dh, 1 - add byte ptr dword_26002+3, dh - inc byte ptr dword_26002+2 + add _bullet_template.stack_speed_delta, dh + inc _bullet_template.BT_stack retn ; --------------------------------------------------------------------------- loc_15EA8: - add byte ptr dword_26002, 2 + add _bullet_template.spread, 2 retn ; --------------------------------------------------------------------------- @@ -14428,12 +14428,12 @@ loc_15EAE: xor ah, ah mov dl, 3 div dl - cmp al, 0Ch + cmp al, 12 jbe short loc_15EBA - mov al, 0Ch + mov al, 12 loc_15EBA: - add byte ptr dword_26002, al + add _bullet_template.spread, al locret_15EBE: retn @@ -14462,16 +14462,16 @@ sub_15ECE proc near mov al, _playperf cmp al, 38 jb short loc_15EE3 - inc byte ptr dword_26002+2 + inc _bullet_template.BT_stack retn ; --------------------------------------------------------------------------- loc_15EE3: cmp al, 18h ja short locret_15EF2 - cmp byte ptr dword_26002+2, 2 + cmp _bullet_template.BT_stack, 2 jb short locret_15EF2 - dec byte ptr dword_26002+2 + dec _bullet_template.BT_stack locret_15EF2: retn @@ -14695,9 +14695,9 @@ arg_0 = word ptr 4 mov bp, sp push si push di - mov cx, 7 + mov cx, size _bullet_template / 2 mov si, [bp+arg_0] - mov di, 561Ah + mov di, offset _bullet_template push ds pop es assume es:_DATA @@ -14859,9 +14859,9 @@ loc_161FC: push ax call sub_16065 mov ax, [si+2] - add point_25FFC.x, ax + add _bullet_template.BT_origin.x, ax mov ax, [si+4] - add point_25FFC.y, ax + add _bullet_template.BT_origin.y, ax call fp_25344 call sub_15A5C @@ -15469,11 +15469,11 @@ arg_0 = word ptr 4 mov bp, sp push si push di - mov cx, 7 + mov cx, size _bullet_template / 2 push ds pop es assume es:_DATA - mov si, 561Ah + mov si, offset _bullet_template mov di, [bp+arg_0] add di, 18h rep movsw @@ -15504,9 +15504,9 @@ loc_169A5: mov byte ptr [si], 1 push si call sub_1697E - mov ax, word ptr dword_2A722 + mov ax, point_2A722.x mov [si+2], ax - mov ax, word ptr dword_2A722+2 + mov ax, point_2A722.y mov [si+4], ax mov ax, word_2A72A mov [si+0Eh], ax @@ -15564,9 +15564,9 @@ loc_16A0E: jnz short loc_16A5F mov byte ptr [si], 1 mov byte ptr [si+18h], 0FFh - mov ax, word ptr dword_2A722 + mov ax, point_2A722.x mov [si+2], ax - mov ax, word ptr dword_2A722+2 + mov ax, point_2A722.y mov [si+4], ax mov ax, word_2A72A mov [si+0Eh], ax @@ -15658,10 +15658,10 @@ arg_0 = word ptr 4 mov bp, sp push si push di - mov cx, 7 + mov cx, size _bullet_template / 2 push ds pop es - mov di, 561Ah + mov di, offset _bullet_template mov si, [bp+arg_0] add si, 18h rep movsw @@ -15713,17 +15713,17 @@ loc_16ACB: push si call sub_16A95 mov ax, [si+2] - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, [si+4] - mov point_25FFC.y, ax - cmp byte ptr word_25FFA, 0FEh + mov _bullet_template.BT_origin.y, ax + cmp _bullet_template.spawn_type, 0FEh jnb short loc_16B0F call sub_15A5C jmp short loc_16B17 ; --------------------------------------------------------------------------- loc_16B0F: - mov byte ptr word_25FFA, 0 + mov _bullet_template.spawn_type, 0 call sub_15A70 loc_16B17: @@ -18023,25 +18023,25 @@ loc_18029: idiv si or dx, dx jnz loc_180BC - mov byte ptr word_25FFA, 0 - mov byte ptr word_25FFA+1, 0 - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.spawn_type, 0 + mov _bullet_template.patnum, 0 + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_SPREAD - mov byte_26001, 0Ah - mov word ptr dword_26002, 204h + mov _bullet_template.BT_special_motion, 0Ah + mov word ptr _bullet_template.spread, (2 shl 8) or 4 mov al, _boss_angle - mov byte ptr word_26006, al - add al, 20 + mov _bullet_template.BT_angle, al + add al, 14h mov _boss_angle, al call fp_25344 call sub_15A70 mov _bullet_template.pattern, BP_SINGLE - mov byte ptr word_25FFA, 2 - mov byte ptr word_26006+1, 18h - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.speed, (1 shl 4) + 8 + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE call fp_25344 call randring2_next16 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al push _midboss_pos.cur.x push (32 shl 4) mov ah, 0 @@ -18049,16 +18049,16 @@ loc_18029: mov bx, ax push _CosTable8[bx] call vector1_at - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax push _midboss_pos.cur.y push (32 shl 4) - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle mov ah, 0 add ax, ax mov bx, ax push _SinTable8[bx] call vector1_at - mov point_25FFC.y, ax + mov _bullet_template.BT_origin.y, ax call sub_15A5C loc_180BC: @@ -18077,7 +18077,7 @@ midboss1_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur - mov point_25FFC, eax + mov _bullet_template.BT_origin, eax inc _midboss_phase_frame mov al, _midboss_phase mov ah, 0 @@ -18229,12 +18229,12 @@ sub_1823B proc near idiv bx or dx, dx jnz short loc_18274 - mov byte ptr word_25FFA, 2 - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_SINGLE mov al, byte_2D085 - mov byte ptr word_26006, al - mov byte ptr word_26006+1, 18h + mov _bullet_template.BT_angle, al + mov _bullet_template.speed, (1 shl 4) + 8 call fp_25344 call sub_15A5C mov al, byte_2D085 @@ -18260,12 +18260,12 @@ sub_18276 proc near idiv bx or dx, dx jnz short loc_182AF - mov byte ptr word_25FFA, 2 - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_SINGLE mov al, byte_2D084 - mov byte ptr word_26006, al - mov byte ptr word_26006+1, 18h + mov _bullet_template.BT_angle, al + mov _bullet_template.speed, (1 shl 4) + 8 call fp_25344 call sub_15A5C mov al, byte_2D084 @@ -18287,12 +18287,12 @@ sub_182B1 proc near mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_182EB - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 30h ; '0' + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_N_RED mov _bullet_template.pattern, BP_SPREAD_STACK_AIMED - mov byte ptr word_26006, 0 - mov dword_26002, 7051005h - mov byte ptr word_26006+1, 10h + mov _bullet_template.BT_angle, 0 + mov dword ptr _bullet_template.spread, (7 shl 24) or (5 shl 16) or (16 shl 8) or 5 + mov _bullet_template.speed, (1 shl 4) call fp_25344 call sub_15A5C call snd_se_play pascal, 15 @@ -18316,15 +18316,15 @@ sub_182ED proc near idiv bx or dx, dx jnz short loc_18339 - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 30h ; '0' + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_N_RED mov _bullet_template.pattern, BP_STACK mov al, _boss_angle add al, byte_2D083 add al, 80h - mov byte ptr word_26006, al - mov word ptr dword_26002+2, 608h - mov byte ptr word_26006+1, 10h + mov _bullet_template.BT_angle, al + mov word ptr _bullet_template.BT_stack, (6 shl 8) or 8 + mov _bullet_template.speed, (1 shl 4) call fp_25344 call sub_15A5C mov al, byte_2D083 @@ -18436,38 +18436,36 @@ sub_183F5 proc near idiv bx or dx, dx jnz short loc_1847B - mov byte ptr word_25FFA, 10h - mov byte ptr word_25FFA+1, 0 + mov _bullet_template.spawn_type, 10h + mov _bullet_template.patnum, 0 mov _bullet_template.pattern, BP_SPREAD mov ax, _boss_phase_frame add ax, ax push ax call randring2_next16_mod sub al, byte ptr _boss_phase_frame - add al, 64 - mov byte ptr word_26006, al - mov word ptr dword_26002, 303h - mov byte_26001, 0Ah - push 1Fh - call randring2_next16_and - add al, 10h - mov byte ptr word_26006+1, al + add al, 40h + mov _bullet_template.BT_angle, al + mov word ptr _bullet_template.spread, (3 shl 8) or 3 + mov _bullet_template.BT_special_motion, 0Ah + call randring2_next16_and pascal, 1Fh + add al, (1 shl 4) + mov _bullet_template.speed, al call fp_25344 call sub_15A70 - mov byte ptr word_25FFA, 3 - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.spawn_type, 3 + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_SINGLE mov ax, _boss_phase_frame add ax, ax push ax call randring2_next16_mod sub al, byte ptr _boss_phase_frame - add al, 64 - mov byte ptr word_26006, al - push 1Fh - call randring2_next16_and - add al, 18h - mov byte ptr word_26006+1, al + add al, 40h + mov _bullet_template.BT_angle, al + call randring2_next16_and pascal, 1Fh + add al, (1 shl 4) + 8 + mov _bullet_template.speed, al call fp_25344 call sub_15A5C call snd_se_play pascal, 3 @@ -18491,13 +18489,13 @@ sub_1847D proc near idiv bx or dx, dx jnz short loc_184BA - mov byte ptr word_25FFA, 2 - mov byte ptr word_25FFA+1, 30h ; '0' + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_RED mov _bullet_template.pattern, BP_RING call randring2_next16 - mov byte ptr word_26006, al - mov byte ptr word_26006+1, 20h ; ' ' - mov byte ptr dword_26002, 0Ch + mov _bullet_template.BT_angle, al + mov _bullet_template.speed, (2 shl 4) + mov _bullet_template.spread, 12 call fp_25344 call sub_15A5C call snd_se_play pascal, 3 @@ -18521,26 +18519,26 @@ sub_184BC proc near idiv bx or dx, dx jnz short loc_18524 - mov byte ptr word_25FFA, 0 + mov _bullet_template.spawn_type, 0 mov _bullet_template.pattern, BP_RING - mov byte ptr dword_26002, 3 - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.spread, 3 + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al mov al, byte_2D083 - mov byte ptr word_26006+1, al + mov _bullet_template.speed, al mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_18506 - mov al, byte ptr word_26006+1 + mov al, _bullet_template.speed mov ah, 0 cwd sub ax, dx sar ax, 1 - mov byte ptr word_26006+1, al + mov _bullet_template.speed, al loc_18506: call fp_25344 @@ -18572,26 +18570,26 @@ sub_18526 proc near idiv bx or dx, dx jnz short loc_1858E - mov byte ptr word_25FFA, 0 + mov _bullet_template.spawn_type, 0 mov _bullet_template.pattern, BP_RING - mov byte ptr dword_26002, 3 - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.spread, 3 + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov al, byte_2D084 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al mov al, byte_2D083 - mov byte ptr word_26006+1, al + mov _bullet_template.speed, al mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_18570 - mov al, byte ptr word_26006+1 + mov al, _bullet_template.speed mov ah, 0 cwd sub ax, dx sar ax, 1 - mov byte ptr word_26006+1, al + mov _bullet_template.speed, al loc_18570: call fp_25344 @@ -18680,23 +18678,23 @@ loc_1863B: loc_1863F: cmp _stage_frame_mod16, 0 jnz short loc_1869C - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_SPREAD - mov byte_26001, 0Ah - push (261 shl 16) or 262 - push (263 shl 16) or 264 + mov _bullet_template.BT_special_motion, 0Ah + push (((1 shl 8) or 5) shl 16) or ((1 shl 8) or 6) + push (((1 shl 8) or 7) shl 16) or ((1 shl 8) or 8) call select_for_rank - mov word ptr dword_26002, ax - mov byte ptr word_26006+1, 20h ; ' ' - mov byte ptr word_25FFA+1, 0 + mov word ptr _bullet_template.spread, ax + mov _bullet_template.speed, (2 shl 4) + mov _bullet_template.patnum, 0 call sub_15A70 mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED - mov byte ptr word_26006+1, 10h + mov _bullet_template.speed, (1 shl 4) mov al, byte_2D084 - mov byte ptr dword_26002, al - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.spread, al + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE call sub_15A5C mov al, byte_2D085 add al, 0Eh @@ -18732,10 +18730,10 @@ sara_update proc far mov ax, _boss_pos.cur.y mov _homing_target.y, ax inc _boss_phase_frame - mov byte ptr word_25FFA, 0 + mov _bullet_template.spawn_type, 0 mov eax, _boss_pos.cur - mov point_25FFC, eax - mov dword_2A722, eax + mov _bullet_template.BT_origin, eax + mov point_2A722, eax mov al, _boss_phase mov ah, 0 mov bx, ax @@ -18757,9 +18755,9 @@ loc_18702: cmp _boss_phase_frame, 224 jnz short loc_18737 mov ax, _boss_pos.cur.x - mov word ptr dword_2A722, ax + mov point_2A722.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_2A722+2, ax + mov point_2A722.y, ax mov word_2A72A, 1400h mov word_2A72C, 20h ; ' ' mov byte_2A72F, 3 @@ -19036,34 +19034,34 @@ sub_18987 proc near mov bp, sp cmp _stage_frame_mod16, 0 jnz short loc_189FA - mov byte ptr word_25FFA, 10h - mov byte ptr word_25FFA+1, 30h ; '0' + mov _bullet_template.spawn_type, 10h + mov _bullet_template.patnum, PAT_BULLET16_N_RED mov _bullet_template.pattern, BP_STACK - mov word ptr dword_26002+2, 803h - mov byte ptr word_26006+1, 18h + mov word ptr _bullet_template.BT_stack, (8 shl 8) or 3 + mov _bullet_template.speed, (1 shl 4) + 8 call randring2_next16 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call fp_25344 call sub_15A5C - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 0 + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, 0 mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED - mov byte ptr dword_26002, 3 + mov _bullet_template.spread, 3 cmp _midboss_hp, 600 jg short loc_189DB - mov byte ptr dword_26002, 6 + mov _bullet_template.spread, 6 jmp short loc_189E8 ; --------------------------------------------------------------------------- loc_189DB: cmp _midboss_hp, 800 jg short loc_189E8 - mov byte ptr dword_26002, 4 + mov _bullet_template.spread, 4 loc_189E8: - mov byte ptr word_26006+1, 18h + mov _bullet_template.speed, (1 shl 4) + 8 call randring2_next16 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call fp_25344 call sub_15A5C @@ -19082,13 +19080,13 @@ sub_189FC proc near mov bp, sp cmp _stage_frame_mod4, 0 jnz short loc_18A2D - mov byte ptr word_25FFA, 10h - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.spawn_type, 10h + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_STACK - mov word ptr dword_26002+2, 0F03h - mov byte ptr word_26006+1, 18h + mov word ptr _bullet_template.BT_stack, (15 shl 8) or 3 + mov _bullet_template.speed, (1 shl 4) + 8 call randring2_next16 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call fp_25344 call sub_15A5C @@ -19107,7 +19105,7 @@ midboss2_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur - mov point_25FFC, eax + mov _bullet_template.BT_origin, eax inc _midboss_phase_frame mov al, _midboss_phase mov ah, 0 @@ -19356,24 +19354,24 @@ sub_18C94 proc near ; --------------------------------------------------------------------------- loc_18CB1: - mov byte ptr word_25FFA, 0 - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.spawn_type, 0 + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_SPREAD mov al, byte_2D080 - mov byte ptr word_26006+1, al - mov word ptr dword_26002, 605h - mov byte_26001, 0Ah + mov _bullet_template.speed, al + mov word ptr _bullet_template.spread, (6 shl 8) or 5 + mov _bullet_template.BT_special_motion, 0Ah mov al, 1 sub al, byte_2D085 mov byte_2D085, al cmp byte_2D085, 0 jz short loc_18CE8 - mov byte ptr word_26006, 20h ; ' ' + mov _bullet_template.BT_angle, 20h jmp short loc_18CED ; --------------------------------------------------------------------------- loc_18CE8: - mov byte ptr word_26006, 60h + mov _bullet_template.BT_angle, 60h loc_18CED: call fp_25344 @@ -19392,26 +19390,26 @@ loc_18D07: or dx, dx jnz short loc_18D52 call sub_15A5C - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 80h - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C cmp byte_2D085, 0 jz short loc_18D30 - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 87h jmp short loc_18D35 ; --------------------------------------------------------------------------- loc_18D30: - mov al, byte ptr word_26006 - add al, 79h ; 'y' + mov al, _bullet_template.BT_angle + add al, 79h loc_18D35: - mov byte ptr word_26006, al - mov al, byte ptr word_26006+1 + mov _bullet_template.BT_angle, al + mov al, _bullet_template.speed add al, 4 - mov byte ptr word_26006+1, al + mov _bullet_template.speed, al pop bp retn ; --------------------------------------------------------------------------- @@ -19448,15 +19446,15 @@ sub_18D54 proc near ; --------------------------------------------------------------------------- loc_18D6F: - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 54h ; 'T' + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_V_RED mov _bullet_template.pattern, BP_STACK - mov byte ptr word_26006+1, 20h ; ' ' - push (50Ah shl 16) or 50Ch - push (60Ch shl 16) or 60Eh + mov _bullet_template.speed, (2 shl 4) + push (((5 shl 8) or 10) shl 16) or ((5 shl 8) or 12) + push (((6 shl 8) or 12) shl 16) or ((6 shl 8) or 14) call select_for_rank - mov word ptr dword_26002+2, ax - mov byte ptr word_26006, 0C0h + mov word ptr _bullet_template.BT_stack, ax + mov _bullet_template.BT_angle, -40h pop bp retn ; --------------------------------------------------------------------------- @@ -19471,17 +19469,17 @@ loc_18D9E: call sub_15A5C cmp byte_2D085, 0 jz short loc_18DBC - mov al, byte ptr word_26006 - add al, 0F8h + mov al, _bullet_template.BT_angle + add al, -8 jmp short loc_18DC1 ; --------------------------------------------------------------------------- loc_18DBC: - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 8 loc_18DC1: - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call snd_se_play pascal, 15 pop bp retn @@ -19514,46 +19512,46 @@ var_1 = byte ptr -1 idiv bx or dx, dx jnz loc_18EBA - mov byte ptr word_25FFA, 3 + mov _bullet_template.spawn_type, 3 mov _bullet_template.pattern, BP_SINGLE - mov byte ptr word_25FFA+1, 0 + mov _bullet_template.patnum, 0 call fp_25344 - mov byte ptr word_26006+1, 30h ; '0' + mov _bullet_template.speed, (3 shl 4) mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx or dx, dx jnz short loc_18E6A - mov byte ptr word_26006, 24h ; '$' + mov _bullet_template.BT_angle, 24h xor si, si jmp short loc_18E63 ; --------------------------------------------------------------------------- loc_18E21: - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle mov [bp+var_1], al call sub_15A5C - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 80h - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C mov al, 40h - sub al, byte ptr word_26006 - mov byte ptr word_26006, al + sub al, _bullet_template.BT_angle + mov _bullet_template.BT_angle, al call sub_15A5C - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 80h - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C mov al, [bp+var_1] - mov byte ptr word_26006, al - mov al, byte ptr word_26006+1 - add al, 0FBh - mov byte ptr word_26006+1, al - mov al, byte ptr word_26006 + mov _bullet_template.BT_angle, al + mov al, _bullet_template.speed + add al, -5 + mov _bullet_template.speed, al + mov al, _bullet_template.BT_angle add al, 8 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al inc si loc_18E63: @@ -19563,35 +19561,35 @@ loc_18E63: ; --------------------------------------------------------------------------- loc_18E6A: - mov byte ptr word_26006, 64h ; 'd' + mov _bullet_template.BT_angle, 64h xor si, si jmp short loc_18EB5 ; --------------------------------------------------------------------------- loc_18E73: - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle mov [bp+var_1], al call sub_15A5C - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 80h - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C - mov al, 0C0h - sub al, byte ptr word_26006 - mov byte ptr word_26006, al + mov al, -40h + sub al, _bullet_template.BT_angle + mov _bullet_template.BT_angle, al call sub_15A5C - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 80h - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C mov al, [bp+var_1] - mov byte ptr word_26006, al - mov al, byte ptr word_26006+1 - add al, 0FBh - mov byte ptr word_26006+1, al - mov al, byte ptr word_26006 + mov _bullet_template.BT_angle, al + mov al, _bullet_template.speed + add al, -5 + mov _bullet_template.speed, al + mov al, _bullet_template.BT_angle add al, 8 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al inc si loc_18EB5: @@ -19703,20 +19701,20 @@ sub_18F5C proc near ; --------------------------------------------------------------------------- loc_18F72: - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 54h ; 'T' + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_V_RED mov _bullet_template.pattern, BP_RING_STACK_AIMED mov al, byte_2D080 - mov byte ptr word_26006+1, al + mov _bullet_template.speed, al cmp byte_2D080, 20h ; ' ' jnb short loc_18F93 add al, 4 mov byte_2D080, al loc_18F93: - mov dword_26002, 9050818h - mov byte ptr word_26006, 0 - mov byte_26001, 2 + mov dword ptr _bullet_template.spread, (9 shl 24) or (5 shl 16) or (8 shl 8) or 24 + mov _bullet_template.BT_angle, 0 + mov _bullet_template.BT_special_motion, 2 mov byte_2C976, 1 push 1 call randring2_next16_and @@ -19759,12 +19757,12 @@ sub_18FE2 proc near idiv bx or dx, dx jnz short loc_19038 - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte ptr word_25FFA+1, 0 - mov byte_26001, 0Ah - mov byte ptr word_26006+1, 20h ; ' ' - mov word ptr dword_26002, 220h + mov _bullet_template.patnum, 0 + mov _bullet_template.BT_special_motion, 0Ah + mov _bullet_template.speed, (2 shl 4) + mov word ptr _bullet_template.spread, (2 shl 8) or 32 call fp_25344 mov ax, _boss_phase_frame mov bx, 64 @@ -19772,12 +19770,12 @@ sub_18FE2 proc near idiv bx or dx, dx jnz short loc_19029 - mov byte ptr word_26006, 1Fh + mov _bullet_template.BT_angle, 1Fh jmp short loc_1902E ; --------------------------------------------------------------------------- loc_19029: - mov byte ptr word_26006, 0E1h + mov _bullet_template.BT_angle, -1Fh loc_1902E: call sub_15A70 @@ -19802,10 +19800,10 @@ louise_update proc far mov ax, _boss_pos.cur.y mov _homing_target.y, ax inc _boss_phase_frame - mov byte ptr word_25FFA, 0 + mov _bullet_template.spawn_type, 0 mov eax, _boss_pos.cur - mov point_25FFC, eax - mov dword_2A722, eax + mov _bullet_template.BT_origin, eax + mov point_2A722, eax mov al, _boss_phase mov ah, 0 mov bx, ax @@ -20140,12 +20138,12 @@ sub_19327 proc near loc_19336: cmp _midboss_phase_frame, 32 jnz short loc_1937A - mov byte ptr word_25FFA, 2 - mov byte ptr word_25FFA+1, 2Ch ; ',' - mov byte ptr word_26006+1, 18h + mov _bullet_template.spawn_type, 2 + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE + mov _bullet_template.speed, (1 shl 4) + 8 mov _bullet_template.pattern, BP_SPREAD_STACK - mov dword_26002, 8041003h - mov byte ptr word_26006, 40h + mov dword ptr _bullet_template.spread, (8 shl 24) or (4 shl 16) or (16 shl 8) or 3 + mov _bullet_template.BT_angle, 40h loc_1935F: call fp_25344 @@ -20161,18 +20159,18 @@ loc_1935F: loc_1937A: cmp _midboss_phase_frame, 48 jnz short loc_19396 - mov byte ptr word_25FFA+1, 30h ; '0' - mov byte ptr word_26006+1, 30h ; '0' - mov dword_26002, 8040504h + mov _bullet_template.patnum, PAT_BULLET16_N_RED + mov _bullet_template.speed, (3 shl 4) + mov dword ptr _bullet_template.spread, (8 shl 24) or (4 shl 16) or (5 shl 8) or 4 jmp short loc_1935F ; --------------------------------------------------------------------------- loc_19396: cmp _midboss_phase_frame, 64 jnz short loc_193B2 - mov byte ptr word_25FFA+1, 2Ch ; ',' - mov byte ptr word_26006+1, 20h ; ' ' - mov dword_26002, 8040A07h + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE + mov _bullet_template.speed, (2 shl 4) + mov dword ptr _bullet_template.spread, (8 shl 24) or (4 shl 16) or (10 shl 8) or 7 jmp short loc_1935F ; --------------------------------------------------------------------------- @@ -20204,12 +20202,12 @@ sub_193BE proc near loc_193CD: cmp _midboss_phase_frame, 32 jnz short loc_193F5 - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 2Ch ; ',' - mov byte ptr word_26006+1, 18h + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE + mov _bullet_template.speed, (1 shl 4) + 8 mov _bullet_template.pattern, BP_STACK_AIMED - mov word ptr dword_26002+2, 808h - mov byte ptr word_26006, 0 + mov word ptr _bullet_template.BT_stack, (8 shl 8) or 8 + mov _bullet_template.BT_angle, 0 jmp short loc_19420 ; --------------------------------------------------------------------------- @@ -20217,14 +20215,14 @@ loc_193F5: cmp _midboss_phase_frame, 48 jnz short loc_19437 mov _bullet_template.pattern, BP_SPREAD_STACK_AIMED - mov byte ptr word_25FFA+1, 30h ; '0' - push (101h shl 16) or 402h - push (303h shl 16) or 404h + mov _bullet_template.patnum, PAT_BULLET16_N_RED + push (((1 shl 8) or 1) shl 16) or ((4 shl 8) or 2) + push (((3 shl 8) or 3) shl 16) or ((4 shl 8) or 4) loc_19412: call select_for_rank - mov word ptr dword_26002, ax - mov word ptr dword_26002+2, 808h + mov word ptr _bullet_template.spread, ax + mov word ptr _bullet_template.BT_stack, (8 shl 8) or 8 loc_19420: call sub_15A5C @@ -20239,9 +20237,9 @@ loc_19420: loc_19437: cmp _midboss_phase_frame, 64 jnz short loc_19451 - mov byte ptr word_25FFA+1, 2Ch ; ',' - push 1010503h - push 5040405h + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE + push (((1 shl 8) or 1) shl 16) or ((5 shl 8) or 3) + push (((5 shl 8) or 4) shl 16) or ((4 shl 8) or 5) jmp short loc_19412 ; --------------------------------------------------------------------------- @@ -20273,13 +20271,13 @@ sub_1945D proc near loc_1946C: cmp _midboss_phase_frame, 32 jnz short loc_194B1 - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 34h ; '4' - mov byte ptr word_26006+1, 30h ; '0' + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE + mov _bullet_template.speed, (3 shl 4) mov _bullet_template.pattern, BP_SPREAD - mov byte ptr dword_26002, 10h - mov byte ptr dword_26002+1, 8 - mov byte ptr word_26006, 40h + mov _bullet_template.spread, 16 + mov _bullet_template.spread_angle_delta, 8 + mov _bullet_template.BT_angle, 40h loc_19496: call fp_25344 @@ -20295,17 +20293,17 @@ loc_19496: loc_194B1: cmp _midboss_phase_frame, 48 jnz short loc_194C9 - mov byte ptr word_26006+1, 30h ; '0' - mov byte ptr dword_26002, 15h - mov byte ptr dword_26002+1, 4 + mov _bullet_template.speed, (3 shl 4) + mov _bullet_template.spread, 21 + mov _bullet_template.spread_angle_delta, 4 jmp short loc_19496 ; --------------------------------------------------------------------------- loc_194C9: cmp _midboss_phase_frame, 64 jnz short loc_194DC - mov byte ptr dword_26002, 10h - mov byte ptr dword_26002+1, 8 + mov _bullet_template.spread, 16 + mov _bullet_template.spread_angle_delta, 8 jmp short loc_19496 ; --------------------------------------------------------------------------- @@ -20329,8 +20327,8 @@ midboss3_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur - mov point_25FFC, eax - mov dword_2A722, eax + mov _bullet_template.BT_origin, eax + mov point_2A722, eax inc _midboss_phase_frame mov al, _midboss_phase mov ah, 0 @@ -20778,14 +20776,14 @@ loc_198CF: jnb short loc_19912 cmp _stage_frame_mod2, 0 jz short loc_19912 - mov byte ptr word_25FFA+1, 0 - mov byte ptr word_25FFA, 10h - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.patnum, 0 + mov _bullet_template.spawn_type, 10h + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_SINGLE mov eax, [si+2] - mov point_25FFC, eax + mov _bullet_template.BT_origin, eax call randring2_next16 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call fp_25344 call sub_15A5C mov word ptr [si+12h], 0C2h @@ -20834,14 +20832,14 @@ loc_19940: mov word ptr [si+12h], 0C2h cmp word ptr [si+0Eh], 20h ; ' ' jnz short loc_19984 - mov byte ptr word_25FFA+1, 0 + mov _bullet_template.patnum, 0 mov eax, [si+2] - mov point_25FFC, eax - mov byte ptr word_25FFA, 10h - mov byte ptr word_26006+1, 18h + mov _bullet_template.BT_origin, eax + mov _bullet_template.spawn_type, 10h + mov _bullet_template.speed, (1 shl 4) + 8 mov _bullet_template.pattern, BP_SPREAD_STACK_AIMED - mov dword_26002, 5051203h - mov byte ptr word_26006, 0 + mov dword ptr _bullet_template.spread, (5 shl 24) or (5 shl 16) or (18 shl 8) or 3 + mov _bullet_template.BT_angle, 0 call fp_25344 call sub_15A5C jmp short loc_19993 @@ -20891,14 +20889,14 @@ loc_199B2: jnb short loc_199F9 test byte ptr [si+0Eh], 7 jnz short loc_199F9 - mov byte ptr word_25FFA+1, 0 + mov _bullet_template.patnum, 0 mov eax, [si+2] - mov point_25FFC, eax - mov byte ptr word_25FFA, 10h - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.BT_origin, eax + mov _bullet_template.spawn_type, 10h + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_SPREAD_AIMED - mov word ptr dword_26002, 1005h - mov byte ptr word_26006, 0 + mov word ptr _bullet_template.spread, (16 shl 8) or 5 + mov _bullet_template.BT_angle, 0 call fp_25344 call sub_15A5C jmp short loc_19A08 @@ -20948,14 +20946,14 @@ loc_19A27: jnb short loc_19A6E test byte ptr [si+0Eh], 7 jnz short loc_19A6E - mov byte ptr word_25FFA+1, 0 + mov _bullet_template.patnum, 0 mov eax, [si+2] - mov point_25FFC, eax - mov byte ptr word_25FFA, 10h - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.BT_origin, eax + mov _bullet_template.spawn_type, 10h + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_RING_AIMED - mov word ptr dword_26002, 80Ch - mov byte ptr word_26006, 0 + mov word ptr _bullet_template.spread, (8 shl 8) or 12 + mov _bullet_template.BT_angle, 0 call fp_25344 call sub_15A5C jmp short loc_19A7D @@ -21003,14 +21001,14 @@ loc_19A9C: mov word ptr [si+12h], 0C2h test byte ptr _stage_frame, 1Fh jnz short loc_19ADC - mov byte ptr word_25FFA+1, 0 + mov _bullet_template.patnum, 0 mov eax, [si+2] - mov point_25FFC, eax - mov byte ptr word_25FFA, 10h - mov byte ptr word_26006+1, 18h + mov _bullet_template.BT_origin, eax + mov _bullet_template.spawn_type, 10h + mov _bullet_template.speed, (1 shl 4) + 8 mov _bullet_template.pattern, BP_SPREAD_AIMED - mov word ptr dword_26002, 0C07h - mov byte ptr word_26006, 0 + mov word ptr _bullet_template.spread, (12 shl 8) or 7 + mov _bullet_template.BT_angle, 0 call fp_25344 call sub_15A5C @@ -21088,9 +21086,9 @@ sub_19B04 proc near loc_19B2F: cmp _boss_phase_frame, 64 jnz short loc_19B9B - mov byte ptr word_25FFA, 2 + mov _bullet_template.spawn_type, 2 mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED - mov byte ptr dword_26002, 2 + mov _bullet_template.spread, 2 call fp_25344 xor si, si jmp short loc_19B8A @@ -21099,7 +21097,7 @@ loc_19B2F: loc_19B4D: test si, 1 jz short loc_19B57 - mov al, 2Ch ; ',' + mov al, PAT_BULLET16_N_BLUE jmp short loc_19B59 ; --------------------------------------------------------------------------- @@ -21107,21 +21105,18 @@ loc_19B57: mov al, 0 loc_19B59: - mov byte ptr word_25FFA+1, al - push 3Fh ; '?' - call randring2_next16_and - add al, 0Ch - mov byte ptr word_26006+1, al - push 300h - call randring2_next16_mod + mov _bullet_template.patnum, al + call randring2_next16_and pascal, 3Fh + add al, 12 + mov _bullet_template.speed, al + call randring2_next16_mod pascal, (48 shl 4) add ax, _boss_pos.cur.x sub ax, (24 shl 4) - mov point_25FFC.x, ax - push 300h - call randring2_next16_mod + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (48 shl 4) add ax, _boss_pos.cur.y sub ax, (32 shl 4) - mov point_25FFC.y, ax + mov _bullet_template.BT_origin.y, ax call sub_15A5C inc si @@ -21184,12 +21179,12 @@ sub_19BB8 proc near loc_19BE2: cmp _boss_phase_frame, 64 jnz short loc_19C20 - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_RING_STACK_AIMED - mov byte ptr word_25FFA+1, 30h ; '0' - mov dword_26002, 804081Ch - mov byte ptr word_26006+1, 18h - mov byte ptr word_26006, 0 + mov _bullet_template.patnum, PAT_BULLET16_N_RED + mov dword ptr _bullet_template.spread, (8 shl 24) or (4 shl 16) or (8 shl 8) or 28 + mov _bullet_template.speed, (1 shl 4) + 8 + mov _bullet_template.BT_angle, 0 call fp_25344 call sub_15A5C mov _boss_sprite, 180 @@ -21237,12 +21232,12 @@ sub_19C34 proc near loc_19C5E: cmp _boss_phase_frame, 64 jnz short loc_19C9C - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_SPREAD_STACK_AIMED - mov byte ptr word_25FFA+1, 2Ch ; ',' - mov dword_26002, 7050807h - mov byte ptr word_26006+1, 18h - mov byte ptr word_26006, 0 + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE + mov dword ptr _bullet_template.spread, (7 shl 24) or (5 shl 16) or (8 shl 8) or 7 + mov _bullet_template.speed, (1 shl 4) + 8 + mov _bullet_template.BT_angle, 0 call fp_25344 call sub_15A5C mov _boss_sprite, 180 @@ -21334,9 +21329,9 @@ loc_19D4C: ; --------------------------------------------------------------------------- loc_19D56: - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 0 - mov byte ptr word_26006+1, 18h + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, 0 + mov _bullet_template.speed, (1 shl 4) + 8 mov _bullet_template.pattern, BP_SINGLE call fp_25344 mov word_2CED6, 380h @@ -21375,16 +21370,16 @@ loc_19DBD: idiv bx cmp dx, word_2CE30 jnb short locret_19E10 - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_STACK_AIMED - mov byte ptr word_26006, 0 + mov _bullet_template.BT_angle, 0 mov ax, _boss_pos.cur.x - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) - mov point_25FFC.y, ax - mov word ptr dword_26002+2, 608h - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.BT_origin.y, ax + mov word ptr _bullet_template.BT_stack, (6 shl 8) or 8 + mov _bullet_template.speed, (2 shl 4) call fp_25344 call sub_15A5C call snd_se_play pascal, 3 @@ -21422,7 +21417,7 @@ loc_19E43: jnz short loc_19EC6 mov _laser_template.LASER_color, 6 mov _laser_template.coords.LASER_width, 8 - mov eax, point_25FFC + mov eax, _bullet_template.BT_origin mov _laser_template.coords.origin, eax mov _laser_template.grow_at_age, 40 mov _laser_template.shootout_speed, (5 shl 4) @@ -21443,12 +21438,12 @@ loc_19E43: add al, -32 mov _laser_template.coords.angle, al call lasers_add_shoutout - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED - mov byte ptr word_25FFA+1, 2Ch ; ',' - mov word ptr dword_26002, 814h - mov byte ptr word_26006+1, 18h - mov byte ptr word_26006, 0 + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE + mov word ptr _bullet_template.spread, (8 shl 8) or 20 + mov _bullet_template.speed, (1 shl 4) + 8 + mov _bullet_template.BT_angle, 0 call fp_25344 call sub_15A5C mov _boss_sprite, 180 @@ -21498,18 +21493,18 @@ loc_19F0E: idiv bx or dx, dx jnz short loc_19F61 - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_STACK_AIMED - mov byte ptr word_25FFA+1, 2Ch ; ',' - mov word ptr dword_26002+2, 708h - mov byte ptr word_26006+1, 18h + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE + mov word ptr _bullet_template.BT_stack, (7 shl 8) or 8 + mov _bullet_template.speed, (1 shl 4) + 8 call fp_25344 mov al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle neg al - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C mov al, byte_2D085 add al, 5 @@ -21559,14 +21554,14 @@ loc_19FA9: idiv bx or dx, dx jnz short loc_19FF1 - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_RING - mov byte ptr word_25FFA+1, 30h ; '0' - mov word ptr dword_26002, 714h - mov byte ptr word_26006+1, 28h ; '(' + mov _bullet_template.patnum, PAT_BULLET16_N_RED + mov word ptr _bullet_template.spread, (7 shl 8) or 20 + mov _bullet_template.speed, (2 shl 4) + 8 call fp_25344 mov al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C mov al, byte_2D085 add al, 2 @@ -21593,18 +21588,18 @@ sub_19F75 endp sub_1A005 proc near push bp mov bp, sp - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_SPREAD - mov byte ptr word_26006, 40h - mov byte ptr word_25FFA+1, 54h ; 'T' + mov _bullet_template.BT_angle, 40h + mov _bullet_template.patnum, PAT_BULLET16_V_RED mov ax, _boss_phase_frame mov bx, 32 cwd idiv bx or dx, dx jnz short loc_1A042 - mov byte ptr word_26006+1, 20h ; ' ' - mov word ptr dword_26002, 0A0Dh + mov _bullet_template.speed, (2 shl 4) + mov word ptr _bullet_template.spread, (10 shl 8) or 13 call fp_25344 call sub_15A5C call snd_se_play pascal, 3 @@ -21629,14 +21624,14 @@ alice_update proc far mov ax, _boss_pos.cur.y mov _homing_target.y, ax inc _boss_phase_frame - mov byte ptr word_25FFA, 0 + mov _bullet_template.spawn_type, 0 mov ax, _boss_pos.cur.x - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) - mov point_25FFC.y, ax - mov eax, point_25FFC - mov dword_2A722, eax + mov _bullet_template.BT_origin.y, ax + mov eax, _bullet_template.BT_origin + mov point_2A722, eax mov al, _boss_phase mov ah, 0 mov bx, ax @@ -22168,7 +22163,7 @@ mai_yuki_1A556 proc near cmp _boss_phase_frame, 48 jge short loc_1A58D mov eax, _boss_pos.cur - mov dword_2A722, eax + mov point_2A722, eax mov ax, _boss_phase_frame add ax, -24 push ax @@ -22213,7 +22208,7 @@ mai_yuki_1A5B3 proc near cmp _boss_phase_frame, 48 jge short loc_1A5DC mov eax, _yuki_pos.cur - mov dword_2A722, eax + mov point_2A722, eax mov ax, _boss_phase_frame add ax, -24 push ax @@ -22249,23 +22244,21 @@ sub_1A5EB proc near idiv bx or dx, dx jnz short loc_1A641 - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_STACK_AIMED - push 3Fh ; '?' - call randring2_next16_and - sub al, 20h ; ' ' - mov byte ptr word_26006, al - mov byte ptr word_25FFA+1, 2Fh ; '/' + call randring2_next16_and pascal, 3Fh + sub al, 20h + mov _bullet_template.BT_angle, al + mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_BLUE mov ax, _boss_pos.cur.x - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) - mov point_25FFC.y, ax - mov word ptr dword_26002+2, 602h - push 1Fh - call randring2_next16_and - add al, 10h - mov byte ptr word_26006+1, al + mov _bullet_template.BT_origin.y, ax + mov word ptr _bullet_template.BT_stack, (6 shl 8) or 2 + call randring2_next16_and pascal, 1Fh + add al, (1 shl 4) + mov _bullet_template.speed, al call fp_25344 call sub_15A5C call snd_se_play pascal, 3 @@ -22294,18 +22287,18 @@ sub_1A651 proc near mov bp, sp cmp _boss_phase_frame, 48 jnz short loc_1A69C - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte_26001, 1 - mov byte ptr word_26006, 0 - mov byte ptr word_25FFA+1, 74h ; 't' + mov _bullet_template.BT_special_motion, 1 + mov _bullet_template.BT_angle, 0 + mov _bullet_template.patnum, PAT_BULLET16_V_BLUE mov ax, _boss_pos.cur.x - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) - mov point_25FFC.y, ax - mov word ptr dword_26002, 810h - mov byte ptr word_26006+1, 3Ch ; '<' + mov _bullet_template.BT_origin.y, ax + mov word ptr _bullet_template.spread, (8 shl 8) or 16 + mov _bullet_template.speed, (3 shl 4) + 12 call fp_25344 call sub_15A9C call snd_se_play pascal, 3 @@ -22343,20 +22336,20 @@ loc_1A6BA: idiv bx or dx, dx jnz short loc_1A709 - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_SPREAD mov al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al add al, 5 mov byte_2D085, al - mov byte ptr word_25FFA+1, 0 + mov _bullet_template.patnum, 0 mov ax, _boss_pos.cur.x - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) - mov point_25FFC.y, ax - mov word ptr dword_26002, 0A05h - mov byte ptr word_26006+1, 32h ; '2' + mov _bullet_template.BT_origin.y, ax + mov word ptr _bullet_template.spread, (10 shl 8) or 5 + mov _bullet_template.speed, (3 shl 4) + 2 call fp_25344 call sub_15A8E call snd_se_play pascal, 3 @@ -22389,17 +22382,17 @@ sub_1A719 proc near idiv bx or dx, dx jnz short loc_1A765 - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_SPREAD - mov byte ptr word_26006, 40h - mov byte ptr word_25FFA+1, 2Eh ; '.' + mov _bullet_template.BT_angle, 40h + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_BLUE mov ax, _boss_pos.cur.x - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) - mov point_25FFC.y, ax - mov word ptr dword_26002, 0C08h - mov byte ptr word_26006+1, 40h + mov _bullet_template.BT_origin.y, ax + mov word ptr _bullet_template.spread, (12 shl 8) or 8 + mov _bullet_template.speed, (4 shl 4) call fp_25344 call sub_15A5C call snd_se_play pascal, 3 @@ -22530,20 +22523,20 @@ loc_1A843: idiv bx or dx, dx jnz short loc_1A8B9 - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_RING mov al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al mov al, byte_2D082 add byte_2D085, al - mov byte ptr word_25FFA+1, 2Eh ; '.' + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_BLUE mov ax, _boss_pos.cur.x - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) - mov point_25FFC.y, ax - mov byte ptr dword_26002, 4 - mov byte ptr word_26006+1, 26h ; '&' + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.spread, 4 + mov _bullet_template.speed, (2 shl 4) + 6 call fp_25344 call sub_15A5C mov ax, _boss_phase_frame @@ -22593,24 +22586,22 @@ mai_yuki_1A8C9 proc near idiv bx or dx, dx jnz short loc_1A91D - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_SPREAD_AIMED - push 3Fh ; '?' - call randring2_next16_and - sub al, 20h ; ' ' - mov byte ptr word_26006, al - mov byte ptr word_25FFA+1, 32h ; '2' + call randring2_next16_and pascal, 3Fh + sub al, 20h + mov _bullet_template.BT_angle, al + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED mov ax, _yuki_pos.cur.x - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) - mov point_25FFC.y, ax - mov word ptr dword_26002, 507h - mov byte_26001, 0Ah - push 31 - call randring2_next16_and - add al, 10h - mov byte ptr word_26006+1, al + mov _bullet_template.BT_origin.y, ax + mov word ptr _bullet_template.spread, (5 shl 8) or 7 + mov _bullet_template.BT_special_motion, 0Ah + call randring2_next16_and pascal, 1Fh + add al, (1 shl 4) + mov _bullet_template.speed, al call fp_25344 call sub_15A70 @@ -22634,18 +22625,18 @@ sub_1A921 proc near idiv bx or dx, dx jnz short loc_1A966 - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_RING call randring2_next16 - mov byte ptr word_26006, al - mov byte ptr word_25FFA+1, 32h ; '2' + mov _bullet_template.BT_angle, al + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED mov ax, _yuki_pos.cur.x - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) - mov point_25FFC.y, ax - mov byte ptr dword_26002, 20h ; ' ' - mov byte ptr word_26006+1, 28h ; '(' + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.spread, 32 + mov _bullet_template.speed, (2 shl 4) + 8 call fp_25344 call sub_15A5C @@ -22669,17 +22660,17 @@ sub_1A96A proc near idiv bx or dx, dx jnz short loc_1A9AF - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_STACK_AIMED - mov byte ptr word_26006, 0 - mov byte ptr word_25FFA+1, 32h ; '2' + mov _bullet_template.BT_angle, 0 + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED mov ax, _yuki_pos.cur.x - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) - mov point_25FFC.y, ax - mov word ptr dword_26002+2, 408h - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.BT_origin.y, ax + mov word ptr _bullet_template.BT_stack, (4 shl 8) or 8 + mov _bullet_template.speed, (2 shl 4) call fp_25344 call sub_15A5C @@ -22703,17 +22694,17 @@ mai_yuki_1A9B3 proc near idiv bx or dx, dx jnz short loc_1A9FF - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_SPREAD - mov byte ptr word_26006, 40h - mov byte ptr word_25FFA+1, 32h ; '2' + mov _bullet_template.BT_angle, 40h + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED mov ax, _yuki_pos.cur.x - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) - mov point_25FFC.y, ax - mov word ptr dword_26002, 0C08h - mov byte ptr word_26006+1, 40h + mov _bullet_template.BT_origin.y, ax + mov word ptr _bullet_template.spread, (12 shl 8) or 8 + mov _bullet_template.speed, (4 shl 4) call fp_25344 call sub_15A5C call snd_se_play pascal, 3 @@ -22738,17 +22729,17 @@ mai_yuki_1AA03 proc near idiv bx or dx, dx jnz short loc_1AA48 - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_STACK_AIMED - mov byte ptr word_26006, 0 - mov byte ptr word_25FFA+1, 30h ; '0' + mov _bullet_template.BT_angle, 0 + mov _bullet_template.patnum, PAT_BULLET16_N_RED mov ax, _yuki_pos.cur.x - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) - mov point_25FFC.y, ax - mov word ptr dword_26002+2, 608h - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.BT_origin.y, ax + mov word ptr _bullet_template.BT_stack, (6 shl 8) or 8 + mov _bullet_template.speed, (2 shl 4) call fp_25344 call sub_15A5C @@ -22772,21 +22763,20 @@ mai_yuki_1AA4C proc near idiv bx or dx, dx jnz short loc_1AA97 - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_SPREAD call randring2_next16 - mov byte ptr word_26006, al - mov byte ptr word_25FFA+1, 0 + mov _bullet_template.BT_angle, al + mov _bullet_template.patnum, 0 mov ax, _yuki_pos.cur.x - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) - mov point_25FFC.y, ax - mov word ptr dword_26002, 202h - push 31 - call randring2_next16_and - add al, 18h - mov byte ptr word_26006+1, al + mov _bullet_template.BT_origin.y, ax + mov word ptr _bullet_template.spread, (2 shl 8) or 2 + call randring2_next16_and pascal, 1Fh + add al, (1 shl 4) + 8 + mov _bullet_template.speed, al call fp_25344 call sub_15A5C @@ -22816,20 +22806,20 @@ loc_1AAAF: idiv bx or dx, dx jnz short loc_1AB1B - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_RING mov al, byte_2D084 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al mov al, byte_2D083 add byte_2D084, al - mov byte ptr word_25FFA+1, 32h ; '2' + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED mov ax, _yuki_pos.cur.x - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) - mov point_25FFC.y, ax - mov byte ptr dword_26002, 4 - mov byte ptr word_26006+1, 26h ; '&' + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.spread, 4 + mov _bullet_template.speed, (2 shl 4) + 6 call fp_25344 call sub_15A5C mov ax, _boss_phase_frame @@ -23476,9 +23466,9 @@ sub_1B0A4 proc near cmp _midboss_phase_frame, 16 jnz short loc_1B0CE call snd_se_play pascal, 8 - mov byte ptr word_25FFA, 2 + mov _bullet_template.spawn_type, 2 mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED - mov byte ptr dword_26002, 7 + mov _bullet_template.spread, 7 call fp_25344 mov _midboss_sprite, 212 @@ -23493,7 +23483,7 @@ loc_1B0CE: idiv bx or dx, dx jnz short loc_1B139 - mov byte ptr word_26006+1, 8 + mov _bullet_template.speed, 8 xor si, si jmp short loc_1B12D ; --------------------------------------------------------------------------- @@ -23509,21 +23499,19 @@ loc_1B0FC: mov al, 0 loc_1B0FE: - mov byte ptr word_25FFA+1, al - push 300h - call randring2_next16_mod + mov _bullet_template.patnum, al + call randring2_next16_mod pascal, (48 shl 4) add ax, _midboss_pos.cur.x sub ax, (24 shl 4) - mov point_25FFC.x, ax - push 300h - call randring2_next16_mod + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (48 shl 4) add ax, _midboss_pos.cur.y sub ax, (32 shl 4) - mov point_25FFC.y, ax + mov _bullet_template.BT_origin.y, ax call sub_15A8E - mov al, byte ptr word_26006+1 - add al, 10h - mov byte ptr word_26006+1, al + mov al, _bullet_template.speed + add al, (1 shl 4) + mov _bullet_template.speed, al inc si loc_1B12D: @@ -23556,10 +23544,10 @@ sub_1B153 proc near jnz short loc_1B17C call snd_se_play pascal, 8 mov _bullet_template.pattern, BP_RING - mov byte ptr dword_26002, 10h + mov _bullet_template.spread, 16 call fp_25344 mov _midboss_sprite, 212 - mov byte ptr word_25FFA+1, 54h ; 'T' + mov _bullet_template.patnum, PAT_BULLET16_V_RED loc_1B17C: cmp _midboss_phase_frame, 48 @@ -23578,20 +23566,20 @@ loc_1B17C: idiv bx or dx, dx jnz short loc_1B1B0 - mov byte ptr word_26006+1, 38h ; '8' - mov byte ptr word_25FFA, 2 + mov _bullet_template.speed, (3 shl 4) + 8 + mov _bullet_template.spawn_type, 2 jmp short loc_1B1BA ; --------------------------------------------------------------------------- loc_1B1B0: - mov byte ptr word_26006+1, 28h ; '(' - mov byte ptr word_25FFA, 0 + mov _bullet_template.speed, (2 shl 4) + 8 + mov _bullet_template.spawn_type, 0 loc_1B1BA: call sub_15A5C - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 4 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call snd_se_play pascal, 3 loc_1B1CC: @@ -23617,12 +23605,12 @@ sub_1B1E5 proc near cmp _midboss_phase_frame, 16 jnz short loc_1B221 call snd_se_play pascal, 8 - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_SPREAD_STACK_AIMED - mov byte ptr word_26006, 20h ; ' ' - mov dword_26002, 4040803h - mov byte ptr word_26006+1, 10h - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.BT_angle, 20h + mov dword ptr _bullet_template.spread, (4 shl 24) or (4 shl 16) or (8 shl 8) or 3 + mov _bullet_template.speed, (1 shl 4) + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE call fp_25344 mov _midboss_sprite, 212 @@ -23638,12 +23626,12 @@ loc_1B221: or dx, dx jnz short loc_1B256 call sub_15A5C - mov al, byte ptr word_26006+1 - add al, 0Ch - mov byte ptr word_26006+1, al - mov al, byte ptr word_26006 - add al, 0F8h - mov byte ptr word_26006, al + mov al, _bullet_template.speed + add al, 12 + mov _bullet_template.speed, al + mov al, _bullet_template.BT_angle + add al, -8 + mov _bullet_template.BT_angle, al call snd_se_play pascal, 15 loc_1B256: @@ -23668,8 +23656,8 @@ midboss4_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur - mov point_25FFC, eax - mov dword_2A722, eax + mov _bullet_template.BT_origin, eax + mov point_2A722, eax inc _midboss_phase_frame mov al, _midboss_phase mov ah, 0 @@ -23972,7 +23960,7 @@ loc_1B4D2: cmp word ptr [si+4], 0F00h jg short loc_1B52C mov eax, [si+2] - mov point_25FFC, eax + mov _bullet_template.BT_origin, eax call sub_15A5C loc_1B52C: @@ -24019,14 +24007,14 @@ sub_1B557 proc near call randring2_next16 mov byte_2D085, al mov byte_2D084, 1 - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_RING - mov byte_26001, 0Ah - mov byte ptr word_25FFA+1, 32h ; '2' + mov _bullet_template.BT_special_motion, 0Ah + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED mov al, _rank add al, 5 - mov byte ptr dword_26002, al - mov byte ptr word_26006+1, 36h ; '6' + mov _bullet_template.spread, al + mov _bullet_template.speed, (3 shl 4) + 6 mov _boss_sprite, 208 call fp_25344 jmp loc_1B624 @@ -24042,7 +24030,7 @@ loc_1B599: or dx, dx jnz short loc_1B5E2 mov al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al mov al, byte_2D084 add byte_2D085, al call sub_15A70 @@ -24106,11 +24094,11 @@ sub_1B628 proc near mov bp, sp cmp _boss_phase_frame, 8 jnz short loc_1B64D - mov byte ptr word_26006, 80h - mov byte ptr word_25FFA, 12h + mov _bullet_template.BT_angle, 80h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_SPREAD mov _boss_sprite, 208 - mov byte ptr word_25FFA+1, 30h ; '0' + mov _bullet_template.patnum, PAT_BULLET16_N_RED jmp short loc_1B6C0 ; --------------------------------------------------------------------------- @@ -24123,19 +24111,18 @@ loc_1B64D: idiv bx or dx, dx jnz short loc_1B68E - push 1Fh - call randring2_next16_and + call randring2_next16_and pascal, 1Fh add al, 8 - mov byte ptr word_26006+1, al + mov _bullet_template.speed, al push 7 call randring2_next16_and - mov byte ptr dword_26002, al - mov byte ptr dword_26002+1, 6 + mov _bullet_template.spread, al + mov _bullet_template.spread_angle_delta, 6 call fp_25344 call sub_15A5C - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 6 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call snd_se_play pascal, 3 loc_1B68E: @@ -24176,10 +24163,10 @@ sub_1B6C4 proc near mov bp, sp cmp _boss_phase_frame, 8 jnz short loc_1B6ED - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_RING - mov byte ptr word_25FFA+1, 0 - mov byte ptr dword_26002, 18h + mov _bullet_template.patnum, 0 + mov _bullet_template.spread, 24 call fp_25344 mov _boss_sprite, 208 jmp short loc_1B750 @@ -24195,11 +24182,10 @@ loc_1B6ED: or dx, dx jnz short loc_1B71B call randring2_next16 - mov byte ptr word_26006, al - push 1Fh - call randring2_next16_and - add al, 20h ; ' ' - mov byte ptr word_26006+1, al + mov _bullet_template.BT_angle, al + call randring2_next16_and pascal, 1Fh + add al, (2 shl 4) + mov _bullet_template.speed, al call sub_15A5C call snd_se_play pascal, 15 @@ -24247,11 +24233,11 @@ sub_1B754 proc near push ax push 90008h call sub_16A6B - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte ptr word_25FFA+1, 30h ; '0' - mov word ptr dword_26002, 0C05h - mov byte ptr word_26006, 0 + mov _bullet_template.patnum, PAT_BULLET16_N_RED + mov word ptr _bullet_template.spread, (12 shl 8) or 5 + mov _bullet_template.BT_angle, 0 call fp_25344 mov _boss_sprite, 208 mov byte_2BC88, 40h @@ -24265,10 +24251,9 @@ loc_1B799: idiv bx or dx, dx jnz short loc_1B7F9 - push 1Fh - call randring2_next16_and - add al, 10h - mov byte ptr word_26006+1, al + call randring2_next16_and pascal, 1Fh + add al, (1 shl 4) + mov _bullet_template.speed, al call sub_15A5C push point_2BC72.x push point_2BC72.y @@ -24403,12 +24388,12 @@ sub_1B8C8 proc near mov bp, sp cmp _boss_phase_frame, 24 jnz short loc_1B8FC - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_STACK - mov byte ptr word_25FFA+1, 54h ; 'T' - mov word ptr dword_26002+2, 608h - mov byte ptr word_26006, 10h - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.patnum, PAT_BULLET16_V_RED + mov word ptr _bullet_template.BT_stack, (6 shl 8) or 8 + mov _bullet_template.BT_angle, 10h + mov _bullet_template.speed, (2 shl 4) call fp_25344 mov _boss_sprite, 208 jmp short loc_1B96F @@ -24424,7 +24409,7 @@ loc_1B8FC: or dx, dx jnz short loc_1B927 mov al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C mov al, byte_2D084 add byte_2D085, al @@ -24480,17 +24465,17 @@ sub_1B973 proc near mov bp, sp cmp _boss_phase_frame, 8 jnz short loc_1B9AC - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_RANDOM_ANGLE - mov byte_26001, 3 + mov _bullet_template.BT_special_motion, 3 mov byte_2C976, 1 - mov byte ptr word_25FFA+1, 54h ; 'T' + mov _bullet_template.patnum, PAT_BULLET16_V_RED mov al, _rank add al, al add al, 4 - mov byte ptr dword_26002, al + mov _bullet_template.spread, al mov _boss_sprite, 208 - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.speed, (2 shl 4) jmp short loc_1B9EE ; --------------------------------------------------------------------------- @@ -24545,8 +24530,8 @@ yuki_update proc far mov bp, sp mov eax, _boss_pos.cur mov _homing_target, eax - mov point_25FFC, eax - mov dword_2A722, eax + mov _bullet_template.BT_origin, eax + mov point_2A722, eax mov point_2BC72, eax inc _boss_phase_frame mov al, _boss_phase @@ -24864,11 +24849,11 @@ sub_1BD2C proc near push si cmp _boss_phase_frame, 32 jnz short loc_1BD57 - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_SPREAD - mov byte ptr word_25FFA+1, 2Eh ; '.' - mov byte ptr dword_26002, 2 - mov byte ptr word_26006, 40h + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_BLUE + mov _bullet_template.spread, 2 + mov _bullet_template.BT_angle, 40h mov _boss_sprite, 192 jmp short loc_1BDCB ; --------------------------------------------------------------------------- @@ -24882,20 +24867,20 @@ loc_1BD57: idiv bx or dx, dx jnz short loc_1BD99 - mov byte ptr dword_26002+1, 0Ch - mov byte ptr word_26006+1, 30h ; '0' + mov _bullet_template.spread_angle_delta, 12 + mov _bullet_template.speed, (3 shl 4) xor si, si jmp short loc_1BD8D ; --------------------------------------------------------------------------- loc_1BD79: call sub_15A5C - mov al, byte ptr dword_26002+1 + mov al, _bullet_template.spread_angle_delta add al, 8 - mov byte ptr dword_26002+1, al - mov al, byte ptr word_26006+1 + mov _bullet_template.spread_angle_delta, al + mov al, _bullet_template.speed add al, 6 - mov byte ptr word_26006+1, al + mov _bullet_template.speed, al inc si loc_1BD8D: @@ -24943,16 +24928,16 @@ sub_1BDD0 proc near mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_1BE12 - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_STACK mov byte_2C976, 1 - mov byte_26001, 2 - mov byte ptr word_25FFA+1, 74h ; 't' + mov _bullet_template.BT_special_motion, 2 + mov _bullet_template.patnum, PAT_BULLET16_V_BLUE mov al, _rank add al, 4 - mov byte ptr dword_26002+2, al - mov byte ptr dword_26002+3, 10h - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.BT_stack, al + mov _bullet_template.stack_speed_delta, (1 shl 4) + mov _bullet_template.speed, (2 shl 4) mov _boss_sprite, 192 mov byte_2D085, 60h jmp loc_1BE92 @@ -24974,7 +24959,7 @@ loc_1BE12: or dx, dx jnz short loc_1BE40 mov al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al mov byte_2C977, 0C0h jmp short loc_1BE4E ; --------------------------------------------------------------------------- @@ -24982,7 +24967,7 @@ loc_1BE12: loc_1BE40: mov al, 80h sub al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al mov byte_2C977, 40h loc_1BE4E: @@ -25037,13 +25022,13 @@ sub_1BE96 proc near mov si, dx or si, si jnz short loc_1BED4 - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_SPREAD - mov byte_26001, 2 - mov byte ptr word_25FFA+1, 74h ; 't' - mov word ptr dword_26002, 0C03h - mov byte ptr word_26006+1, 30h ; '0' - mov byte ptr word_26006, 0 + mov _bullet_template.BT_special_motion, 2 + mov _bullet_template.patnum, PAT_BULLET16_V_BLUE + mov word ptr _bullet_template.spread, (12 shl 8) or 3 + mov _bullet_template.speed, (3 shl 4) + mov _bullet_template.BT_angle, 0 call fp_25344 loc_1BED4: @@ -25056,9 +25041,9 @@ loc_1BED4: or dx, dx jnz short loc_1BEF1 call sub_15A5C - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 6 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al loc_1BEF1: pop si @@ -25083,13 +25068,13 @@ sub_1BEF4 proc near mov si, dx or si, si jnz short loc_1BF31 - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_RING - mov byte_26001, 2 - mov byte ptr word_25FFA+1, 74h ; 't' - mov byte ptr dword_26002, 18h - mov byte ptr word_26006+1, 30h ; '0' - mov byte ptr word_26006, 0 + mov _bullet_template.BT_special_motion, 2 + mov _bullet_template.patnum, PAT_BULLET16_V_BLUE + mov _bullet_template.spread, 24 + mov _bullet_template.speed, (3 shl 4) + mov _bullet_template.BT_angle, 0 call fp_25344 loc_1BF31: @@ -25102,7 +25087,7 @@ loc_1BF31: or dx, dx jnz short loc_1BF4A call sub_15A5C - inc byte ptr word_26006 + inc _bullet_template.BT_angle loc_1BF4A: pop si @@ -25132,11 +25117,11 @@ sub_1BF4D proc near mov word_2BC84, 18h mov word_2BC80, 1 mov word_2BC82, 0D4h - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_RANDOM_ANGLE - mov byte ptr word_25FFA+1, 0 - mov byte ptr dword_26002, 4 - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.patnum, 0 + mov _bullet_template.spread, 4 + mov _bullet_template.speed, (2 shl 4) call fp_25344 loc_1BF9C: @@ -25198,25 +25183,25 @@ loc_1C004: idiv bx or dx, dx jnz loc_1C0AD - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_SPREAD - mov byte ptr word_25FFA+1, 2Dh ; '-' - mov byte ptr dword_26002, 2 - mov byte ptr word_26006, 40h - mov byte ptr dword_26002+1, 0Ch - mov byte ptr word_26006+1, 30h ; '0' + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE + mov _bullet_template.spread, 2 + mov _bullet_template.BT_angle, 40h + mov _bullet_template.spread_angle_delta, 12 + mov _bullet_template.speed, (3 shl 4) xor si, si jmp short loc_1C057 ; --------------------------------------------------------------------------- loc_1C043: call sub_15A5C - mov al, byte ptr dword_26002+1 + mov al, _bullet_template.spread_angle_delta add al, 8 - mov byte ptr dword_26002+1, al - mov al, byte ptr word_26006+1 + mov _bullet_template.spread_angle_delta, al + mov al, _bullet_template.speed add al, 6 - mov byte ptr word_26006+1, al + mov _bullet_template.speed, al inc si loc_1C057: @@ -25224,9 +25209,9 @@ loc_1C057: jl short loc_1C043 call snd_se_play pascal, 3 mov _bullet_template.pattern, BP_RANDOM_ANGLE - mov byte ptr word_25FFA+1, 0 - mov byte ptr dword_26002, 3 - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.patnum, 0 + mov _bullet_template.spread, 3 + mov _bullet_template.speed, (2 shl 4) mov ax, _boss_phase_frame mov bx, 32 cwd @@ -25288,13 +25273,13 @@ sub_1C0E4 proc near mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_1C121 - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_SPREAD_STACK mov byte_2C976, 1 - mov byte_26001, 2 - mov byte ptr word_25FFA+1, 74h ; 't' - mov dword_26002, 8020802h - mov byte ptr word_26006+1, 30h ; '0' + mov _bullet_template.BT_special_motion, 2 + mov _bullet_template.patnum, PAT_BULLET16_V_BLUE + mov dword ptr _bullet_template.spread, (8 shl 24) or (2 shl 16) or (8 shl 8) or 2 + mov _bullet_template.speed, (3 shl 4) mov _boss_sprite, 192 mov byte_2C977, 0B6h jmp short loc_1C190 @@ -25309,12 +25294,12 @@ loc_1C121: idiv bx or dx, dx jnz short loc_1C15E - mov byte ptr word_26006, 80h + mov _bullet_template.BT_angle, 80h call sub_15A9C mov al, byte_2C977 neg al mov byte_2C977, al - mov byte ptr word_26006, 0 + mov _bullet_template.BT_angle, 0 call sub_15A9C mov al, byte_2C977 neg al @@ -25374,11 +25359,11 @@ loc_1C1C1: jle short loc_1C239 cmp _boss_phase_frame, 128 jg short loc_1C20F - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED - mov byte ptr word_25FFA+1, 2Eh ; '.' - mov byte ptr dword_26002, 8 - mov byte ptr word_26006+1, 18h + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_BLUE + mov _bullet_template.spread, 8 + mov _bullet_template.speed, (1 shl 4) + 8 mov ax, _boss_phase_frame mov bx, 4 cwd @@ -25475,19 +25460,19 @@ loc_1C2AB: idiv bx or dx, dx jnz short loc_1C31D - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_STACK - mov byte ptr word_25FFA+1, 74h ; 't' - mov word ptr dword_26002+2, 608h - mov byte ptr word_26006+1, 18h - mov byte_26001, 8 + mov _bullet_template.patnum, PAT_BULLET16_V_BLUE + mov word ptr _bullet_template.BT_stack, (6 shl 8) or 8 + mov _bullet_template.speed, (1 shl 4) + 8 + mov _bullet_template.BT_special_motion, 8 mov byte_2C976, 1 mov al, byte_2D083 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A70 mov al, 80h sub al, byte_2D083 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A70 mov al, byte_2D083 add al, 8 @@ -25500,11 +25485,11 @@ loc_1C316: call snd_se_play pascal, 3 loc_1C31D: - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED - mov byte ptr word_25FFA+1, 2Eh ; '.' - mov byte ptr dword_26002, 6 - mov byte ptr word_26006+1, 18h + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_BLUE + mov _bullet_template.spread, 6 + mov _bullet_template.speed, (1 shl 4) + 8 jmp short loc_1C347 ; --------------------------------------------------------------------------- @@ -25749,8 +25734,8 @@ sub_1C518 proc far push si mov eax, _boss_pos.cur mov _homing_target, eax - mov point_25FFC, eax - mov dword_2A722, eax + mov _bullet_template.BT_origin, eax + mov point_2A722, eax mov _laser_template.coords.origin, eax mov point_2BC72, eax inc _boss_phase_frame @@ -26406,11 +26391,11 @@ sub_1CAD7 proc near cmp _boss_phase_frame, 16 jnz short loc_1CB6F mov _boss_sprite, 184 - mov byte ptr word_25FFA, 13h - mov byte ptr word_25FFA+1, 30h ; '0' + mov _bullet_template.spawn_type, 13h + mov _bullet_template.patnum, PAT_BULLET16_N_RED mov _bullet_template.pattern, BP_RING - mov byte ptr word_26006+1, 3Ch ; '<' - mov byte ptr dword_26002, 10h + mov _bullet_template.speed, (3 shl 4) + 12 + mov _bullet_template.spread, 16 call fp_25344 call snd_se_play pascal, 8 pop bp @@ -26425,14 +26410,14 @@ loc_1CB23: or dx, dx jnz short loc_1CB5D call randring2_next16 - mov byte ptr word_26006, al - push offset point_25FFC + mov _bullet_template.BT_angle, al + push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (32 shl 4) call randring2_next16_mod push ax - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle mov ah, 0 push ax call vector2_at @@ -26471,10 +26456,10 @@ var_1 = byte ptr -1 cmp _boss_phase_frame, 16 jnz loc_1CCD0 mov _boss_sprite, 184 - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 54h ; 'T' + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_V_RED mov _bullet_template.pattern, BP_SINGLE - mov byte ptr word_26006+1, 60h + mov _bullet_template.speed, (6 shl 4) call fp_25344 call snd_se_play pascal, 8 mov word_2BC7E, 20h ; ' ' @@ -26496,30 +26481,30 @@ loc_1CBD2: jle short loc_1CC3E test si, 1 jnz short loc_1CC3E - sub point_25FFC.x, (32 shl 4) - sub point_25FFC.y, (16 shl 4) + sub _bullet_template.BT_origin.x, (32 shl 4) + sub _bullet_template.BT_origin.y, (16 shl 4) or si, si jnz short loc_1CC1F - push point_25FFC.x - push point_25FFC.y + push _bullet_template.BT_origin.x + push _bullet_template.BT_origin.y push 0 call sub_15A24 mov byte_2D085, al - mov ax, point_25FFC.x + mov ax, _bullet_template.BT_origin.x add ax, (64 shl 4) push ax - push point_25FFC.y + push _bullet_template.BT_origin.y push 0 call sub_15A24 mov byte_2D084, al loc_1CC1F: mov al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C - add point_25FFC.x, (64 shl 4) + add _bullet_template.BT_origin.x, (64 shl 4) mov al, byte_2D084 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C call snd_se_play pascal, 3 @@ -26596,11 +26581,11 @@ sub_1CCD3 proc near cmp _boss_phase_frame, 4 jnz loc_1CE0B mov _boss_sprite, 184 - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_SPREAD - mov byte_26001, 0Ah - mov byte ptr word_26006+1, 38h ; '8' - mov word ptr dword_26002, 205h + mov _bullet_template.BT_special_motion, 0Ah + mov _bullet_template.speed, (3 shl 4) + 8 + mov word ptr _bullet_template.spread, (2 shl 8) or 5 call snd_se_play pascal, 8 mov byte_2D085, 60h mov byte_2D084, 40h @@ -26615,8 +26600,8 @@ loc_1CD26: idiv bx or dx, dx jnz loc_1CDF8 - mov byte ptr word_25FFA+1, 2Ch ; ',' - push offset point_25FFC + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE + push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (48 shl 4) @@ -26626,9 +26611,9 @@ loc_1CD26: call vector2_at mov al, byte_2D085 add al, byte_2D084 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A70 - push offset point_25FFC + push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (48 shl 4) @@ -26637,15 +26622,15 @@ loc_1CD26: mov ah, 0 push ax call vector2_at - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 80h - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A70 - mov byte ptr word_25FFA+1, 0 + mov _bullet_template.patnum, 0 mov al, byte_2D085 neg al mov byte_2D085, al - push offset point_25FFC + push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (32 shl 4) @@ -26654,9 +26639,9 @@ loc_1CD26: call vector2_at mov al, byte_2D085 sub al, byte_2D084 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A70 - push offset point_25FFC + push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (32 shl 4) @@ -26665,9 +26650,9 @@ loc_1CD26: mov ah, 0 push ax call vector2_at - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 80h - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A70 mov al, byte_2D085 neg al @@ -26708,12 +26693,12 @@ sub_1CE0D proc near cmp _boss_phase_frame, 4 jnz loc_1CED7 mov _boss_sprite, 184 - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte ptr word_26006+1, 38h ; '8' - mov byte ptr dword_26002+1, 14h - mov byte ptr word_26006, 0 - mov byte ptr word_25FFA+1, 44h ; 'D' + mov _bullet_template.speed, (3 shl 4) + 8 + mov _bullet_template.spread_angle_delta, 20 + mov _bullet_template.BT_angle, 0 + mov _bullet_template.patnum, PAT_BULLET16_D_GREEN call fp_25344 call snd_se_play pascal, 8 mov byte_2D085, 80h @@ -26728,7 +26713,7 @@ loc_1CE63: idiv bx or dx, dx jnz short loc_1CEC4 - push offset point_25FFC + push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (48 shl 4) @@ -26736,9 +26721,9 @@ loc_1CE63: mov ah, 0 push ax call vector2_at - mov byte ptr dword_26002, 5 + mov _bullet_template.spread, 5 call sub_15A5C - push offset point_25FFC + push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (48 shl 4) @@ -26747,7 +26732,7 @@ loc_1CE63: mov ah, 0 push ax call vector2_at - mov byte ptr dword_26002, 4 + mov _bullet_template.spread, 4 call sub_15A5C mov al, byte_2D085 add al, 8 @@ -26787,10 +26772,10 @@ var_1 = byte ptr -1 cmp _boss_phase_frame, 16 jnz loc_1D081 mov _boss_sprite, 184 - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 74h ; 't' + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_V_BLUE mov _bullet_template.pattern, BP_SINGLE - mov byte ptr word_26006+1, 60h + mov _bullet_template.speed, (6 shl 4) call fp_25344 call snd_se_play pascal, 8 mov _laser_template.LASER_age, 24 @@ -26817,30 +26802,30 @@ loc_1CF57: jle short loc_1CFC3 test di, 1 jnz short loc_1CFC3 - sub point_25FFC.x, (32 shl 4) - sub point_25FFC.y, (16 shl 4) + sub _bullet_template.BT_origin.x, (32 shl 4) + sub _bullet_template.BT_origin.y, (16 shl 4) or di, di jnz short loc_1CFA4 - push point_25FFC.x - push point_25FFC.y + push _bullet_template.BT_origin.x + push _bullet_template.BT_origin.y push 0 call sub_15A24 mov byte_2D085, al - mov ax, point_25FFC.x + mov ax, _bullet_template.BT_origin.x add ax, (64 shl 4) push ax - push point_25FFC.y + push _bullet_template.BT_origin.y push 0 call sub_15A24 mov byte_2D084, al loc_1CFA4: mov al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C - add point_25FFC.x, (64 shl 4) + add _bullet_template.BT_origin.x, (64 shl 4) mov al, byte_2D084 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C call snd_se_play pascal, 3 @@ -26939,15 +26924,15 @@ yumeko_1D085 proc near cmp _boss_phase_frame, 16 jnz loc_1D1C4 mov _boss_sprite, 184 - mov byte ptr word_25FFA, 10h - mov byte ptr word_25FFA+1, 34h ; '4' + mov _bullet_template.spawn_type, 10h + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE mov _bullet_template.pattern, BP_SPREAD - mov byte ptr dword_26002, 5 + mov _bullet_template.spread, 5 push (24 shl 16) or 16 push (12 shl 16) or 10 call select_for_rank - mov byte ptr dword_26002+1, al - mov byte ptr word_26006+1, 80h + mov _bullet_template.spread_angle_delta, al + mov _bullet_template.speed, (8 shl 4) call snd_se_play pascal, 8 mov word_2BC7E, 20h ; ' ' mov byte_2BC88, 40h @@ -27014,23 +26999,23 @@ loc_1D17C: idiv bx or dx, dx jnz short loc_1D1C4 - cmp byte ptr word_26006+1, 60h + cmp _bullet_template.speed, (6 shl 4) jbe short loc_1D1B9 - mov byte ptr word_26006+1, 8 + mov _bullet_template.speed, 8 call snd_se_play pascal, 15 inc byte_2D083 cmp byte_2D083, 5 ja loc_1D110 - push point_25FFC.x - push point_25FFC.y + push _bullet_template.BT_origin.x + push _bullet_template.BT_origin.y push 0 call sub_15A24 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al loc_1D1B9: - mov al, byte ptr word_26006+1 + mov al, _bullet_template.speed add al, 8 - mov byte ptr word_26006+1, al + mov _bullet_template.speed, al call sub_15A5C loc_1D1C4: @@ -27056,12 +27041,12 @@ sub_1D1C6 proc near cmp _boss_phase_frame, 16 jnz loc_1D269 mov _boss_sprite, 184 - mov byte ptr word_25FFA, 10h - mov byte ptr word_25FFA+1, 74h ; 't' + mov _bullet_template.spawn_type, 10h + mov _bullet_template.patnum, PAT_BULLET16_V_BLUE mov _bullet_template.pattern, BP_RING - mov byte ptr dword_26002, 12h - mov byte_26001, 2 - mov byte ptr word_26006+1, 26h ; '&' + mov _bullet_template.spread, 18 + mov _bullet_template.BT_special_motion, 2 + mov _bullet_template.speed, (2 shl 4) + 6 call fp_25344 call snd_se_play pascal, 8 mov byte_2D085, 0 @@ -27079,13 +27064,13 @@ loc_1D228: or dx, dx jnz short loc_1D269 mov al, byte_2D084 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al test byte_2D085, 1 jz short loc_1D252 mov byte_2C977, 40h mov al, 80h - sub al, byte ptr word_26006 - mov byte ptr word_26006, al + sub al, _bullet_template.BT_angle + mov _bullet_template.BT_angle, al jmp short loc_1D257 ; --------------------------------------------------------------------------- @@ -27115,8 +27100,8 @@ yumeko_update proc far push si mov eax, _boss_pos.cur mov _homing_target, eax - mov point_25FFC, eax - mov dword_2A722, eax + mov _bullet_template.BT_origin, eax + mov point_2A722, eax mov point_2BC72, eax inc _boss_phase_frame mov al, _boss_phase @@ -27568,14 +27553,14 @@ sub_1D667 proc near mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_1D6B2 - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 2Dh ; '-' - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_RING - mov byte_26001, 0Ah + mov _bullet_template.BT_special_motion, 0Ah call randring2_next16 - mov byte ptr word_26006, al - mov byte ptr dword_26002, 10h + mov _bullet_template.BT_angle, al + mov _bullet_template.spread, 16 push 1 call randring2_next16_and or ax, ax @@ -27600,11 +27585,11 @@ loc_1D6B2: or dx, dx jnz short loc_1D6D1 call sub_15A70 - mov al, byte ptr word_26006+1 + mov al, _bullet_template.speed add al, 8 - mov byte ptr word_26006+1, al + mov _bullet_template.speed, al mov al, byte_2D085 - add byte ptr word_26006, al + add _bullet_template.BT_angle, al loc_1D6D1: cmp _boss_phase_frame, 60 @@ -27631,12 +27616,12 @@ sub_1D6E1 proc near mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_1D719 - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_RING call randring2_next16 - mov byte ptr word_26006, al - mov byte ptr dword_26002, 10h + mov _bullet_template.BT_angle, al + mov _bullet_template.spread, 16 push (16 shl 16) or 12 push ( 8 shl 16) or 4 call select_for_rank @@ -27652,22 +27637,22 @@ loc_1D719: idiv bx or dx, dx jnz short loc_1D766 - push offset point_25FFC + push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (32 shl 4) call randring2_next16_mod push ax - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle mov ah, 0 push ax call vector2_at - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.speed, (2 shl 4) call sub_15A5C - mov byte ptr word_26006+1, 40h - mov al, byte ptr word_26006 + mov _bullet_template.speed, (4 shl 4) + mov al, _bullet_template.BT_angle add al, 8 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C call snd_se_play pascal, 3 @@ -27704,11 +27689,11 @@ sub_1D776 proc near cmp _boss_phase_frame, 2 jnz short loc_1D7DA mov _boss_sprite, 181 - mov byte ptr word_25FFA, 13h - mov byte ptr word_25FFA+1, 30h ; '0' + mov _bullet_template.spawn_type, 13h + mov _bullet_template.patnum, PAT_BULLET16_N_RED mov _bullet_template.pattern, BP_RING - mov byte ptr word_26006+1, 3Ch ; '<' - mov byte ptr dword_26002, 10h + mov _bullet_template.speed, (3 shl 4) + 12 + mov _bullet_template.spread, 16 call fp_25344 call snd_se_play pascal, 8 pop bp @@ -27738,10 +27723,10 @@ sub_1D7DC proc near mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_1D805 - mov byte ptr word_25FFA, 12h - mov byte ptr word_26006+1, 1Ch + mov _bullet_template.spawn_type, 12h + mov _bullet_template.speed, (1 shl 4) + 12 mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED - mov byte ptr dword_26002, 3 + mov _bullet_template.spread, 3 call fp_25344 call snd_se_play pascal, 15 @@ -27752,11 +27737,11 @@ loc_1D805: idiv bx or dx, dx jnz short loc_1D82E - mov byte ptr word_25FFA+1, 34h ; '4' - sub point_25FFC.x, (16 shl 4) + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE + sub _bullet_template.BT_origin.x, (16 shl 4) call sub_15A5C - mov byte ptr word_25FFA+1, 74h ; 't' - add point_25FFC.x, (32 shl 4) + mov _bullet_template.patnum, PAT_BULLET16_V_BLUE + add _bullet_template.BT_origin.x, (32 shl 4) call sub_15A5C loc_1D82E: @@ -27778,16 +27763,16 @@ sub_1D83A proc near mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_1D877 - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_SPREAD_STACK_AIMED - mov byte ptr word_26006, 0 - mov word ptr dword_26002, 402h - push (0C05h shl 16) or 0C06h - push (0D06h shl 16) or 0D07h + mov _bullet_template.BT_angle, 0 + mov word ptr _bullet_template.spread, (4 shl 8) or 2 + push (((12 shl 8) or 5) shl 16) or ((12 shl 8) or 6) + push (((13 shl 8) or 6) shl 16) or ((13 shl 8) or 7) call select_for_rank - mov word ptr dword_26002+2, ax - mov byte ptr word_26006+1, 20h ; ' ' + mov word ptr _bullet_template.BT_stack, ax + mov _bullet_template.speed, (2 shl 4) loc_1D877: mov ax, _boss_phase_frame @@ -27872,8 +27857,8 @@ loc_1D8F7: loc_1D954: cmp byte_2D085, 0 jnz short loc_1D9D5 - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_SINGLE call fp_25344 xor si, si @@ -27881,25 +27866,21 @@ loc_1D954: ; --------------------------------------------------------------------------- loc_1D972: - push (256 shl 4) - call randring2_next16_mod + call randring2_next16_mod pascal, (256 shl 4) add ax, _boss_pos.cur.x sub ax, (128 shl 4) - mov point_25FFC.x, ax - push 400h - call randring2_next16_mod + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (64 shl 4) mov dx, _boss_pos.cur.y sub dx, ax add dx, (16 shl 4) - mov point_25FFC.y, dx - push 60h - call randring2_next16_mod - add al, 10h - mov byte ptr word_26006, al - push 3Fh ; '?' - call randring2_next16_and - add al, 18h - mov byte ptr word_26006+1, al + mov _bullet_template.BT_origin.y, dx + call randring2_next16_mod pascal, 96 + add al, 16 + mov _bullet_template.BT_angle, al + call randring2_next16_and pascal, 3Fh + add al, (1 shl 4) + 8 + mov _bullet_template.speed, al call sub_15A5C inc si @@ -28005,26 +27986,25 @@ loc_1DA6A: idiv bx or dx, dx jnz short loc_1DAD0 - push 1000h - call randring2_next16_mod + call randring2_next16_mod pascal, (256 shl 4) add ax, _boss_pos.cur.x sub ax, (128 shl 4) - mov point_25FFC.x, ax + mov _bullet_template.BT_origin.x, ax push (64 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y sub dx, ax - mov point_25FFC.y, dx - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 2Ch ; ',' + mov _bullet_template.BT_origin.y, dx + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte ptr dword_26002, 5 + mov _bullet_template.spread, 5 push (16 shl 16) or 12 push (10 shl 16) or 8 call select_for_rank - mov byte ptr dword_26002+1, al - mov byte ptr word_26006, 0 - mov byte ptr word_26006+1, 30h ; '0' + mov _bullet_template.spread_angle_delta, al + mov _bullet_template.BT_angle, 0 + mov _bullet_template.speed, (3 shl 4) call fp_25344 call sub_15A5C @@ -28066,17 +28046,16 @@ loc_1DB10: mov si, dx test si, 7 jnz short loc_1DB78 - mov byte ptr word_25FFA+1, 2Dh ; '-' - mov byte ptr word_25FFA, 12h + mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_SPREAD - push 1Fh - call randring2_next16_and - add al, 30h ; '0' - mov byte ptr word_26006+1, al - mov word ptr dword_26002, 806h - mov byte ptr word_26006, 68h ; 'h' + call randring2_next16_and pascal, 1Fh + add al, (3 shl 4) + mov _bullet_template.speed, al + mov word ptr _bullet_template.spread, (8 shl 8) or 6 + mov _bullet_template.BT_angle, 68h call sub_15A5C - mov byte ptr word_26006, 18h + mov _bullet_template.BT_angle, 18h call sub_15A5C or si, si jnz short loc_1DB78 @@ -28232,34 +28211,34 @@ loc_1DC93: idiv bx or dx, dx jnz short loc_1DCFD - sub point_25FFC.x, (128 shl 4) + sub _bullet_template.BT_origin.x, (128 shl 4) mov _bullet_template.pattern, BP_SPREAD - mov byte_26001, 0Ah - mov word ptr dword_26002, 203h - mov byte ptr word_25FFA, 12h - mov byte ptr word_26006+1, 28h ; '(' - mov byte ptr word_25FFA+1, 54h ; 'T' - cmp si, 40h + mov _bullet_template.BT_special_motion, 0Ah + mov word ptr _bullet_template.spread, (2 shl 8) or 3 + mov _bullet_template.spawn_type, 12h + mov _bullet_template.speed, (2 shl 4) + 8 + mov _bullet_template.patnum, PAT_BULLET16_V_RED + cmp si, 64 jge short loc_1DCD4 mov ax, si imul ax, 3 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al jmp short loc_1DCE1 ; --------------------------------------------------------------------------- loc_1DCD4: mov ax, si imul ax, 3 - mov dl, 40h + mov dl, 64 sub dl, al - mov byte ptr word_26006, dl + mov _bullet_template.BT_angle, dl loc_1DCE1: call sub_15A70 mov al, 80h - sub al, byte ptr word_26006 - mov byte ptr word_26006, al - add point_25FFC.x, (256 shl 4) + sub al, _bullet_template.BT_angle + mov _bullet_template.BT_angle, al + add _bullet_template.BT_origin.x, (256 shl 4) call sub_15A70 call snd_se_play pascal, 15 @@ -28329,8 +28308,8 @@ loc_1DD72: mov byte_2D07D, 0 loc_1DDC3: - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 54h ; 'T' + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_V_RED mov _bullet_template.pattern, BP_SPREAD cmp byte_2D085, 40h jnz short loc_1DDE4 @@ -28341,33 +28320,33 @@ loc_1DDC3: loc_1DDE4: cmp byte_2D082, 0 jnz short loc_1DDF2 - mov byte ptr dword_26002, 1 + mov _bullet_template.spread, 1 jmp short loc_1DDF7 ; --------------------------------------------------------------------------- loc_1DDF2: - mov byte ptr dword_26002, 3 + mov _bullet_template.spread, 3 loc_1DDF7: - mov byte ptr dword_26002+1, 30h ; '0' - mov byte ptr word_26006+1, 70h ; 'p' - add point_25FFC.x, (96 shl 4) + mov _bullet_template.spread_angle_delta, 48 + mov _bullet_template.speed, (7 shl 4) + add _bullet_template.BT_origin.x, (96 shl 4) mov al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A8E - sub point_25FFC.x, (64 shl 4) + sub _bullet_template.BT_origin.x, (64 shl 4) mov al, byte_2D084 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A8E - sub point_25FFC.x, (64 shl 4) + sub _bullet_template.BT_origin.x, (64 shl 4) mov al, 80h sub al, byte_2D084 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A8E - sub point_25FFC.x, (64 shl 4) + sub _bullet_template.BT_origin.x, (64 shl 4) mov al, 80h sub al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A8E cmp byte_2D082, 0 jnz short loc_1DE5D @@ -28381,28 +28360,28 @@ loc_1DDF7: ; --------------------------------------------------------------------------- loc_1DE5D: - mov byte ptr word_25FFA+1, 0 - mov byte ptr word_25FFA, 10h - mov word ptr dword_26002, 3003h + mov _bullet_template.patnum, 0 + mov _bullet_template.spawn_type, 10h + mov word ptr _bullet_template.spread, (48 shl 8) or 3 mov al, byte_2D085 add al, 80h - mov byte ptr word_26006, al - add point_25FFC.x, (192 shl 4) + mov _bullet_template.BT_angle, al + add _bullet_template.BT_origin.x, (192 shl 4) call sub_15A8E - sub point_25FFC.x, (64 shl 4) + sub _bullet_template.BT_origin.x, (64 shl 4) mov al, byte_2D084 add al, 80h - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A8E - sub point_25FFC.x, (64 shl 4) + sub _bullet_template.BT_origin.x, (64 shl 4) mov al, 0 sub al, byte_2D084 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A8E - sub point_25FFC.x, (64 shl 4) + sub _bullet_template.BT_origin.x, (64 shl 4) mov al, 0 sub al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A8E cmp byte_2D081, 0 jnz short loc_1DED3 @@ -28610,13 +28589,13 @@ loc_1E0A6: jnz short loc_1E0F8 cmp si, 80h jge short loc_1E0F8 - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_RING mov al, byte_2D085 - mov byte ptr word_26006, al - mov byte ptr word_25FFA+1, 54h ; 'T' - mov byte ptr word_26006+1, 20h ; ' ' - mov byte ptr dword_26002, 0Ch + mov _bullet_template.BT_angle, al + mov _bullet_template.patnum, PAT_BULLET16_V_RED + mov _bullet_template.speed, (2 shl 4) + mov _bullet_template.spread, 12 call sub_15A5C mov al, byte_2D085 add al, 0FEh @@ -28633,13 +28612,13 @@ loc_1E0F8: jnz short loc_1E13D cmp si, 80h jl short loc_1E13D - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_RING mov al, byte_2D084 - mov byte ptr word_26006, al - mov byte ptr word_25FFA+1, 0 - mov byte ptr word_26006+1, 20h ; ' ' - mov byte ptr dword_26002, 0Ch + mov _bullet_template.BT_angle, al + mov _bullet_template.patnum, 0 + mov _bullet_template.speed, (2 shl 4) + mov _bullet_template.spread, 12 call sub_15A5C mov al, byte_2D084 add al, 4 @@ -28711,8 +28690,8 @@ shinki_update proc far push di mov eax, _boss_pos.cur mov _homing_target, eax - mov point_25FFC, eax - mov dword_2A722, eax + mov _bullet_template.BT_origin, eax + mov point_2A722, eax mov _laser_template.coords.origin, eax mov point_2BC72, eax inc _boss_phase_frame @@ -29225,15 +29204,15 @@ loc_1E627: loc_1E62A: cmp _midboss_phase_frame, 114 jg short loc_1E65F - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov byte_2C976, 2 - mov byte_26001, 3 - mov word ptr dword_26002, 1012h + mov _bullet_template.BT_special_motion, 3 + mov word ptr _bullet_template.spread, (16 shl 8) or 18 mov _bullet_template.pattern, BP_RING - mov byte ptr word_26006+1, 8 - mov byte ptr word_25FFA+1, 2Fh ; '/' + mov _bullet_template.speed, 8 + mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_BLUE mov al, byte_2D083 - add byte ptr word_26006, al + add _bullet_template.BT_angle, al call sub_15A70 loc_1E65F: @@ -29260,11 +29239,11 @@ sub_1E66F proc near mov bp, sp cmp _page_back, 0 jz short loc_1E696 - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED - mov byte ptr word_26006+1, 10h - mov word ptr dword_26002, 0A0Ch - mov byte ptr word_25FFA+1, 0 + mov _bullet_template.speed, (1 shl 4) + mov word ptr _bullet_template.spread, (10 shl 8) or 12 + mov _bullet_template.patnum, 0 call sub_15A5C loc_1E696: @@ -29295,17 +29274,17 @@ sub_1E6A6 proc near idiv bx or dx, dx jnz short loc_1E6FE - mov byte ptr word_25FFA, 13h + mov _bullet_template.spawn_type, 13h mov byte_2C976, 1 - mov byte_26001, 2 + mov _bullet_template.BT_special_motion, 2 mov _bullet_template.pattern, BP_SPREAD_STACK - mov dword_26002, 10040805h - mov byte ptr word_26006+1, 18h - mov byte ptr word_25FFA+1, 2Fh ; '/' - mov byte ptr word_26006, 80h + mov dword ptr _bullet_template.spread, (16 shl 24) or (4 shl 16) or (8 shl 8) or 5 + mov _bullet_template.speed, (1 shl 4) + 8 + mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_BLUE + mov _bullet_template.BT_angle, 80h mov byte_2C977, 0C8h call sub_15A70 - mov byte ptr word_26006, 0 + mov _bullet_template.BT_angle, 0 mov byte_2C977, 38h ; '8' call sub_15A70 call snd_se_play pascal, 3 @@ -29334,8 +29313,8 @@ midbossx_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur - mov point_25FFC, eax - mov dword_2A722, eax + mov _bullet_template.BT_origin, eax + mov point_2A722, eax inc _midboss_phase_frame mov al, _midboss_phase mov ah, 0 @@ -29581,19 +29560,17 @@ sub_1E8DA endp sub_1E922 proc near push bp mov bp, sp - mov byte ptr word_25FFA, 10h - push 1Fh - call randring2_next16_and - add al, 28h ; '(' - mov byte ptr word_26006+1, al - push 7Fh - call randring2_next16_and - and al, 0F8h + mov _bullet_template.spawn_type, 10h + call randring2_next16_and pascal, 1Fh + add al, (2 shl 4) + 8 + mov _bullet_template.speed, al + call randring2_next16_and pascal, 7Fh + and al, -8 sub al, 40h - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte ptr word_25FFA+1, 54h ; 'T' - mov word ptr dword_26002, 0C05h + mov _bullet_template.patnum, PAT_BULLET16_V_RED + mov word ptr _bullet_template.spread, (12 shl 8) or 5 call sub_15A5C mov ax, _boss_phase_frame mov bx, 4 @@ -29639,26 +29616,26 @@ loc_1E98B: idiv bx or dx, dx jnz short loc_1E9F9 - mov byte ptr word_25FFA, 13h - mov byte ptr word_26006+1, 40h + mov _bullet_template.spawn_type, 13h + mov _bullet_template.speed, (4 shl 4) cmp byte_2D085, 0 jz short loc_1E9B0 - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 2 jmp short loc_1E9B5 ; --------------------------------------------------------------------------- loc_1E9B0: - mov al, byte ptr word_26006 - add al, 0FEh + mov al, _bullet_template.BT_angle + add al, -2 loc_1E9B5: - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_RING - mov byte_26001, 1 + mov _bullet_template.BT_special_motion, 1 mov byte_2C976, 1 - mov word ptr dword_26002, 0A0Ch - mov byte ptr word_25FFA+1, 30h ; '0' + mov word ptr _bullet_template.spread, (10 shl 8) or 12 + mov _bullet_template.patnum, PAT_BULLET16_N_RED mov ax, _boss_phase_frame mov bx, 8 cwd @@ -29670,8 +29647,8 @@ loc_1E9B5: ; --------------------------------------------------------------------------- loc_1E9E4: - mov word ptr dword_26002, 0A08h - mov byte ptr word_25FFA+1, 54h ; 'T' + mov word ptr _bullet_template.spread, (10 shl 8) or 8 + mov _bullet_template.patnum, PAT_BULLET16_V_RED call sub_15A70 loc_1E9F2: @@ -29723,17 +29700,17 @@ loc_1EA2E: idiv bx or dx, dx jnz loc_1EAE3 - mov byte ptr word_25FFA, 10h - mov byte ptr word_25FFA+1, 0 + mov _bullet_template.spawn_type, 10h + mov _bullet_template.patnum, 0 mov _bullet_template.pattern, BP_SPREAD_AIMED - mov word ptr dword_26002, 605h - mov byte ptr word_26006+1, 50h ; 'P' + mov word ptr _bullet_template.spread, (6 shl 8) or 5 + mov _bullet_template.speed, (5 shl 4) mov al, byte_2D084 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle neg al - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C cmp byte_2D083, 0 jnz short loc_1EA96 @@ -29761,33 +29738,31 @@ loc_1EAA9: idiv bx or dx, dx jnz short loc_1EAE3 - push 600h - call randring2_next16_mod - add ax, point_25FFC.x + call randring2_next16_mod pascal, (96 shl 4) + add ax, _bullet_template.BT_origin.x sub ax, (48 shl 4) - mov word_2CE52, ax - push 400h - call randring2_next16_mod - add ax, point_25FFC.y + mov point_2CE52.x, ax + call randring2_next16_mod pascal, (64 shl 4) + add ax, _bullet_template.BT_origin.y sub ax, (32 shl 4) - mov word_2CE54, ax - push word_2CE52 + mov point_2CE52.y, ax + push point_2CE52.x push ax push 0 call sub_15A24 mov byte_2D085, al loc_1EAE3: - mov ax, word_2CE52 - mov point_25FFC.x, ax - mov ax, word_2CE54 - mov point_25FFC.y, ax - mov byte ptr word_25FFA, 12h + mov ax, point_2CE52.x + mov _bullet_template.BT_origin.x, ax + mov ax, point_2CE52.y + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.spawn_type, 12h mov al, byte_2D085 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_SINGLE - mov byte ptr word_26006+1, 60h - mov byte ptr word_25FFA+1, 54h ; 'T' + mov _bullet_template.speed, (6 shl 4) + mov _bullet_template.patnum, PAT_BULLET16_V_RED call sub_15A5C loc_1EB0C: @@ -29845,20 +29820,18 @@ sub_1EB52 proc near idiv bx or dx, dx jnz loc_1EBF0 - mov byte ptr word_25FFA, 10h - push 1Fh - call randring2_next16_and - add al, 0Ch - mov byte ptr word_26006+1, al - push 7Fh - call randring2_next16_and + mov _bullet_template.spawn_type, 10h + call randring2_next16_and pascal, 1Fh + add al, 12 + mov _bullet_template.speed, al + call randring2_next16_and pascal, 7Fh add al, 80h - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_SPREAD - mov byte_26001, 9 + mov _bullet_template.BT_special_motion, 9 mov byte_2C976, 1 - mov byte ptr word_25FFA+1, 2Eh ; '.' - mov word ptr dword_26002, 0C03h + mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_BLUE + mov word ptr _bullet_template.spread, (12 shl 8) or 3 call sub_15A70 mov ax, _boss_phase_frame mov bx, 4 @@ -29867,22 +29840,20 @@ sub_1EB52 proc near or dx, dx jnz short loc_1EBF0 call snd_se_play pascal, 3 - mov byte ptr word_25FFA, 12h - push 600h - call randring2_next16_mod + mov _bullet_template.spawn_type, 12h + call randring2_next16_mod pascal, (96 shl 4) sub ax, (48 shl 4) - add ax, point_25FFC.x - mov point_25FFC.x, ax - push 400h - call randring2_next16_mod + add ax, _bullet_template.BT_origin.x + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (64 shl 4) sub ax, (32 shl 4) - add ax, point_25FFC.y - mov point_25FFC.y, ax - mov byte ptr word_25FFA+1, 0 + add ax, _bullet_template.BT_origin.y + mov _bullet_template.BT_origin.y, ax + mov _bullet_template.patnum, 0 mov _bullet_template.pattern, BP_STACK_AIMED - mov byte ptr word_26006+1, 30h ; '0' - mov word ptr dword_26002+2, 604h - mov byte ptr word_26006, 0 + mov _bullet_template.speed, (3 shl 4) + mov word ptr _bullet_template.BT_stack, (6 shl 8) or 4 + mov _bullet_template.BT_angle, 0 call sub_15A5C loc_1EBF0: @@ -29921,24 +29892,24 @@ loc_1EC14: idiv bx or dx, dx jnz short loc_1EC5B - mov byte ptr word_25FFA, 13h - mov byte ptr word_26006+1, 58h ; 'X' + mov _bullet_template.spawn_type, 13h + mov _bullet_template.speed, (5 shl 4) + 8 cmp byte_2D085, 0 jz short loc_1EC39 - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 3 jmp short loc_1EC3E ; --------------------------------------------------------------------------- loc_1EC39: - mov al, byte ptr word_26006 - add al, 0FDh + mov al, _bullet_template.BT_angle + add al, -3 loc_1EC3E: - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_RING - mov word ptr dword_26002, 816h - mov byte ptr word_25FFA+1, 34h ; '4' + mov word ptr _bullet_template.spread, (8 shl 8) or 22 + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE call sub_15A5C call snd_se_play pascal, 3 @@ -29967,7 +29938,7 @@ sub_1EC6C proc near mov bp, sp cmp _boss_phase_frame, 64 jnz short loc_1EC7B - mov byte ptr dword_26002, 8 + mov _bullet_template.spread, 8 loc_1EC7B: mov ax, _boss_phase_frame @@ -29976,26 +29947,26 @@ loc_1EC7B: idiv bx or dx, dx jnz short loc_1ECD0 - mov byte ptr word_25FFA+1, 34h ; '4' - mov byte ptr word_25FFA, 13h - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.patnum, PAT_BULLET16_D_BLUE + mov _bullet_template.spawn_type, 13h + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_RING - mov byte_26001, 8 + mov _bullet_template.BT_special_motion, 8 mov ax, _boss_phase_frame mov bx, 128 cwd idiv bx or dx, dx jnz short loc_1ECB9 - cmp byte ptr dword_26002, 0Eh + cmp _bullet_template.spread, 14 jnb short loc_1ECB9 - inc byte ptr dword_26002 + inc _bullet_template.spread loc_1ECB9: mov byte_2C976, 1 - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 2 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A70 call snd_se_play pascal, 3 @@ -30036,13 +30007,13 @@ sub_1ECD4 proc near mov ax, word_22870 inc word_22870 call lasers_new_fixed_in_slot pascal, ax - mov byte ptr word_25FFA, 10h - mov byte ptr word_25FFA+1, 44h ; 'D' + mov _bullet_template.spawn_type, 10h + mov _bullet_template.patnum, PAT_BULLET16_D_GREEN mov _bullet_template.pattern, BP_RING call randring2_next16 - mov byte ptr word_26006, al - mov byte ptr word_26006+1, 40h - mov word ptr dword_26002, 0A20h + mov _bullet_template.BT_angle, al + mov _bullet_template.speed, (4 shl 4) + mov word ptr _bullet_template.spread, (10 shl 8) or 32 call sub_15A5C jmp short loc_1ED67 ; --------------------------------------------------------------------------- @@ -30127,19 +30098,18 @@ sub_1EDC1 proc near idiv bx or dx, dx jnz short loc_1EE14 - mov byte ptr word_25FFA, 12h + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte_26001, 3 + mov _bullet_template.BT_special_motion, 3 mov byte_2C976, 2 - mov byte ptr word_26006+1, 40h - mov word ptr dword_26002, 907h - mov byte ptr word_25FFA+1, 44h ; 'D' - push 300h - call randring2_next16_mod + mov _bullet_template.speed, (4 shl 4) + mov word ptr _bullet_template.spread, (9 shl 8) or 7 + mov _bullet_template.patnum, PAT_BULLET16_D_GREEN + call randring2_next16_mod pascal, (48 shl 4) sub ax, (24 shl 4) - add ax, point_25FFC.x - mov point_25FFC.x, ax - mov byte ptr word_26006, 0 + add ax, _bullet_template.BT_origin.x + mov _bullet_template.BT_origin.x, ax + mov _bullet_template.BT_angle, 0 call sub_15A70 call snd_se_play pascal, 3 @@ -30226,12 +30196,12 @@ loc_1EEA1: idiv bx or dx, dx jnz short loc_1EEED - mov byte ptr word_25FFA, 10h + mov _bullet_template.spawn_type, 10h mov _bullet_template.pattern, BP_RING_AIMED - mov byte ptr word_26006, 0 - mov byte ptr word_26006+1, 40h - mov word ptr dword_26002, 0A20h - mov byte ptr word_25FFA+1, 44h ; 'D' + mov _bullet_template.BT_angle, 0 + mov _bullet_template.speed, (4 shl 4) + mov word ptr _bullet_template.spread, (10 shl 8) or 32 + mov _bullet_template.patnum, PAT_BULLET16_D_GREEN call sub_15A5C loc_1EEED: @@ -30254,12 +30224,12 @@ sub_1EEF1 proc near idiv bx or dx, dx jnz short loc_1EF6F - mov byte ptr word_26006+1, 38h ; '8' - mov byte ptr word_25FFA, 12h + mov _bullet_template.speed, (3 shl 4) + 8 + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_SPREAD_AIMED - mov byte ptr word_25FFA+1, 2Fh ; '/' - mov byte ptr word_26006, 0 - mov word ptr dword_26002, 0F09h + mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_BLUE + mov _bullet_template.BT_angle, 0 + mov word ptr _bullet_template.spread, (15 shl 8) or 9 call sub_15A5C mov ax, _boss_phase_frame mov bx, 64 @@ -30375,20 +30345,20 @@ sub_1EF80 endp sub_1EFED proc near push bp mov bp, sp - add point_25FFC.y, (104 shl 4) + add _bullet_template.BT_origin.y, (104 shl 4) mov ax, word_22872 - mov point_25FFC.x, ax - mov word ptr dword_2A722, ax + mov _bullet_template.BT_origin.x, ax + mov point_2A722.x, ax cmp _boss_phase_frame, 64 jnz short loc_1F045 mov angle_2BC71, 196 - mov byte ptr word_26006, 20h ; ' ' + mov _bullet_template.BT_angle, 20h mov byte_2BC88, 50h ; 'P' - mov byte ptr word_26006+1, 30h ; '0' - mov byte ptr word_25FFA, 12h + mov _bullet_template.speed, (3 shl 4) + mov _bullet_template.spawn_type, 12h mov _bullet_template.pattern, BP_SPREAD - mov word ptr dword_26002, 803h - mov byte ptr word_25FFA+1, 2Fh ; '/' + mov word ptr _bullet_template.spread, (8 shl 8) or 3 + mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_BLUE mov byte_2D085, 0 mov byte_2D084, 0 mov byte_2D083, 0 @@ -30404,8 +30374,8 @@ loc_1F045: or dx, dx jnz loc_1F137 mov byte_2A72E, 0Eh - mov ax, point_25FFC.y - mov word ptr dword_2A722+2, ax + mov ax, _bullet_template.BT_origin.y + mov point_2A722.y, ax mov word_2A72A, 1000h mov ax, _boss_phase_frame mov bx, 16 @@ -30438,8 +30408,8 @@ loc_1F08C: idiv bx or dx, dx jnz short loc_1F0D0 - mov ax, point_25FFC.y - mov word ptr dword_2A722+2, ax + mov ax, _bullet_template.BT_origin.y + mov point_2A722.y, ax mov word_2A72A, 800h mov ax, _boss_phase_frame mov bx, 32 @@ -30459,16 +30429,16 @@ loc_1F0CD: loc_1F0D0: mov al, 80h - sub al, byte ptr word_26006 - mov byte ptr word_26006, al + sub al, _bullet_template.BT_angle + mov _bullet_template.BT_angle, al call sub_15A8E mov al, 80h - sub al, byte ptr word_26006 - mov byte ptr word_26006, al + sub al, _bullet_template.BT_angle + mov _bullet_template.BT_angle, al call sub_15A8E call snd_se_play pascal, 3 mov al, byte_2D085 - sub byte ptr word_26006, al + sub _bullet_template.BT_angle, al mov ax, _boss_phase_frame mov bx, 32 cwd @@ -30520,11 +30490,11 @@ sub_1F13B proc near jnz short loc_1F182 mov _boss_sprite, 181 call snd_se_play pascal, 8 - mov byte ptr word_25FFA+1, 74h ; 't' + mov _bullet_template.patnum, PAT_BULLET16_V_BLUE mov _bullet_template.pattern, BP_SPREAD call randring2_next16 - mov byte ptr word_26006, al - mov word ptr dword_26002, 1505h + mov _bullet_template.BT_angle, al + mov word ptr _bullet_template.spread, (21 shl 8) or 5 mov byte_2D085, 0 mov _boss_pos.velocity.x, 0 @@ -30537,23 +30507,23 @@ loc_1F182: idiv bx or dx, dx jnz short loc_1F1D4 - mov ax, 0D48h + mov ax, 3400 sub ax, _boss_hp cwde shl eax, 6 - mov ebx, 0D48h + mov ebx, 3400 xor edx, edx div ebx - add al, 28h ; '(' - mov byte ptr word_26006+1, al + add al, (2 shl 4) + 8 + mov _bullet_template.speed, al call sub_15A5C - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 80h - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C - mov al, byte ptr word_26006 + mov al, _bullet_template.BT_angle add al, 87h - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call snd_se_play pascal, 9 loc_1F1D4: @@ -30666,8 +30636,8 @@ exalice_update proc far loc_1F298: mov eax, _boss_pos.cur mov _homing_target, eax - mov point_25FFC, eax - mov dword_2A722, eax + mov _bullet_template.BT_origin, eax + mov point_2A722, eax mov _laser_template.coords.origin, eax mov point_2BC72, eax inc _boss_phase_frame @@ -31145,7 +31115,7 @@ loc_1F732: push _midboss_pos.cur.y push 0 call sub_15A24 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al pop bp retn ; --------------------------------------------------------------------------- @@ -31188,11 +31158,11 @@ sub_1F776 proc near idiv bx or dx, dx jnz short loc_1F7AA - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 74h ; 't' - mov byte ptr word_26006+1, 58h ; 'X' + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, PAT_BULLET16_V_BLUE + mov _bullet_template.speed, (5 shl 4) + 8 mov _bullet_template.pattern, BP_SPREAD - mov word ptr dword_26002, 70Dh + mov word ptr _bullet_template.spread, (7 shl 8) or 13 call sub_15A5C call snd_se_play pascal, 3 @@ -31225,23 +31195,21 @@ sub_1F7BA proc near idiv bx or dx, dx jnz short loc_1F813 - mov byte ptr word_25FFA, 10h - mov byte ptr word_25FFA+1, 44h ; 'D' - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.spawn_type, 10h + mov _bullet_template.patnum, PAT_BULLET16_D_GREEN + mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_RING - mov byte ptr dword_26002, 10h - push 400h - call randring2_next16_mod - sub ax, 200h - add ax, point_25FFC.x - mov point_25FFC.x, ax - push 400h - call randring2_next16_mod + mov _bullet_template.spread, 16 + call randring2_next16_mod pascal, (64 shl 4) sub ax, (32 shl 4) - add ax, point_25FFC.y - mov point_25FFC.y, ax + add ax, _bullet_template.BT_origin.x + mov _bullet_template.BT_origin.x, ax + call randring2_next16_mod pascal, (64 shl 4) + sub ax, (32 shl 4) + add ax, _bullet_template.BT_origin.y + mov _bullet_template.BT_origin.y, ax call randring2_next16 - mov byte ptr word_26006, al + mov _bullet_template.BT_angle, al call sub_15A5C call snd_se_play pascal, 3 @@ -31270,16 +31238,16 @@ sub_1F823 proc near mov bp, sp cmp _midboss_phase_frame, 32 jnz short loc_1F86B - mov byte ptr word_25FFA, 12h - mov byte ptr word_25FFA+1, 0 + mov _bullet_template.spawn_type, 12h + mov _bullet_template.patnum, 0 mov _bullet_template.pattern, BP_SPREAD_STACK_AIMED - mov byte ptr word_26006, 0 - mov dword_26002, 6050A05h - mov byte ptr word_26006+1, 20h ; ' ' + mov _bullet_template.BT_angle, 0 + mov dword ptr _bullet_template.spread, (6 shl 24) or (5 shl 16) or (10 shl 8) or 5 + mov _bullet_template.speed, (2 shl 4) call sub_15A5C mov _bullet_template.pattern, BP_RING_STACK_AIMED - mov byte ptr dword_26002+3, 4 - mov byte ptr dword_26002, 20h ; ' ' + mov _bullet_template.stack_speed_delta, 4 + mov _bullet_template.spread, 32 call sub_15A5C call snd_se_play pascal, 15 @@ -31308,8 +31276,8 @@ midboss5_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur - mov point_25FFC, eax - mov dword_2A722, eax + mov _bullet_template.BT_origin, eax + mov point_2A722, eax inc _midboss_phase_frame mov al, _midboss_phase mov ah, 0 @@ -33503,12 +33471,7 @@ _turbo_mode db ? include th02/demo[bss].asm byte_25FF8 db ? db ? -word_25FFA dw ? -point_25FFC Point include th04/bullet/template[bss].asm -byte_26001 db ? -dword_26002 dd ? -word_26006 dw ? include th05/lasers[bss].asm include th04/midboss/vars[bss].asm include th04/boss/vars[bss].asm @@ -34378,7 +34341,7 @@ include th04/bullet/bullets[bss].asm dd ? ; dd ? ; dd ? ; -dword_2A722 dd ? +point_2A722 Point dword_2A726 dd ? word_2A72A dw ? word_2A72C dw ? @@ -36283,8 +36246,7 @@ fp_2CE4A dw ? byte_2CE4C db ? db ? include th04/stage_funcs[bss].asm -word_2CE52 dw ? -word_2CE54 dw ? +point_2CE52 Point byte_2CE56 db ? dd ? ; dd ? ;