; ; +-------------------------------------------------------------------------+ ; | This file has been generated by The Interactive Disassembler (IDA) | ; | Copyright (c) 2009 by Hex-Rays, | ; +-------------------------------------------------------------------------+ ; ; Input MD5 : 6A9AB51C7215E3D9CA580CD9F04F4D12 ; File Name : th05/MAIN.EXE ; Format : MS-DOS executable (EXE) ; Base Address: 0h Range: 0h-2D1B0h Loaded length: 23A48h ; Entry Point : 0:0 ; OS type : MS DOS ; Application type: Executable 16bit .286 ; Force the .model directive to create 16-bit default segments... .model large .386 ; ... then switch to what we actually need. ; And yes, we can't move this to an include file for some reason. BINARY = 'M' include ReC98.inc include th05/th05.inc include th01/math/area.inc include th01/math/subpixel.inc include th02/main/sparks.inc include th05/sprites/main_pat.inc include th04/sprites/blit.inc include th04/main/phase.inc include th04/main/tile.inc include th05/main/bullet/pattypes.inc include th04/main/bullet/bullet.inc include th05/main/player/shot_types.inc include th05/main/enemy/enemy.inc extern _execl:proc extern _strlen:proc .seq main_01 group main_TEXT, main__TEXT, main_0_TEXT, main_01_TEXT g_seg2 group seg2, seg2_ main_03 group main_031_TEXT, main_032_TEXT, main_033_TEXT, main_034_TEXT, main_035_TEXT ; =========================================================================== ; Segment type: Pure code _TEXT segment word public 'CODE' use16 assume cs:_TEXT assume es:nothing, ds:_DATA, fs:nothing, gs:nothing include libs/master.lib/bfnt_entry_pat.asm include libs/master.lib/bfnt_header_read.asm include libs/master.lib/bfnt_header_analysis.asm include libs/master.lib/atrtcmod.asm include libs/master.lib/bcloser.asm include libs/master.lib/bfill.asm include libs/master.lib/bfnt_palette_set.asm include libs/master.lib/bgetc.asm include libs/master.lib/palette_black_in.asm include libs/master.lib/palette_black_out.asm include libs/master.lib/bopenr.asm include libs/master.lib/bread.asm include libs/master.lib/bseek.asm include libs/master.lib/bseek_.asm include libs/master.lib/cutline.asm include libs/master.lib/dos_keyclear.asm include libs/master.lib/dos_read.asm include libs/master.lib/dos_seek.asm include libs/master.lib/dos_setvect.asm include libs/master.lib/egc.asm include libs/master.lib/egc_shift_down.asm include libs/master.lib/egc_shift_left.asm include libs/master.lib/egc_shift_right.asm include libs/master.lib/egc_shift_up.asm include libs/master.lib/file_close.asm include libs/master.lib/file_read.asm include libs/master.lib/file_ropen.asm include libs/master.lib/file_seek.asm include libs/master.lib/dos_close.asm include libs/master.lib/dos_ropen.asm include libs/master.lib/grcg_boxfill.asm include libs/master.lib/grcg_byteboxfill_x.asm include libs/master.lib/grcg_circlefill.asm include libs/master.lib/grcg_circle.asm include libs/master.lib/grcg_circle_x.asm include libs/master.lib/grc_setclip.asm include libs/master.lib/grc_clip_polygon_n.asm include libs/master.lib/grcg_hline.asm include libs/master.lib/grcg_line.asm include libs/master.lib/grcg_polygon_cx.asm include libs/master.lib/grcg_pset.asm include libs/master.lib/grcg_setcolor.asm include libs/master.lib/grcg_vline.asm include libs/master.lib/gdc_outpw.asm include libs/master.lib/get_machine_98.asm include libs/master.lib/get_machine_at.asm include libs/master.lib/get_machine_dosbox.asm include libs/master.lib/check_machine_fmr.asm include libs/master.lib/get_machine.asm include libs/master.lib/gaiji_putca.asm include libs/master.lib/gaiji_putsa.asm include libs/master.lib/graph_400line.asm include libs/master.lib/graph_clear.asm include libs/master.lib/graph_extmode.asm include libs/master.lib/graph_hide.asm include libs/master.lib/graph_scrollup.asm include libs/master.lib/iatan2.asm include libs/master.lib/js_end.asm include libs/master.lib/draw_trapezoidx.asm include libs/master.lib/large_byte.asm include libs/master.lib/super_large_put.asm include libs/master.lib/make_linework.asm include libs/master.lib/palette_show.asm include libs/master.lib/pfclose.asm include libs/master.lib/pfgetc.asm include libs/master.lib/pfread.asm include libs/master.lib/pfrewind.asm include libs/master.lib/pfseek.asm include libs/master.lib/random.asm include libs/master.lib/palette_entry_rgb.asm include libs/master.lib/smem_release.asm include libs/master.lib/smem_wget.asm include libs/master.lib/soundio.asm include libs/master.lib/text_boxfilla.asm include libs/master.lib/text_clear.asm include libs/master.lib/text_fillca.asm include libs/master.lib/text_putca.asm include libs/master.lib/text_putsa.asm include libs/master.lib/vsync.asm include libs/master.lib/vsync_wait.asm include libs/master.lib/palette_white_in.asm include libs/master.lib/palette_white_out.asm include libs/master.lib/mem_assign_dos.asm include libs/master.lib/mem_assign.asm include libs/master.lib/memheap.asm include libs/master.lib/mem_unassign.asm include libs/master.lib/super_free.asm include libs/master.lib/super_entry_pat.asm include libs/master.lib/super_put_1plane.asm include libs/master.lib/super_entry_at.asm include libs/master.lib/super_entry_bfnt.asm include libs/master.lib/super_cancel_pat.asm include libs/master.lib/super_clean.asm include libs/master.lib/super_roll_put_1plane.asm include libs/master.lib/super_roll_put.asm include libs/master.lib/super_put_rect.asm include libs/master.lib/super_put.asm include libs/master.lib/super_convert_tiny.asm include libs/master.lib/js_start.asm include libs/master.lib/js_sense.asm include libs/master.lib/bgm_bell_org.asm include libs/master.lib/bgm_mget.asm include libs/master.lib/bgm_read_sdata.asm include libs/master.lib/bgm_timer.asm include libs/master.lib/bgm_pinit.asm include libs/master.lib/bgm_timerhook.asm include libs/master.lib/bgm_play.asm include libs/master.lib/bgm_sound.asm include libs/master.lib/bgm_effect_sound.asm include libs/master.lib/bgm_stop_play.asm include libs/master.lib/bgm_set_tempo.asm include libs/master.lib/bgm_init_finish.asm include libs/master.lib/bgm_stop_sound.asm include libs/master.lib/ems_read.asm include libs/master.lib/ems_allocate.asm include libs/master.lib/ems_enablepageframe.asm include libs/master.lib/ems_exist.asm include libs/master.lib/ems_free.asm include libs/master.lib/ems_movememoryregion.asm include libs/master.lib/ems_setname.asm include libs/master.lib/ems_write.asm include libs/master.lib/ems_space.asm include libs/master.lib/super_put_8.asm db 0 ; =============== S U B R O U T I N E ======================================= public MPTN_LOAD_INNER mptn_load_inner proc far call mptn_free mov bx, sp push si push di push ds mov ax, 3D00h lds dx, ss:[bx+4] int 21h ; DOS - 2+ - OPEN DISK FILE WITH HANDLE ; DS:DX -> ASCIZ filename ; AL = access mode ; 0 - read pop ds mov bx, ax mov si, bx mov ah, 3Fh ; '?' mov dx, offset Palettes mov cx, 6 int 21h ; DOS - 2+ - READ FROM FILE WITH HANDLE ; BX = file handle, CX = number of bytes to read ; DS:DX -> buffer mov di, word ptr Palettes+4 mov ah, 3Fh ; '?' mov dx, offset Palettes mov cx, size palette_t int 21h ; DOS - 2+ - READ FROM FILE WITH HANDLE ; BX = file handle, CX = number of bytes to read ; DS:DX -> buffer mov word_23A5C, di inc di shl di, 7 push di nopcall hmem_allocbyte mov word_23A5A, ax mov bx, si push ds mov ds, ax xor dx, dx mov ah, 3Fh ; '?' mov cx, di int 21h ; DOS - 2+ - READ FROM FILE WITH HANDLE ; BX = file handle, CX = number of bytes to read ; DS:DX -> buffer pop ds mov ah, 3Eh int 21h ; DOS - 2+ - CLOSE A FILE WITH HANDLE ; BX = file handle nopcall palette_show pop di pop si retf 4 mptn_load_inner endp ; =============== S U B R O U T I N E ======================================= public MPTN_FREE mptn_free proc far cmp word_23A5A, 0 jz short locret_4224 push word_23A5A nopcall hmem_free mov word_23A5A, 0 locret_4224: retf mptn_free endp ; --------------------------------------------------------------------------- nop ; =============== S U B R O U T I N E ======================================= sub_4226 proc far mov bx, sp push si mov si, ss:[bx+4] cmp si, word_23A5C ja short loc_426D shl si, 7 push di mov ax, ss:[bx+8] mov di, ss:[bx+6] mov dx, di sar ax, 3 shl di, 2 add di, dx shl di, 4 add di, ax push ds mov ds, word_23A5A mov ax, 0A800h call sub_4272 mov ax, 0B000h call sub_4272 mov ax, 0B800h call sub_4272 mov ax, 0E000h call sub_4272 pop ds pop di loc_426D: pop si retf 6 sub_4226 endp ; --------------------------------------------------------------------------- nop ; =============== S U B R O U T I N E ======================================= sub_4272 proc near mov es, ax assume es:nothing mov cx, 10h loc_4277: movsw add di, 4Eh ; 'N' loop loc_4277 sub di, 500h retn sub_4272 endp include libs/master.lib/pfint21.asm db 0 include th03/formats/pfopen.asm include libs/master.lib/pf_str_ieq.asm _TEXT ends ; =========================================================================== ; Segment type: Pure code main_TEXT segment word public 'CODE' use16 assume cs:main_01 ;org 0Dh assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_AE1E proc near push bp mov bp, sp loc_AE21: mov ax, vsync_Count1 cmp ax, word_25FE6 jb short loc_AE21 mov vsync_Count1, 0 mov word_25FE6, 1 pop bp retn sub_AE1E endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame ; int __cdecl main(int argc, const char **argv, const char **envp) public _main _main proc far _argc = word ptr 6 _argv = dword ptr 8 _envp = dword ptr 0Ch push bp mov bp, sp call cfg_load_resident or ax, ax jz short loc_AEA4 mov _mem_assign_paras, MEM_ASSIGN_PARAS_MAIN call game_init_main pascal, ds, offset aKAIKIDAN2_DAT les bx, _resident mov eax, es:[bx+resident_t.rand] mov random_seed, eax call EmsSetup call text_clear les bx, _resident mov al, es:[bx+resident_t.bgm_mode] mov ah, 0 push ax mov al, es:[bx+resident_t.se_mode] mov ah, 0 push ax call snd_determine_modes call snd_load pascal, ds, offset aMiko, SND_LOAD_SE loc_AE89: call sub_B237 call sub_AEA6 cmp byte_25FE8, 2 jnz short loc_AE9B call sub_B609 jmp short loc_AE89 ; --------------------------------------------------------------------------- loc_AE9B: push ds push offset arg0 ; "op" nopcall GameCore loc_AEA4: pop bp retf _main endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_AEA6 proc near push bp mov bp, sp mov word_25FE6, 1 push 1 call frame_delay call far ptr _input_reset_sense loc_AEBB: call _input_sense call fp_2300E test _key_det.hi, high INPUT_CANCEL jz short loc_AED7 call _pause or ax, ax jz short loc_AED7 mov byte_25FE8, 1 loc_AED7: call fp_2C92E call _stage_vm cmp _bombing, 0 jnz short loc_AEEC call _boss_bg_render jmp short loc_AEF0 ; --------------------------------------------------------------------------- loc_AEEC: call fp_23F58 loc_AEF0: call pointnums_update call circles_update call sparks_update call sub_1214A call sub_1240B call lasers_update call sub_17C04 call enemies_update call _midboss_update call _boss_update call items_update call gather_update call _stage_render cmp _bombing, 0 jz short loc_AF2D call _playchar_bomb_func loc_AF2D: call _boss_fg_render call _midboss_render call enemies_render call shots_render call player_render call _grcg_setmode_rmw_seg1 call _boss_custombullets_render call lasers_render call gather_render call sparks_render call items_render call pointnums_render call sub_100C6 call circles_render GRCG_OFF_CLOBBERING dx call _overlay_text call _popup call sub_10287 call far ptr _input_reset_sense mov al, byte_25FF8 mov ah, 0 push ax mov ax, vsync_Count1 cmp ax, word_25FE6 jb short loc_AF86 mov ax, 1 jmp short loc_AF88 ; --------------------------------------------------------------------------- loc_AF86: xor ax, ax loc_AF88: pop dx or dx, ax movsx eax, dx add _total_slow_frames, eax inc _total_frames cmp byte_20A71, 0 jz short loc_AFDF test _key_det.hi, high INPUT_Q jz short loc_AFC3 cmp byte_20A70, 0 jnz short loc_AFB5 mov byte_20A70, 0FEh jmp short loc_AFDF ; --------------------------------------------------------------------------- loc_AFB5: cmp byte_20A70, 0FFh jnz short loc_AFDF mov byte_20A70, 1 jmp short loc_AFDF ; --------------------------------------------------------------------------- loc_AFC3: cmp byte_20A70, 1 jnz short loc_AFD1 mov byte_20A70, 0 jmp short loc_AFDF ; --------------------------------------------------------------------------- loc_AFD1: cmp byte_20A70, 0FEh jnz short loc_AFDF mov byte_20A70, 0FFh jmp short $+2 loc_AFDF: cmp byte_20A70, 0 jnz short loc_AFEB call sub_AE1E jmp short loc_AFF0 ; --------------------------------------------------------------------------- loc_AFEB: mov _player_is_hit, 0 loc_AFF0: cmp _palette_changed, 0 jz short loc_B003 call far ptr palette_show mov _palette_changed, 0 jmp short $+2 loc_B003: call sub_10214 graph_accesspage _page_front graph_showpage _page_back mov _page_front, al xor _page_back, 1 call snd_se_update inc _frames_unused mov ax, _stage_frame mov dx, ax inc ax mov _stage_frame, ax and ax, 0Fh mov _stage_frame_mod16, al and al, 7 mov _stage_frame_mod8, al and al, 3 mov _stage_frame_mod4, al and al, 1 mov _stage_frame_mod2, al test _stage_frame, 0FFFh jnz short loc_B055 push 1 nopcall playperf_raise jmp short $+2 loc_B055: call score_update_and_render cmp byte_25FE8, 0 jz loc_AEBB pop bp retn sub_AEA6 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B063 proc near push bp mov bp, sp push si les bx, _resident mov es:[bx+resident_t.graze], 0 mov es:[bx+resident_t.miss_count], 0 mov es:[bx+resident_t.bombs_used], 0 mov es:[bx+resident_t.end_sequence], ES_INGAME mov al, es:[bx+resident_t.playchar] mov _playchar, al mov al, es:[bx+resident_t.credit_bombs] mov _bombs, al mov al, es:[bx+resident_t.credit_lives] mov _lives, al xor si, si jmp short loc_B09F ; --------------------------------------------------------------------------- loc_B099: mov _score_lebcd[si], 0 inc si loc_B09F: cmp si, SCORE_DIGITS jl short loc_B099 mov _power, 1 mov _dream, 1 call bb_txt_load mov al, _playchar mov ah, 0 mov bx, ax cmp bx, 3 ja short loc_B112 add bx, bx jmp cs:off_B22F[bx] @@reimu: mov _playchar_speed_aligned, 56 mov _playchar_speed_diagonal, 40 mov _playchar_bomb_func, offset bomb_reimu jmp short loc_B112 ; --------------------------------------------------------------------------- @@marisa: mov _playchar_speed_aligned, 64 mov _playchar_speed_diagonal, 48 mov _playchar_bomb_func, offset bomb_marisa jmp short loc_B112 ; --------------------------------------------------------------------------- @@mima: mov _playchar_speed_aligned, 72 mov _playchar_speed_diagonal, 52 mov _playchar_bomb_func, offset bomb_mima jmp short loc_B112 ; --------------------------------------------------------------------------- @@yuuka: mov _playchar_speed_aligned, 56 mov _playchar_speed_diagonal, 40 mov _playchar_bomb_func, offset bomb_yuuka loc_B112: mov al, _playchar mov ah, 0 imul ax, 20 add ax, offset _SHOT_FUNCS mov _playchar_shot_funcs, ax les bx, _resident cmp es:[bx+resident_t.demo_num], 0 jz short loc_B145 cmp es:[bx+resident_t.demo_num], 5 jnb short loc_B13E mov _playperf, 40 mov _rank, RANK_LUNATIC jmp short loc_B156 ; --------------------------------------------------------------------------- loc_B13E: mov _playperf, 32 jmp short loc_B151 ; --------------------------------------------------------------------------- loc_B145: mov _playperf, 32 cmp _stage_id, 6 jnz short loc_B15D loc_B151: mov _rank, RANK_EXTRA loc_B156: mov _turbo_mode, 1 jmp short loc_B16F ; --------------------------------------------------------------------------- loc_B15D: les bx, _resident mov al, es:[bx+resident_t.rank] mov _rank, al mov al, es:[bx+resident_t.turbo_mode] mov _turbo_mode, al loc_B16F: call sub_10398 call sub_E8FE mov al, _rank mov ah, 0 mov bx, ax cmp bx, RANK_EXTRA ja @@ret add bx, bx jmp cs:off_B225[bx] @@easy: mov word_2C988, 1770h mov score_2C97C, 25 mov _playperf_min, 16 mov _playperf_max, 32 mov _bullet_template_tune, offset bullet_template_tune_easy jmp short @@ret ; --------------------------------------------------------------------------- @@normal: mov word_2C988, 2710h mov score_2C97C, 50 mov _playperf_min, 24 mov _playperf_max, 40 jmp short @@tune_normal ; --------------------------------------------------------------------------- @@hard: mov word_2C988, 3A98h mov _playperf, 44 mov score_2C97C, 100 mov _playperf_min, 44 mov _playperf_max, 54 mov _bullet_template_tune, offset bullet_template_tune_hard jmp short @@ret ; --------------------------------------------------------------------------- @@lunatic: mov word_2C988, 4E20h mov score_2C97C, 200 mov _playperf, 48 mov _playperf_min, 48 mov _playperf_max, 58 mov _bullet_template_tune, offset bullet_template_tune_lunatic jmp short @@ret ; --------------------------------------------------------------------------- @@extra: mov word_2C988, 9C40h mov score_2C97C, 500 mov _playperf_min, 32 mov _playperf_max, 36 @@tune_normal: mov _bullet_template_tune, offset bullet_template_tune_normal @@ret: pop si pop bp retn ; --------------------------------------------------------------------------- off_B225 dw offset @@easy dw offset @@normal dw offset @@hard dw offset @@lunatic dw offset @@extra off_B22F dw offset @@reimu dw offset @@marisa dw offset @@mima dw offset @@yuuka sub_B063 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B237 proc near push bp mov bp, sp push si mov word_20A84, 0 mov vsync_Count2, 0 les bx, _resident mov al, es:[bx+resident_t.stage] mov _stage_id, al cmp _stage_id, 0 jz short loc_B260 cmp _stage_id, 6 jnz short loc_B2DD loc_B260: mov word_20A84, 1 call text_fillca pascal, (' ' shl 16) + TX_BLACK + TX_REVERSE mov fp_2300E, offset nullfunc_near call sub_B063 les bx, _resident cmp es:[bx+resident_t.debug_mode], 0 jz short loc_B2A5 mov al, es:[bx+resident_t.debug_stage] mov es:[bx+resident_t.stage], al mov al, es:[bx+resident_t.stage] mov _stage_id, al mov al, es:[bx+resident_t.debug_power] mov _power, al mov es:[bx+resident_t.debug_mode], 0 mov byte_20A71, 1 loc_B2A5: les bx, _resident cmp es:[bx+resident_t.demo_num], 0 jz short loc_B2DD call demo_load les bx, _resident mov al, es:[bx+resident_t.demo_stage] mov es:[bx+resident_t.stage], al mov _stage_id, al cmp es:[bx+resident_t.demo_num], 5 jz short loc_B2CE mov _power, 128 loc_B2CE: mov fp_2300E, offset DemoPlay mov random_seed, 13Eh loc_B2DD: call sub_CFEE graph_accesspage 0 graph_showpage al push ds push offset aEye_rgb ; "eye.rgb" call palette_entry_rgb call far ptr palette_show mov PaletteTone, 0 call far ptr palette_show call sub_CFEE call _playfield_tram_wipe call sub_B55A nopcall hud_put call sub_BA66 call sub_172FF cmp word_20A84, 0 jz loc_B3CA call bb_curvebullet_load call EmsLoad call bb_playchar_load mov al, _playchar mov ah, 0 mov bx, ax cmp bx, PLAYCHAR_COUNT - 1 ja short loc_B359 add bx, bx jmp cs:off_B552[bx] loc_B33E: push ds push offset aReimu_bft ; "reimu.bft" jmp short loc_B354 ; --------------------------------------------------------------------------- loc_B344: push ds push offset aMari_bft ; "mari.bft" jmp short loc_B354 ; --------------------------------------------------------------------------- loc_B34A: push ds push offset aMima_bft ; "mima.bft" jmp short loc_B354 ; --------------------------------------------------------------------------- loc_B350: push ds push offset aYuka_bft ; "yuka.bft" loc_B354: call super_entry_bfnt loc_B359: call super_entry_bfnt pascal, ds, offset aMikod_bft ; "mikod.bft" call super_entry_bfnt pascal, ds, offset aMiko32_bft ; "miko32.bft" mov al, _playchar mov ah, 0 mov bx, ax cmp bx, PLAYCHAR_COUNT - 1 ja short loc_B399 add bx, bx jmp cs:off_B54A[bx] loc_B37E: push ds push offset aReimu16_bft ; "reimu16.bft" jmp short loc_B394 ; --------------------------------------------------------------------------- loc_B384: push ds push offset aMari16_bft ; "mari16.bft" jmp short loc_B394 ; --------------------------------------------------------------------------- loc_B38A: push ds push offset aMima16_bft ; "mima16.bft" jmp short loc_B394 ; --------------------------------------------------------------------------- loc_B390: push ds push offset aYuka16_bft ; "yuka16.bft" loc_B394: call super_entry_bfnt loc_B399: call super_entry_bfnt pascal, ds, offset aMiko16_bft ; "miko16.bft" mov si, 12 jmp short loc_B3AE ; --------------------------------------------------------------------------- loc_B3A7: call super_convert_tiny pascal, si inc si loc_B3AE: cmp si, 172 jl short loc_B3A7 cmp _playchar, PLAYCHAR_YUUKA jnz short loc_B3C1 push ds push offset aBomb3_bft ; "bomb3.bft" jmp short loc_B3C5 ; --------------------------------------------------------------------------- loc_B3C1: push ds push offset aBomb0_bft ; "bomb0.bft" loc_B3C5: call super_entry_bfnt loc_B3CA: nopcall sub_BF27 mov _pellet_bottom_col, GC_RG mov al, _stage_id mov ah, 0 mov bx, ax cmp bx, 6 ja loc_B4A9 add bx, bx jmp cs:off_B53C[bx] loc_B3EA: push ds push offset aBss0_cd2 ; "BSS0.CD2" call sub_B9CC call super_entry_bfnt pascal, ds, offset aSt00_bft ; "st00.bft" call stage1_setup push ds push offset aSt00_mpn ; "st00.mpn" jmp loc_B4A6 ; --------------------------------------------------------------------------- loc_B404: push ds push offset aBss1_cd2 ; "BSS1.CD2" call sub_B9CC call super_entry_bfnt pascal, ds, offset aSt01_bft ; "st01.bft" call stage2_setup push ds push offset aSt01_mpn ; "st01.mpn" jmp loc_B4A6 ; --------------------------------------------------------------------------- loc_B41E: push ds push offset aBss2_cd2 ; "BSS2.CD2" call sub_B9CC call super_entry_bfnt pascal, ds, offset aSt02_bft ; "st02.bft" call stage3_setup push ds push offset aSt02_mpn ; "st02.mpn" jmp short loc_B4A6 ; --------------------------------------------------------------------------- loc_B437: push ds push offset aBss3_cd2 ; "BSS3.CD2" call sub_B9CC call super_entry_bfnt pascal, ds, offset aSt03_bft ; "st03.bft" call stage4_setup push ds push offset aSt03_mpn ; "st03.mpn" jmp short loc_B4A6 ; --------------------------------------------------------------------------- loc_B450: push ds push offset aBss4_cd2 ; "BSS4.CD2" call sub_B9CC call super_entry_bfnt pascal, ds, offset aSt04_bft ; "st04.bft" call stage5_setup push ds push offset aSt04_mpn ; "st04.mpn" jmp short loc_B4A6 ; --------------------------------------------------------------------------- loc_B469: push ds push offset aBss4_cd2_0 ; "BSS4.CD2" call sub_B9CC call super_entry_bfnt pascal, ds, offset aSt04_bft_0 ; "st04.bft" call stage6_setup mov _boss_bg_render, offset shinki_bg_render mov fp_23F5A, offset shinki_bg_render jmp short loc_B4A9 ; --------------------------------------------------------------------------- loc_B48A: nopcall sub_E4FC push ds push offset aBss6_cd2 ; "BSS6.CD2" call sub_B9CC call super_entry_bfnt pascal, ds, offset aSt06_bft ; "st06.bft" call stagex_setup push ds push offset aSt06_mpn ; "st06.mpn" loc_B4A6: call mptn_load loc_B4A9: call map_load call std_load call sub_EE17 call tiles_fill_initial graph_accesspage 0 loc_B4BB: cmp vsync_Count2, 80h jb short loc_B4BB push 1 call palette_black_out mov PaletteTone, 100 call far ptr palette_show call _playfield_tram_black call tiles_render_all mov _page_back, 1 mov _page_front, 0 graph_accesspage 1 graph_showpage 0 call tiles_render_all les bx, _resident cmp es:[bx+resident_t.demo_num], 0 jz short loc_B506 cmp es:[bx+resident_t.demo_num], 5 jnz short loc_B52C loc_B506: les bx, off_20A86 mov byte ptr es:[bx+2], 30h ; '0' mov al, _stage_id add al, 30h ; '0' mov es:[bx+3], al push word ptr off_20A86+2 push bx push SND_LOAD_SONG call snd_load kajacall KAJA_SONG_PLAY loc_B52C: mov _overlay_text, offset sub_11914 mov _popup, offset nullfunc_near pop si pop bp retn sub_B237 endp ; --------------------------------------------------------------------------- db 0 off_B53C dw offset loc_B3EA dw offset loc_B404 dw offset loc_B41E dw offset loc_B437 dw offset loc_B450 dw offset loc_B469 dw offset loc_B48A off_B54A dw offset loc_B37E dw offset loc_B384 dw offset loc_B38A dw offset loc_B390 off_B552 dw offset loc_B33E dw offset loc_B344 dw offset loc_B34A dw offset loc_B350 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame ;CStage::InitChara sub_B55A proc near push bp mov bp, sp call sub_EACE mov _stage_frame, 0 mov _bombing_disabled, 0 mov _scroll_line, 0 mov word_23F06, 0 mov _scroll_line_on_page[0 * 2], 0 mov _scroll_line_on_page[1 * 2], 0 mov _scroll_subpixel_line, 0 mov byte_23EFC, 0 mov byte_23F04, 0 mov word_2CE02, 0 mov word_2CE04, 0 mov _player_pos.cur.x, 192 * 16 mov _player_pos.cur.y, 320 * 16 mov _player_pos.prev.x, 192 * 16 mov _player_pos.prev.y, 320 * 16 mov byte_2CEBD, 0 mov _miss_time, 0 mov _player_is_hit, 0 mov _player_invincibility_time, STAGE_START_INVINCIBILITY_FRAMES mov _stage_point_items_collected, 0 mov _shot_time, 0 mov fp_2C92E, offset sub_EE58 mov _scroll_active, 1 nopcall sub_E4FC call randring_fill call sub_16D67 call sub_C473 call sparks_init call hud_score_put call pointnums_init nopcall hud_put mov fp_23F5A, offset tiles_render_all call tiles_invalidate_reset pop bp retn sub_B55A endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B609 proc near push bp mov bp, sp push si call bb_stage_free call sub_EE32 call std_free call map_free call super_clean pascal, (180 shl 16) or 256 mov si, 1 jmp short loc_B630 ; --------------------------------------------------------------------------- loc_B629: call cdg_free pascal, si inc si loc_B630: cmp si, 31 jl short loc_B629 pop si pop bp retn sub_B609 endp include th04/main/pause.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public demo_load demo_load proc near var_4 = dword ptr -4 enter 4, 0 push si les bx, _resident cmp es:[bx+resident_t.demo_num], 4 ja short @@demo_extra mov ax, DEMO_N * 2 jmp short loc_B76F ; --------------------------------------------------------------------------- @@demo_extra: mov ax, (DEMO_N * 4) * 2 loc_B76F: mov si, ax call hmem_allocbyte pascal, ax mov word ptr _DemoBuf+2, ax mov word ptr _DemoBuf, 0 mov word ptr [bp+var_4+2], ds mov word ptr [bp+var_4], offset aDemo0_rec les bx, _resident mov al, es:[bx+resident_t.demo_num] add al, ('0' - 1) les bx, [bp+var_4] mov es:[bx+4], al push word ptr [bp+var_4+2] push bx call file_ropen call file_read pascal, large [_DemoBuf], si call file_close pop si leave retn demo_load endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public DEMOPLAY DemoPlay proc near ; ZUN symbol [MAGNet2010] var_2 = word ptr -2 enter 2, 0 les bx, _resident cmp es:[bx+resident_t.demo_num], 4 ja short @@demo_extra mov ax, DEMO_N jmp short loc_B7CC ; --------------------------------------------------------------------------- @@demo_extra: mov ax, DEMO_N * 4 loc_B7CC: mov [bp+var_2], ax test _key_det, INPUT_REPLAY_END jnz short loc_B80C les bx, _DemoBuf add bx, _stage_frame mov al, es:[bx] mov ah, 0 mov _key_det, ax mov ax, _stage_frame add ax, [bp+var_2] mov bx, word ptr _DemoBuf add bx, ax mov al, es:[bx] mov _shiftkey, al les bx, _resident cmp es:[bx+resident_t.demo_num], 4 ja short locret_B825 cmp _stage_frame, DEMO_N - 4 jb short locret_B825 loc_B80C: push word ptr _DemoBuf+2 call hmem_free push 8 call palette_black_out push ds push offset aOp_1 ; "op" nopcall GameCore locret_B825: leave retn DemoPlay endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public EMSSETUP EmsSetup proc near ; ZUN symbol [MAGNet2010] push bp mov bp, sp les bx, _resident mov al, es:[bx+resident_t.stage] mov _stage_id, al cmp _stage_id, 6 jnz short @@game_is_not_extra mov _rank, RANK_EXTRA jmp short loc_B84E ; --------------------------------------------------------------------------- @@game_is_not_extra: les bx, _resident mov al, es:[bx+resident_t.rank] mov _rank, al loc_B84E: mov _Ems, 0 call ems_exist or ax, ax jz short @@ret call ems_space push dx push ax pop eax cmp eax, EMSSIZE jb short @@ret call ems_allocate pascal, EMSSIZE mov _Ems, ax cmp _Ems, 0 jz short @@ret push ax push ds push offset aKaikiems ; "KAIKIEMS" call ems_setname call cdg_load_single_noalpha pascal, 31, [off_20A80], 0 push _Ems pushd 0 push _cdg_slots.seg_colors + (size cdg_t * 31) push 0 mov ax, _cdg_slots.CDG_plane_size + (size cdg_t * 31) shl ax, 2 movzx eax, ax push eax call ems_write call cdg_free pascal, 31 @@ret: pop bp retn EmsSetup endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public EMSLOAD EmsLoad proc near ; ZUN symbol [MAGNet2010] @@size = dword ptr -4 ; ZUN symbol [MAGNet2010] enter 4, 0 push si push di les bx, _resident mov al, es:[bx+resident_t.playchar] add al, '0' les bx, bbname mov es:[bx+2], al call cdg_load_all_noalpha pascal, 0, word ptr bbname+2, bx cmp _Ems, 0 jz @@ret push _Ems pushd 84D0h push _cdg_slots.seg_colors + (size cdg_t * 0) push 0 mov ax, _cdg_slots.CDG_plane_size + (size cdg_t * 0) shl ax, 2 movzx eax, ax push eax call ems_write mov al, _playchar mov ah, 0 mov bx, ax cmp bx, PLAYCHAR_COUNT - 1 ja short loc_B946 add bx, bx jmp cs:off_B9C4[bx] @@reimu: push 2 push ds push offset aKao0_cd2 ; "KAO0.cd2" jmp short loc_B941 ; --------------------------------------------------------------------------- @@marisa: push 2 push ds push offset aKao1_cd2 ; "KAO1.cd2" jmp short loc_B941 ; --------------------------------------------------------------------------- @@mima: push 2 push ds push offset aKao2_cd2 ; "KAO2.cd2" jmp short loc_B941 ; --------------------------------------------------------------------------- @@yuuka: push 2 push ds push offset aKao3_cd2 ; "KAO3.cd2" loc_B941: call cdg_load_all loc_B946: mov si, 2 mov [bp+@@size], 186A0h mov di, _cdg_slots.CDG_plane_size + (size cdg_t * 2) jmp short loc_B9B4 ; --------------------------------------------------------------------------- loc_B957: push _Ems pushd [bp+@@size] mov bx, si shl bx, 4 push _cdg_slots.seg_alpha[bx] push 0 movzx eax, di push eax call ems_write movzx eax, di add [bp+@@size], eax push _Ems pushd [bp+@@size] mov bx, si shl bx, 4 push _cdg_slots.seg_colors[bx] push 0 mov ax, di shl ax, 2 movzx eax, ax push eax call ems_write mov ax, di shl ax, 2 movzx eax, ax add [bp+@@size], eax call cdg_free pascal, si inc si loc_B9B4: mov bx, si shl bx, 4 cmp _cdg_slots.seg_alpha[bx], 0 jnz short loc_B957 @@ret: pop di pop si leave retn off_B9C4 dw offset @@reimu dw offset @@marisa dw offset @@mima dw offset @@yuuka EmsLoad endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B9CC proc near var_4 = dword ptr -4 arg_0 = dword ptr 4 enter 4, 0 push si push di cmp _Ems, 0 jz loc_BA60 call cdg_load_all pascal, 8, [bp+arg_0] mov si, 8 mov [bp+var_4], 30D40h mov di, _cdg_slots.CDG_plane_size + (size cdg_t * 8) jmp short loc_BA54 ; --------------------------------------------------------------------------- loc_B9F7: push _Ems pushd [bp+var_4] mov bx, si shl bx, 4 push _cdg_slots.seg_alpha[bx] push 0 movzx eax, di push eax call ems_write movzx eax, di add [bp+var_4], eax push _Ems pushd [bp+var_4] mov bx, si shl bx, 4 push _cdg_slots.seg_colors[bx] push 0 mov ax, di shl ax, 2 movzx eax, ax push eax call ems_write mov ax, di shl ax, 2 movzx eax, ax add [bp+var_4], eax call cdg_free pascal, si inc si loc_BA54: mov bx, si shl bx, 4 cmp _cdg_slots.seg_alpha[bx], 0 jnz short loc_B9F7 loc_BA60: pop di pop si leave retn 4 sub_B9CC endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BA66 proc near push bp mov bp, sp cmp _Ems, 0 jz short loc_BA9C mov ax, _cdg_slots.CDG_plane_size + (size cdg_t * 31) shl ax, 2 push ax call hmem_allocbyte mov _cdg_slots.seg_colors + (size cdg_t * 31), ax push _Ems pushd 0 push ax push 0 mov ax, _cdg_slots.CDG_plane_size + (size cdg_t * 31) shl ax, 2 movzx eax, ax push eax call ems_read jmp short loc_BAAA ; --------------------------------------------------------------------------- loc_BA9C: call cdg_load_single_noalpha pascal, 31, [off_20A80], 0 loc_BAAA: mov PaletteTone, 0 call far ptr palette_show push (80 shl 16) or 112 push 31 call cdg_put_noalpha call cdg_free pascal, 31 push 1 call palette_black_in pop bp retn sub_BA66 endp include th05/formats/cfg_lres.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MPTN_LOAD mptn_load proc near arg_0 = dword ptr 4 push bp mov bp, sp push si push di pushd [bp+arg_0] call mptn_load_inner mov al, 1 loc_BB08: out 0A6h, al push ax xor bp, bp mov si, 240h loc_BB10: xor di, di loc_BB12: push si push di push bp call sub_4226 inc bp add di, 10h cmp di, 190h jb short loc_BB12 add si, 10h cmp si, 280h jb short loc_BB10 pop ax dec al jz short loc_BB08 call mptn_free pop di pop si pop bp retn 4 mptn_load endp ; --------------------------------------------------------------------------- nop ; =============== S U B R O U T I N E ======================================= map_load proc near push si call map_free mov al, _stage_id add al, 30h ; '0' mov aSt00_map+3, al mov ax, 3D00h mov dx, offset aSt00_map int 21h ; DOS - 2+ - OPEN DISK FILE WITH HANDLE ; DS:DX -> ASCIZ filename ; AL = access mode ; 0 - read mov bx, ax mov si, ax mov ah, 3Fh ; '?' mov dx, offset map_header mov cx, 8 int 21h ; DOS - 2+ - READ FROM FILE WITH HANDLE ; BX = file handle, CX = number of bytes to read ; DS:DX -> buffer push map_header.map_size call hmem_allocbyte mov map_seg, ax push ds mov bx, si mov cx, map_header.map_size mov ds, ax xor dx, dx mov ah, 3Fh int 21h ; DOS - 2+ - READ FROM FILE WITH HANDLE ; BX = file handle, CX = number of bytes to read ; DS:DX -> buffer pop ds mov ah, 3Eh int 21h ; DOS - 2+ - CLOSE A FILE WITH HANDLE ; BX = file handle pop si retn map_load endp ; =============== S U B R O U T I N E ======================================= map_free proc near cmp map_seg, 0 jz short locret_BB98 push map_seg call hmem_free mov map_seg, 0 locret_BB98: retn map_free endp even include th04/main/tiles_fill_initial.asm include th04/main/tiles_render_all.asm ; =============== S U B R O U T I N E ======================================= sub_BC6A proc near push bp push si push di mov ax, GRAM_400 mov es, ax mov dx, _scroll_line mov ax, 4 mov cx, dx shl cx, 6 add ax, cx shr cx, 2 add ax, cx mov word_23EFF, ax mov ax, dx shr ax, 4 shl ax, 6 mov bx, ax mov si, _tile_ring[bx] mov bx, dx and bx, 0Fh mov cx, bx shl cx, 6 mov dx, cx shr cx, 2 add dx, cx mov word_23EFD, dx xor ch, ch mov cl, byte_23EFC mov bh, bl add bl, cl cmp bl, 10h jbe short loc_BCC5 sub bl, 10h mov cl, 10h sub cl, bh mov dh, bl jmp short loc_BCC7 ; --------------------------------------------------------------------------- loc_BCC5: xor dh, dh loc_BCC7: mov dl, TILES_X mov word_23F01, cx loc_BCCD: mov di, word_23EFF add si, word_23EFD add word_23EFF, 2 mov bl, dh loc_BCDC: mov bp, es:[si] mov es:[di], bp add si, ROW_SIZE add di, ROW_SIZE loop loc_BCDC or bl, bl jz short loc_BD0B mov cl, bl mov bx, ax add bx, 40h cmp di, 7D00h jb short loc_BD03 sub di, 7D00h sub bx, 640h loc_BD03: mov si, _tile_ring[bx] xor bx, bx jmp short loc_BCDC ; --------------------------------------------------------------------------- loc_BD0B: mov cx, word_23F01 add ax, 2 mov bx, ax mov si, _tile_ring[bx] dec dl jnz short loc_BCCD pop di pop si pop bp retn sub_BC6A endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BD20 proc near var_1 = byte ptr -1 enter 2, 0 push si push di cmp byte_23EFC, 0 jnz short loc_BD36 cmp byte_23F04, 0 jz loc_BDE8 loc_BD36: cmp _scroll_speed, 0 jz loc_BDE8 mov ax, _scroll_line shr ax, 4 cmp ax, word_23F06 jz short loc_BDB7 mov word_23F06, ax mov bx, _std_seg mov es, bx assume es:nothing dec _tile_row_in_section jns short loc_BD88 mov _tile_row_in_section, 4 inc _tile_section_ptr inc _tile_scrollspeed_ptr mov bx, _tile_scrollspeed_ptr mov dl, es:[bx] mov _scroll_speed, dl or dl, dl jnz short loc_BD88 mov _scroll_line, 0 mov byte_23F04, 0 loc_BD81: mov byte_23EFC, 0 jmp short loc_BDE8 ; --------------------------------------------------------------------------- loc_BD88: shl ax, 6 add ax, offset _tile_ring mov di, ax xor ax, ax mov al, _tile_row_in_section shl ax, 6 mov bx, _tile_section_ptr mov bl, es:[bx] xor bh, bh mov bx, _TILE_SECTION_OFFSETS[bx] mov si, ax add si, bx push ds pop es assume es:_DATA push ds mov ax, map_seg mov ds, ax mov cx, TILES_X rep movsw pop ds loc_BDB7: mov al, byte_23F04 mov [bp+var_1], al mov al, byte_23EFC mov byte_23F04, al mov al, [bp+var_1] add byte_23EFC, al cmp _stage_id, 5 jz short loc_BD81 cmp _scroll_active, 0 jz short loc_BD81 call egc_start_copy_inlined_noframe call sub_BC6A mov byte_23EFC, 0 call egc_off loc_BDE8: pop di pop si leave retn sub_BD20 endp include th05/formats/std.asm include th04/main/tiles_invalidate_all.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BEE6 proc near push bp mov bp, sp call popup_titles_invalidate call player_invalidate call sub_123AD call enemies_invalidate call bullets_gather_invalidate call items_invalidate call sparks_invalidate call pointnums_invalidate call _midboss_invalidate? call _stage_invalidate call tiles_redraw_invalidated pop bp retn sub_BEE6 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BF0E proc near push bp mov bp, sp call tiles_render_all dec byte_23F5E cmp byte_23F5E, 0 jnz short loc_BF25 mov _boss_bg_render, offset sub_BEE6 loc_BF25: pop bp retn sub_BF0E endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BF27 proc far push bp mov bp, sp mov _boss_bg_render, offset sub_BEE6 pop bp retf sub_BF27 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_BF32 proc far arg_0 = byte ptr 6 push bp mov bp, sp mov al, [bp+arg_0] mov byte_23F5E, al mov _boss_bg_render, offset sub_BF0E pop bp retf 2 sub_BF32 endp ; --------------------------------------------------------------------------- db 0 ; =============== S U B R O U T I N E ======================================= include th04/main/tiles_redraw.asm include th04/main/scroll_y_1.asm MOTION_UPDATE_DEF 1 include th03/math/randring_fill.asm RANDRING_NEXT_DEF 1 even include th04/main/null.asm include th04/main/bullet/pellet_r.asm include th04/main/spark_render.asm include th04/main/sparks.asm include th04/main/item/splash_dot_render.asm include th04/main/pointnum/inv_upd.asm include th05/main/pointnum/render.asm include th04/main/pointnum/num_put.asm ; --------------------------------------------------------------------------- enter 2, 0 push si push di mov si, [bp+0Ah] mov di, [bp+8] mov ax, si sar ax, 4 mov si, ax mov al, _scroll_active mov [bp-1], al mov _scroll_active, 1 lea ax, [di+(16 shl 4)] call scroll_subpixel_y_to_vram_seg1 pascal, ax mov di, ax mov bx, 10h cwd idiv bx shl ax, 6 push ax mov ax, si cwd idiv bx add ax, ax pop bx add bx, ax mov ax, [bp+6] mov _tile_ring[bx], ax mov al, [bp-1] mov _scroll_active, al pop di pop si leave retf 6 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C473 proc near push bp mov bp, sp mov _bombing, 0 mov fp_23F58, offset nullfunc_near pop bp retn sub_C473 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public PLAYER_BOMB player_bomb proc near push bp mov bp, sp cmp _bombing, 0 jnz loc_C518 cmp _bombs, 0 jz loc_C518 cmp _bombing_disabled, 0 jnz short loc_C518 cmp _miss_time, 0 jz short loc_C4BC cmp _miss_time, MISS_ANIM_FRAMES jbe short loc_C518 mov _miss_time, 0 mov _player_is_hit, 0 mov byte_2CEBD, 0 loc_C4BC: dec _bombs nopcall sub_104BB mov _bombing, 1 mov _bomb_frame, 0 push (192 shl 16) or 160 push (144 shl 16) or 224 nopcall select_for_playchar mov _player_invincibility_time, al push (192 shl 16) or 128 push ( 96 shl 16) or 192 nopcall select_for_playchar mov _bullet_clear_time, al mov ax, fp_23F5A mov fp_23F58, ax call snd_se_play pascal, 13 mov _items_pull_to_player, 1 les bx, _resident assume es:nothing inc es:[bx+resident_t.bombs_used] push 1 nopcall playperf_lower loc_C518: pop bp retn player_bomb endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C51A proc near arg_0 = word ptr 4 push bp mov bp, sp mov ax, _bb_playchar_seg mov word_2449C, ax push [bp+arg_0] call sub_DF36 pop bp retn 2 sub_C51A endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C52D proc near push bp mov bp, sp mov al, _bomb_frame mov ah, 0 mov bx, 2 cwd idiv bx or dx, dx jnz short loc_C565 cmp _boss_phase, 0 jz short loc_C555 mov al, _bomb_frame mov ah, 0 mov bx, 4 cwd idiv bx or dx, dx jz short loc_C565 loc_C555: cmp _dream, 1 jbe short loc_C560 dec _dream loc_C560: nopcall hud_dream_put loc_C565: pop bp retn sub_C52D endp main_TEXT ends main__TEXT segment byte public 'CODE' use16 REIMU_STARS_UPDATE_AND_RENDER procdesc pascal near ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C73A proc near push bp mov bp, sp push (80 shl 16) or 16 push 0 call cdg_put_noalpha call sub_CEC2 call reimu_stars_update_and_render mov _circles_color, GC_RG cmp _bomb_frame, 64 ja short loc_C777 mov al, _bomb_frame mov ah, 0 add ax, -32 imul ax, 3 mov dx, 196 sub dx, ax mov PaletteTone, dx mov _palette_changed, 1 pop bp retn ; --------------------------------------------------------------------------- loc_C777: cmp _bomb_frame, 112 ja short loc_C78C cmp _stage_frame_mod4, 0 jnz short loc_C78C call snd_se_play pascal, 9 loc_C78C: pop bp retn sub_C73A endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public BOMB_REIMU bomb_reimu proc near push bp mov bp, sp cmp _bomb_frame, 32 jnb short loc_C7AE mov byte_24498, 0Fh mov al, _bomb_frame mov ah, 0 cwd sub ax, dx sar ax, 1 push ax call sub_C51A loc_C7AB: jmp loc_C849 ; --------------------------------------------------------------------------- loc_C7AE: cmp _bomb_frame, 32 jnz short loc_C7C9 mov _scroll_active, 0 call graph_scrollup pascal, 0 mov fp_23F58, offset nullfunc_near jmp short loc_C7D0 ; --------------------------------------------------------------------------- loc_C7C9: cmp _bomb_frame, 128 jnb short loc_C7D8 loc_C7D0: call sub_C73A call sub_C52D jmp short loc_C849 ; --------------------------------------------------------------------------- loc_C7D8: cmp _bomb_frame, 128 jnz short loc_C7F9 call snd_se_play pascal, 15 cmp _stage_id, 5 jz short loc_C7F2 mov _scroll_active, 1 loc_C7F2: mov _items_pull_to_player, 0 jmp short loc_C800 ; --------------------------------------------------------------------------- loc_C7F9: cmp _bomb_frame, 160 jnb short loc_C839 loc_C800: mov ax, fp_23F5A mov fp_23F58, ax mov al, _bomb_frame mov ah, 0 add ax, -128 imul ax, 3 mov dx, 192 sub dx, ax mov PaletteTone, dx mov _palette_changed, 1 cmp _bomb_frame, 130 jnz short loc_C849 cmp _stage_id, 5 jz short loc_C849 call graph_scrollup pascal, _scroll_line jmp loc_C7AB ; --------------------------------------------------------------------------- loc_C839: mov _bombing, 0 mov PaletteTone, 100 mov _palette_changed, 1 loc_C849: inc _bomb_frame pop bp retn bomb_reimu endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame marisa_lasers_update_and_render proc near var_6 = word ptr -6 @@y = word ptr -4 @@x = word ptr -2 enter 6, 0 push si push di cmp _bomb_frame, 16 jnz short loc_C87C mov PaletteTone, 100 mov _palette_changed, 1 xor di, di jmp short loc_C877 ; --------------------------------------------------------------------------- loc_C86B: mov bx, di imul bx, size marisa_laser_t mov _bomb_anim[bx+marisa_laser_t.BA_center.x], PIXEL_NONE inc di loc_C877: cmp di, MARISA_LASER_COUNT jl short loc_C86B loc_C87C: mov al, _bomb_frame mov ah, 0 mov bx, 4 cwd idiv bx or dx, dx jnz short loc_C8CE mov al, _bomb_frame mov ah, 0 add ax, -16 cwd idiv bx and ax, 7 mov di, ax imul ax, size marisa_laser_t add ax, offset _bomb_anim mov si, ax mov eax, _player_pos.cur mov dword ptr [si+marisa_laser_t.BA_center], eax call sub_158CC mov ax, _player_pos.cur.x mov [si+marisa_laser_t.BA_center.x], ax mov ax, _player_pos.cur.y mov [si+marisa_laser_t.BA_center.y], ax mov [si+marisa_laser_t.BA_radius], 24 call snd_se_play pascal, 15 mov PaletteTone, 170 jmp short loc_C8D4 ; --------------------------------------------------------------------------- loc_C8CE: mov PaletteTone, 100 loc_C8D4: call far ptr palette_show call _grcg_setmode_rmw_seg1 mov si, offset _bomb_anim xor di, di jmp loc_C98D ; --------------------------------------------------------------------------- loc_C8E4: cmp [si+marisa_laser_t.BA_center.x], PIXEL_NONE jz loc_C989 mov ax, [si+marisa_laser_t.BA_center.x] mov bx, 16 cwd idiv bx add ax, PLAYFIELD_LEFT mov [bp+@@x], ax mov ax, [si+marisa_laser_t.BA_center.y] cwd idiv bx add ax, PLAYFIELD_TOP mov [bp+@@y], ax mov ah, GC_BRG call _grcg_setcolor_direct_seg1_raw mov ax, [si+marisa_laser_t.BA_radius] cwd sub ax, dx sar ax, 1 mov [bp+var_6], ax mov ax, [bp+@@x] sub ax, [bp+var_6] push ax push 10h mov ax, [bp+@@x] add ax, [bp+var_6] push ax push [bp+@@y] call grcg_boxfill mov ah, GC_RG call _grcg_setcolor_direct_seg1_raw dec [bp+var_6] mov ax, [bp+@@x] sub ax, [bp+var_6] push ax push 10h mov ax, [bp+@@x] add ax, [bp+var_6] push ax push [bp+@@y] call grcg_boxfill mov ah, 0Fh call _grcg_setcolor_direct_seg1_raw dec [bp+var_6] mov ax, [bp+@@x] sub ax, [bp+var_6] push ax push 10h mov ax, [bp+@@x] add ax, [bp+var_6] push ax push [bp+@@y] call grcg_boxfill call grcg_circlefill pascal, [bp+@@x], [bp+@@y], [si+marisa_laser_t.BA_radius] dec [si+marisa_laser_t.BA_radius] cmp [si+marisa_laser_t.BA_radius], 4 jge short loc_C989 mov [si+marisa_laser_t.BA_center.x], PIXEL_NONE loc_C989: inc di add si, size marisa_laser_t loc_C98D: cmp di, MARISA_LASER_COUNT jl loc_C8E4 GRCG_OFF_CLOBBERING dx pop di pop si leave retn marisa_lasers_update_and_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C99E proc near push bp mov bp, sp push (112 shl 16) or 16 push 0 call cdg_put_noalpha call sub_CEF2 cmp _bomb_frame, 16 jnb short loc_C9D0 mov al, _bomb_frame mov ah, 0 imul ax, 6 mov dx, 196 sub dx, ax mov PaletteTone, dx mov _palette_changed, 1 pop bp retn ; --------------------------------------------------------------------------- loc_C9D0: call marisa_lasers_update_and_render mov _shot_time, SHOT_BLOCKED_FOR_THIS_FRAME pop bp retn sub_C99E endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public BOMB_MARISA bomb_marisa proc near push bp mov bp, sp cmp _bomb_frame, 80 jnb short loc_CA05 cmp _bomb_frame, 2 jnz short loc_C9FD mov _scroll_active, 0 call graph_scrollup pascal, 0 mov fp_23F58, offset nullfunc_near loc_C9FD: call sub_C99E call sub_C52D jmp short loc_CA75 ; --------------------------------------------------------------------------- loc_CA05: cmp _bomb_frame, 80 jnz short loc_CA26 call snd_se_play pascal, 15 cmp _stage_id, 5 jz short loc_CA1F mov _scroll_active, 1 loc_CA1F: mov _items_pull_to_player, 0 jmp short loc_CA2D ; --------------------------------------------------------------------------- loc_CA26: cmp _bomb_frame, 96 jnb short loc_CA65 loc_CA2D: mov ax, fp_23F5A mov fp_23F58, ax mov al, _bomb_frame mov ah, 0 add ax, -80 imul ax, 6 mov dx, 192 sub dx, ax mov PaletteTone, dx mov _palette_changed, 1 cmp _bomb_frame, 82 jnz short loc_CA75 cmp _stage_id, 5 jz short loc_CA75 call graph_scrollup pascal, _scroll_line jmp short loc_CA75 ; --------------------------------------------------------------------------- loc_CA65: mov _bombing, 0 mov PaletteTone, 100 mov _palette_changed, 1 loc_CA75: inc _bomb_frame pop bp retn bomb_marisa endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame mima_circles_update_and_render proc near push bp mov bp, sp push si push di cmp _bomb_frame, 1 jnz short loc_CAA7 mov PaletteTone, 100 mov _palette_changed, 1 xor di, di jmp short loc_CAA2 ; --------------------------------------------------------------------------- loc_CA96: mov bx, di imul bx, size mima_circle_t mov _bomb_anim[bx+mima_circle_t.BA_center.x], PIXEL_NONE inc di loc_CAA2: cmp di, MIMA_CIRCLE_COUNT jl short loc_CA96 loc_CAA7: mov al, _bomb_frame mov ah, 0 mov bx, 4 cwd idiv bx or dx, dx jnz short loc_CAE0 mov al, _bomb_frame mov ah, 0 add ax, -16 cwd idiv bx and ax, (MIMA_CIRCLE_COUNT - 1) mov di, ax imul ax, size mima_circle_t add ax, offset _bomb_anim mov si, ax ; Just so that it's not PIXEL_NONE, given that it's overwritten ; immediately after anyway? Probably copy-pasted from Marisa. mov eax, _player_pos.cur mov dword ptr [si+mima_circle_t.BA_center], eax mov [si+mima_circle_t.BA_distance], 256 call randring1_next16 mov [si+mima_circle_t.BA_angle], al loc_CAE0: mov si, offset _bomb_anim xor di, di jmp short loc_CB27 ; --------------------------------------------------------------------------- loc_CAE7: cmp word ptr [si+mima_circle_t.BA_center.x], PIXEL_NONE jz short loc_CB23 push si push (224 shl 16) or 117 push [si+mima_circle_t.BA_distance] mov al, [si+mima_circle_t.BA_angle] mov ah, 0 push ax call vector2_at push [si+mima_circle_t.BA_center.x] push [si+mima_circle_t.BA_center.y] mov ax, [si+mima_circle_t.BA_distance] cwd sub ax, dx sar ax, 1 push ax call grcg_circlefill sub [si+mima_circle_t.BA_distance], 16 cmp [si+mima_circle_t.BA_distance], 4 jge short loc_CB23 mov [si+mima_circle_t.BA_center.x], PIXEL_NONE loc_CB23: inc di add si, size mima_circle_t loc_CB27: cmp di, MIMA_CIRCLE_COUNT jl short loc_CAE7 pop di pop si pop bp retn mima_circles_update_and_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_CB30 proc near push bp mov bp, sp push si push (64 shl 16) or 64 push 0 call cdg_put_noalpha call sub_CF50 call grcg_setcolor pascal, (GC_RMW shl 16) + 7 call grcg_vline pascal, (209 shl 16) or PLAYFIELD_TOP, PLAYFIELD_TOP + 47 call grcg_vline pascal, (209 shl 16) or 336, PLAYFIELD_BOTTOM - 1 call grcg_vline pascal, (238 shl 16) or PLAYFIELD_TOP, PLAYFIELD_TOP + 47 call grcg_vline pascal, (238 shl 16) or 336, PLAYFIELD_BOTTOM - 1 mov ah, GC_BI call _grcg_setcolor_direct_seg1_raw call grcg_vline pascal, (208 shl 16) or PLAYFIELD_TOP, PLAYFIELD_TOP + 47 call grcg_vline pascal, (208 shl 16) or 336, PLAYFIELD_BOTTOM - 1 call grcg_vline pascal, (239 shl 16) or PLAYFIELD_TOP, PLAYFIELD_TOP + 47 call grcg_vline pascal, (239 shl 16) or 336, PLAYFIELD_BOTTOM - 1 mov ah, 15 call _grcg_setcolor_direct_seg1_raw call mima_circles_update_and_render mov al, _bomb_frame mov ah, 0 mov dx, 224 sub dx, ax mov si, dx or si, si jle short loc_CBE4 call grcg_circle pascal, (224 shl 16) or 117, dx loc_CBE4: GRCG_OFF_CLOBBERING dx mov al, _bomb_frame mov ah, 0 add ax, 100 mov PaletteTone, ax mov _palette_changed, 1 pop si pop bp retn sub_CB30 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public BOMB_MIMA bomb_mima proc near push bp mov bp, sp cmp _bomb_frame, 64 jnb short loc_CC28 cmp _bomb_frame, 2 jnz short loc_CC20 mov _scroll_active, 0 call graph_scrollup pascal, 0 mov fp_23F58, offset nullfunc_near loc_CC20: call sub_CB30 call sub_C52D jmp short loc_CC98 ; --------------------------------------------------------------------------- loc_CC28: cmp _bomb_frame, 64 jnz short loc_CC49 call snd_se_play pascal, 15 cmp _stage_id, 5 jz short loc_CC42 mov _scroll_active, 1 loc_CC42: mov _items_pull_to_player, 0 jmp short loc_CC50 ; --------------------------------------------------------------------------- loc_CC49: cmp _bomb_frame, 80 jnb short loc_CC88 loc_CC50: mov ax, fp_23F5A mov fp_23F58, ax mov al, _bomb_frame mov ah, 0 add ax, -64 imul ax, 6 mov dx, 192 sub dx, ax mov PaletteTone, dx mov _palette_changed, 1 cmp _bomb_frame, 66 jnz short loc_CC98 cmp _stage_id, 5 jz short loc_CC98 call graph_scrollup pascal, _scroll_line jmp short loc_CC98 ; --------------------------------------------------------------------------- loc_CC88: mov _bombing, 0 mov PaletteTone, 100 mov _palette_changed, 1 loc_CC98: inc _bomb_frame pop bp retn bomb_mima endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame yuuka_heart_update_and_render proc near push bp mov bp, sp push si cmp _bomb_frame, 32 jnz short loc_CCAF mov _bomb_anim.BA_distance, 16 loc_CCAF: xor si, si jmp short loc_CD07 ; --------------------------------------------------------------------------- loc_CCB3: push offset _bomb_anim.BA_topleft push (192 shl 16) or 160 ; No subpixels! push _bomb_anim.BA_distance mov al, _bomb_anim.BA_angle mov ah, 0 push ax call vector2_at cmp _bomb_anim.BA_topleft.x, 0 jl short loc_CCFE cmp _bomb_anim.BA_topleft.x, (PLAYFIELD_RIGHT - 32) jg short loc_CCFE cmp _bomb_anim.BA_topleft.y, 0 jl short loc_CCFE cmp _bomb_anim.BA_topleft.y, (PLAYFIELD_BOTTOM - 48) jg short loc_CCFE call super_roll_put_1plane pascal, _bomb_anim.BA_topleft.x, _bomb_anim.BA_topleft.y, (179 shl 16) or 0, PLANE_PUT or GC_BRGI loc_CCFE: inc si mov al, _bomb_anim.BA_angle add al, 10h mov _bomb_anim.BA_angle, al loc_CD07: cmp si, 10h jl short loc_CCB3 mov al, _bomb_anim.BA_angle add al, 2 mov _bomb_anim.BA_angle, al add _bomb_anim.BA_distance, 2 pop si pop bp retn yuuka_heart_update_and_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_CD1C proc near push bp mov bp, sp push (96 shl 16) or 16 push 0 call cdg_put_noalpha call sub_CFBA call yuuka_heart_update_and_render mov _circles_color, GC_RG cmp _bomb_frame, 64 ja short loc_CD59 mov al, _bomb_frame mov ah, 0 add ax, -32 imul ax, 3 mov dx, 196 sub dx, ax mov PaletteTone, dx mov _palette_changed, 1 pop bp retn ; --------------------------------------------------------------------------- loc_CD59: mov al, _bomb_frame mov ah, 0 mov bx, 4 cwd idiv bx or dx, dx jnz short loc_CD77 call snd_se_play pascal, 9 mov PaletteTone, 150 jmp short loc_CD8D ; --------------------------------------------------------------------------- loc_CD77: mov al, _bomb_frame mov ah, 0 mov bx, 4 cwd idiv bx cmp dx, 2 jnz short loc_CD92 mov PaletteTone, 100 loc_CD8D: call far ptr palette_show loc_CD92: pop bp retn sub_CD1C endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public BOMB_YUUKA bomb_yuuka proc near push bp mov bp, sp cmp _bomb_frame, 32 jnb short loc_CDB4 mov byte_24498, 0Fh mov al, _bomb_frame mov ah, 0 cwd sub ax, dx sar ax, 1 push ax call sub_C51A loc_CDB1: jmp loc_CE4F ; --------------------------------------------------------------------------- loc_CDB4: cmp _bomb_frame, 32 jnz short loc_CDCF mov _scroll_active, 0 call graph_scrollup pascal, 0 mov fp_23F58, offset nullfunc_near jmp short loc_CDD6 ; --------------------------------------------------------------------------- loc_CDCF: cmp _bomb_frame, 160 jnb short loc_CDDE loc_CDD6: call sub_CD1C call sub_C52D jmp short loc_CE4F ; --------------------------------------------------------------------------- loc_CDDE: cmp _bomb_frame, 160 jnz short loc_CDFF call snd_se_play pascal, 15 cmp _stage_id, 5 jz short loc_CDF8 mov _scroll_active, 1 loc_CDF8: mov _items_pull_to_player, 0 jmp short loc_CE06 ; --------------------------------------------------------------------------- loc_CDFF: cmp _bomb_frame, 192 jnb short loc_CE3F loc_CE06: mov ax, fp_23F5A mov fp_23F58, ax mov al, _bomb_frame mov ah, 0 add ax, -160 imul ax, 3 mov dx, 192 sub dx, ax mov PaletteTone, dx mov _palette_changed, 1 cmp _bomb_frame, 161 jnz short loc_CE4F cmp _stage_id, 5 jz short loc_CE4F call graph_scrollup pascal, _scroll_line jmp loc_CDB1 ; --------------------------------------------------------------------------- loc_CE3F: mov _bombing, 0 mov PaletteTone, 100 mov _palette_changed, 1 loc_CE4F: inc _bomb_frame pop bp retn bomb_yuuka endp ; --------------------------------------------------------------------------- db 0 include th05/formats/bb_playchar.asm ; =============== S U B R O U T I N E ======================================= sub_CE80 proc near push di mov bx, dx sar ax, 3 shl dx, 6 add ax, dx shr dx, 2 add ax, dx mov di, ax mov ax, GRAM_400 mov es, ax assume es:nothing cmp bx, 180h ja short loc_CEA4 mov cx, 10h xor bx, bx jmp short loc_CEAE ; --------------------------------------------------------------------------- loc_CEA4: mov cx, 190h sub cx, bx mov bx, 10h sub bx, cx loc_CEAE: stosw add di, ROW_SIZE - 2 loop loc_CEAE or bx, bx jz short loc_CEC0 sub di, 7D00h xchg cx, bx jmp short loc_CEAE ; --------------------------------------------------------------------------- loc_CEC0: pop di retn sub_CE80 endp ; =============== S U B R O U T I N E ======================================= sub_CEC2 proc near push di pushf cli GRCG_SETMODE_VIA_MOV al, GC_TDW mov dx, 7Eh ; '~' mov al, 0FFh out dx, al out dx, al out dx, al out dx, al popf mov ax, GRAM_400 + (PLAYFIELD_TOP * ROW_SIZE) shr 4 mov es, ax assume es:nothing mov di, (PLAYFIELD_H - 1) * ROW_SIZE + PLAYFIELD_VRAM_LEFT loc_CEDB: mov es:[di+(352 / 8)], eax stosd mov es:[di+(304 / 8)], ax stosw sub di, ROW_SIZE + 6 jge short loc_CEDB pop di GRCG_OFF_VIA_XOR al retn sub_CEC2 endp ; =============== S U B R O U T I N E ======================================= sub_CEF2 proc near push di pushf cli GRCG_SETMODE_VIA_MOV al, GC_TDW mov dx, 7Eh ; '~' mov al, 0FFh out dx, al not al out dx, al out dx, al out dx, al popf mov ax, GRAM_400 + (PLAYFIELD_TOP * ROW_SIZE) shr 4 mov es, ax mov di, (PLAYFIELD_H - 1) * ROW_SIZE + PLAYFIELD_VRAM_LEFT loc_CF0D: mov es:[di+(320 / 8)], eax mov es:[di+(352 / 8)], eax stosd stosd mov es:[di+(240 / 8)], ax stosw sub di, ROW_SIZE + 10 jge short loc_CF0D pop di GRCG_OFF_VIA_XOR al retn sub_CEF2 endp ; --------------------------------------------------------------------------- nop ; =============== S U B R O U T I N E ======================================= sub_CF2C proc near mov di, 0EB4h loc_CF2F: mov cx, 5 rep stosd mov es:[di], ax sub di, 64h ; 'd' jge short loc_CF2F mov di, 0ECEh loc_CF40: mov cx, 5 rep stosd mov es:[di], ax sub di, 64h ; 'd' jge short loc_CF40 retn sub_CF2C endp ; --------------------------------------------------------------------------- nop ; =============== S U B R O U T I N E ======================================= sub_CF50 proc near push di pushf cli GRCG_SETMODE_VIA_MOV al, GC_TDW mov dx, 7Eh ; '~' mov al, 0FFh out dx, al not al out dx, al out dx, al out dx, al popf mov ax, GRAM_400 + ((320 + PLAYFIELD_TOP) * ROW_SIZE) shr 4 mov es, ax assume es:nothing call sub_CF2C mov ax, GRAM_400 + (PLAYFIELD_TOP * ROW_SIZE) shr 4 mov es, ax assume es:nothing call sub_CF2C mov ax, GRAM_400 + ((48 + PLAYFIELD_TOP) * ROW_SIZE) shr 4 mov es, ax assume es:nothing mov di, (271 * ROW_SIZE) + PLAYFIELD_VRAM_LEFT loc_CF7B: mov es:[di], eax mov es:[di+(352 / 8)], eax sub di, ROW_SIZE jge short loc_CF7B pushf cli mov dx, 7Eh ; '~' mov al, 0FFh out dx, al out dx, al out dx, al out dx, al popf mov ax, GRAM_400 + ((320 + PLAYFIELD_TOP) * ROW_SIZE) shr 4 mov es, ax assume es:nothing mov di, (47 * ROW_SIZE) + (208 / 8) loc_CF9D: stosd sub di, ROW_SIZE + 4 jge short loc_CF9D mov ax, GRAM_400 + (PLAYFIELD_TOP * ROW_SIZE) shr 4 mov es, ax assume es:nothing mov di, (47 * ROW_SIZE) + (208 / 8) loc_CFAC: stosd sub di, ROW_SIZE + 4 jge short loc_CFAC pop di GRCG_OFF_VIA_XOR al retn sub_CF50 endp ; --------------------------------------------------------------------------- nop ; =============== S U B R O U T I N E ======================================= sub_CFBA proc near push di pushf cli GRCG_SETMODE_VIA_MOV al, GC_TDW mov dx, 7Eh ; '~' xor al, al out dx, al not al out dx, al out dx, al out dx, al popf mov ax, GRAM_400 + (PLAYFIELD_TOP * ROW_SIZE) shr 4 mov es, ax mov di, (PLAYFIELD_H - 1) * ROW_SIZE + PLAYFIELD_VRAM_LEFT loc_CFD5: mov es:[di+(320 / 8)], eax mov es:[di+(352 / 8)], eax stosd stosd sub di, ROW_SIZE + 8 jge short loc_CFD5 pop di GRCG_OFF_VIA_XOR al retn sub_CFBA endp ; =============== S U B R O U T I N E ======================================= sub_CFEE proc near cli GRCG_SETMODE_VIA_MOV al, GC_TDW mov dx, 7Eh ; '~' mov al, 0FFh out dx, al xor al, al out dx, al out dx, al out dx, al sti push di mov ax, GRAM_400 mov es, ax assume es:nothing mov ax, 1 out 0A6h, ax xor di, di mov cx, (PLANE_SIZE / 4) rep stosd xor ax, ax out 0A6h, ax mov cx, (PLANE_SIZE / 4) xor di, di rep stosd pop di GRCG_OFF_VIA_XOR al retn sub_CFEE endp include th04/hardware/grcg_fill_rows.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D032 proc near push bp mov bp, sp cmp _midboss_phase, PHASE_EXPLODE_BIG jnb short loc_D04F mov _tile_invalidate_box.x, 64 mov _tile_invalidate_box.y, 64 pushd [_midboss_pos.prev] jmp short loc_D060 ; --------------------------------------------------------------------------- loc_D04F: mov _tile_invalidate_box.x, 128 mov _tile_invalidate_box.y, 128 pushd [_midboss_pos.cur] loc_D060: call tiles_invalidate_around pop bp retn sub_D032 endp include th04/main/boss/backdrop.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public SARA_BG_RENDER sara_bg_render proc near push bp mov bp, sp cmp _boss_phase, 0 jnz short loc_D09F cmp _boss_phase_frame, 2 jg short loc_D0EF jmp short loc_D0EA ; --------------------------------------------------------------------------- loc_D09F: cmp _boss_phase, 1 jnz short loc_D0C8 call boss_backdrop_render pascal, (64 shl 16) or 16, 0 mov ax, _bb_stage_seg mov word_2449C, ax mov ax, _boss_phase_frame cwd sub ax, dx sar ax, 1 push ax call sub_DFBA call tiles_redraw_invalidated pop bp retn ; --------------------------------------------------------------------------- loc_D0C8: cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnb short loc_D0DC call boss_backdrop_render pascal, (64 shl 16) or 16, 0 pop bp retn ; --------------------------------------------------------------------------- loc_D0DC: cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jz short loc_D0EA cmp _boss_phase_frame, 2 jg short loc_D0EF loc_D0EA: call tiles_render_all pop bp retn ; --------------------------------------------------------------------------- loc_D0EF: call sub_BEE6 pop bp retn sara_bg_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public LOUISE_BG_RENDER louise_bg_render proc near push bp mov bp, sp push si cmp _boss_phase, 0 jnz short loc_D108 cmp _boss_phase_frame, 2 jg short loc_D17A jmp short loc_D175 ; --------------------------------------------------------------------------- loc_D108: cmp _boss_phase, 1 jnz short loc_D153 mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx mov si, ax cmp si, 8 jge short loc_D124 call tiles_render_all jmp short loc_D142 ; --------------------------------------------------------------------------- loc_D124: call grcg_setmode_tdw mov ah, GC_RGI call _grcg_setcolor_direct_seg1_raw call playfield_fillm_0_0_384_192__1 GRCG_OFF_CLOBBERING dx push (32 shl 16) or 16 push 16 call cdg_put_noalpha loc_D142: mov byte_24498, 0 mov ax, _bb_stage_seg mov word_2449C, ax push si call sub_DF36 jmp short loc_D17D ; --------------------------------------------------------------------------- loc_D153: cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnb short loc_D167 call boss_backdrop_render pascal, (32 shl 16) or 16, 1 jmp short loc_D17D ; --------------------------------------------------------------------------- loc_D167: cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jz short loc_D175 cmp _boss_phase_frame, 2 jg short loc_D17A loc_D175: call tiles_render_all jmp short loc_D17D ; --------------------------------------------------------------------------- loc_D17A: call sub_BEE6 loc_D17D: pop si pop bp retn louise_bg_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public ALICE_BG_RENDER alice_bg_render proc near push bp mov bp, sp push si cmp _boss_phase, 0 jnz short loc_D194 cmp _boss_phase_frame, 2 jg short loc_D206 jmp short loc_D201 ; --------------------------------------------------------------------------- loc_D194: cmp _boss_phase, 1 jnz short loc_D1DF mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx mov si, ax cmp si, 8 jge short loc_D1B0 call tiles_render_all jmp short loc_D1CE ; --------------------------------------------------------------------------- loc_D1B0: call grcg_setmode_tdw mov ah, GC_RGI call _grcg_setcolor_direct_seg1_raw call playfield_fillm_0_205_384_163 GRCG_OFF_CLOBBERING dx push (32 shl 16) or 221 push 16 call cdg_put_noalpha loc_D1CE: mov byte_24498, 0Fh mov ax, _bb_stage_seg mov word_2449C, ax push si call sub_DF36 jmp short loc_D209 ; --------------------------------------------------------------------------- loc_D1DF: cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnb short loc_D1F3 call boss_backdrop_render pascal, (32 shl 16) or 221, 1 jmp short loc_D209 ; --------------------------------------------------------------------------- loc_D1F3: cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jz short loc_D201 cmp _boss_phase_frame, 2 jg short loc_D206 loc_D201: call tiles_render_all jmp short loc_D209 ; --------------------------------------------------------------------------- loc_D206: call sub_BEE6 loc_D209: pop si pop bp retn alice_bg_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MAI_YUKI_BG_RENDER mai_yuki_bg_render proc near var_1 = byte ptr -1 enter 2, 0 cmp _boss_phase, 0 jnz short loc_D220 cmp _boss_phase_frame, 2 jg short loc_D299 jmp short loc_D294 ; --------------------------------------------------------------------------- loc_D220: cmp _boss_phase, 1 jnz short loc_D272 mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx mov [bp+var_1], al cmp [bp+var_1], 8 jnb short loc_D23E call tiles_render_all jmp short loc_D25C ; --------------------------------------------------------------------------- loc_D23E: call grcg_setmode_tdw mov ah, GC_RGI call _grcg_setcolor_direct_seg1_raw call playfield_fillm_64_56_256_256 GRCG_OFF_CLOBBERING dx push (96 shl 16) or 72 push 16 call cdg_put_noalpha loc_D25C: mov byte_24498, 9 mov ax, _bb_stage_seg mov word_2449C, ax mov al, [bp+var_1] mov ah, 0 push ax call sub_DF36 leave retn ; --------------------------------------------------------------------------- loc_D272: cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnb short loc_D286 call boss_backdrop_render pascal, (96 shl 16) or 72, 1 leave retn ; --------------------------------------------------------------------------- loc_D286: cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jz short loc_D294 cmp _boss_phase_frame, 2 jg short loc_D299 loc_D294: call tiles_render_all leave retn ; --------------------------------------------------------------------------- loc_D299: call sub_BEE6 leave retn mai_yuki_bg_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public YUMEKO_BG_RENDER yumeko_bg_render proc near var_1 = byte ptr -1 enter 2, 0 cmp _boss_phase, 0 jz short loc_D31D cmp _boss_phase, 1 jnz short loc_D2FB mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx mov [bp+var_1], al cmp [bp+var_1], 8 jnb short loc_D2C7 call tiles_render_all jmp short loc_D2E5 ; --------------------------------------------------------------------------- loc_D2C7: call grcg_setmode_tdw mov ah, GC_RGI call _grcg_setcolor_direct_seg1_raw call playfield_fillm_0_0_384_192__2 GRCG_OFF_CLOBBERING dx push (32 shl 16) or 16 push 16 call cdg_put_noalpha loc_D2E5: mov byte_24498, 0Fh mov ax, _bb_stage_seg mov word_2449C, ax mov al, [bp+var_1] mov ah, 0 push ax call sub_DF36 leave retn ; --------------------------------------------------------------------------- loc_D2FB: cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnb short loc_D30F call boss_backdrop_render pascal, (32 shl 16) or 16, 1 leave retn ; --------------------------------------------------------------------------- loc_D30F: cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jz short loc_D31D cmp _boss_phase_frame, 2 jg short loc_D322 loc_D31D: call tiles_render_all leave retn ; --------------------------------------------------------------------------- loc_D322: call sub_BEE6 leave retn yumeko_bg_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D327 proc near @@i = word ptr -4 @@left = word ptr -2 enter 4, 0 push si push di mov ax, GRAM_400 mov es, ax mov si, offset _boss_particles mov [bp+@@i], 0 jmp short loc_D3BA ; --------------------------------------------------------------------------- loc_D33C: cmp [si+boss_particle_t.BP_pos.x], SUBPIXEL_NONE jz short loc_D3B4 mov ax, [si+boss_particle_t.BP_velocity.x] add [si+boss_particle_t.BP_pos.x], ax mov ax, [si+boss_particle_t.BP_velocity.y] add [si+boss_particle_t.BP_pos.y], ax cmp [si+boss_particle_t.BP_patnum], 0 jnz short loc_D36C mov ax, [si+boss_particle_t.BP_age] mov bx, 8 cwd idiv bx mov di, ax cmp di, PARTICLE_CELS jl short loc_D366 mov di, (PARTICLE_CELS - 1) loc_D366: add di, PAT_PARTICLE jmp short loc_D373 ; --------------------------------------------------------------------------- loc_D36C: mov al, [si+boss_particle_t.BP_patnum] mov ah, 0 mov di, ax loc_D373: mov ax, [si+boss_particle_t.BP_pos.x] sar ax, 4 add ax, (PLAYFIELD_LEFT - (PARTICLE_W / 2)) mov [bp+@@left], ax mov ax, [si+boss_particle_t.BP_pos.y] sar ax, 4 add ax, (PLAYFIELD_TOP - (PARTICLE_H / 2)) mov cx, [bp+@@left] cmp cx, (PLAYFIELD_LEFT - PARTICLE_W) jle short loc_D39F cmp cx, PLAYFIELD_RIGHT jge short loc_D39F cmp ax, (PLAYFIELD_TOP - PARTICLE_H) jle short loc_D39F cmp ax, PLAYFIELD_BOTTOM jl short loc_D3AD loc_D39F: mov eax, dword ptr [si+boss_particle_t.BP_origin] mov dword ptr [si+boss_particle_t.BP_pos], eax mov [si+boss_particle_t.BP_age], 0 jmp short loc_D3B4 ; --------------------------------------------------------------------------- loc_D3AD: call z_super_roll_put_16x16_mono_raw pascal, di inc [si+boss_particle_t.BP_age] loc_D3B4: inc [bp+@@i] add si, size boss_particle_t loc_D3BA: cmp [bp+@@i], BOSS_PARTICLE_COUNT jl loc_D33C pop di pop si leave retn sub_D327 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D3C6 proc near @@set = word ptr -6 @@line_i = word ptr -4 @@angle = word ptr -2 enter 6, 0 push si push di cmp word_21D6E, 0FFh jnz loc_D456 mov [bp+@@set], offset _linesets xor di, di mov [bp+@@angle], 40h jmp short loc_D433 ; --------------------------------------------------------------------------- loc_D3E4: mov [bp+@@line_i], 0 jmp short loc_D422 ; --------------------------------------------------------------------------- loc_D3EB: mov bx, [bp+@@line_i] shl bx, 2 add bx, [bp+@@set] mov [bx+lineset_t.LS_center.x], ((PLAYFIELD_W / 2) shl 4) mov bx, [bp+@@line_i] shl bx, 2 add bx, [bp+@@set] mov [bx+lineset_t.LS_center.y], ((PLAYFIELD_H / 2) shl 4) mov bx, [bp+@@line_i] add bx, bx add bx, [bp+@@set] mov [bx+lineset_t.LS_radius], (1 shl 4) mov bx, [bp+@@set] add bx, [bp+@@line_i] mov al, byte ptr [bp+@@angle] mov [bx+lineset_t.LS_angle], al inc [bp+@@line_i] loc_D422: cmp [bp+@@line_i], LINESET_LINE_COUNT jl short loc_D3EB inc di add [bp+@@set], size lineset_t sub [bp+@@angle], 80h loc_D433: cmp di, 2 jl short loc_D3E4 mov si, offset _boss_particles xor di, di jmp short loc_D44B ; --------------------------------------------------------------------------- loc_D43F: mov [si+boss_particle_t.BP_pos.x], SUBPIXEL_NONE mov [si+boss_particle_t.BP_patnum], 0 inc di add si, size boss_particle_t loc_D44B: cmp di, BOSS_PARTICLE_COUNT jl short loc_D43F mov word_21D6E, 0 loc_D456: cmp word_21D6E, 40h jge short loc_D4BE mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_D46F mov ax, 1 jmp short loc_D471 ; --------------------------------------------------------------------------- loc_D46F: xor ax, ax loc_D471: cmp ax, 1 jnz short loc_D4BE mov ax, word_21D6E shl ax, 4 add ax, offset _boss_particles mov si, ax mov [si+boss_particle_t.BP_pos.x], ((PLAYFIELD_W / 2) shl 4) mov [si+boss_particle_t.BP_pos.y], ((PLAYFIELD_H / 2) shl 4) mov [si+boss_particle_t.BP_origin.x], ((PLAYFIELD_W / 2) shl 4) mov [si+boss_particle_t.BP_origin.y], ((PLAYFIELD_H / 2) shl 4) call randring1_next16 mov [si+boss_particle_t.BP_angle], al mov [si+boss_particle_t.BP_age], 0 lea ax, [si+boss_particle_t.BP_velocity] push ax pushd (0 shl 16) or 0 call randring1_next16_and pascal, 3Fh add ax, (2 shl 4) push ax mov al, [si+boss_particle_t.BP_angle] mov ah, 0 push ax call vector2_at inc word_21D6E loc_D4BE: cmp _boss_phase, 3 jnz short loc_D4F4 mov al, byte_21D6C mov ah, 0 mov bx, 4 cwd idiv bx cmp dx, 2 jge short loc_D4E4 mov al, lineset0.LS_angle add al, 2 mov lineset0.LS_angle, al mov al, lineset1.LS_angle add al, 2 jmp short loc_D4F1 ; --------------------------------------------------------------------------- loc_D4E4: mov al, lineset0.LS_angle add al, -2 mov lineset0.LS_angle, al mov al, lineset1.LS_angle add al, -2 loc_D4F1: mov lineset1.LS_angle, al loc_D4F4: pop di pop si leave retn sub_D3C6 endp GRCG_LINESET_LINE_PUT procdesc pascal near \ set:near ptr, i:word LINESET_FORWARD_COPY procdesc pascal near \ set:near ptr main__TEXT ends main_0_TEXT segment word public 'CODE' use16 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D5E2 proc near push bp mov bp, sp push si push di call sub_D3C6 mov si, offset _linesets xor di, di jmp short loc_D630 ; --------------------------------------------------------------------------- loc_D5F1: call lineset_forward_copy pascal, si add [si+lineset_t.LS_radius], (4 shl 4) push si push ((192 shl 4) shl 16) or (184 shl 4) mov ax, [si+lineset_t.LS_radius] imul ax, 3 mov bx, 4 cwd idiv bx push ax mov al, [si+lineset_t.LS_angle] mov ah, 0 add ax, -64 push ax call vector2_at cmp [si+lineset_t.LS_radius], (224 shl 4) jl short loc_D62B inc byte_21D6C mov [si+lineset_t.LS_radius], 0 loc_D62B: inc di add si, size lineset_t loc_D630: cmp di, 2 jl short loc_D5F1 call _grcg_setmode_rmw_seg1 mov ah, GC_BRG call _grcg_setcolor_direct_seg1_raw call sub_D327 call grcg_lineset_line_put pascal, offset lineset0, 18 call grcg_lineset_line_put pascal, offset lineset0, 12 call grcg_lineset_line_put pascal, offset lineset1, 18 call grcg_lineset_line_put pascal, offset lineset1, 12 mov ah, GC_RG call _grcg_setcolor_direct_seg1_raw call grcg_lineset_line_put pascal, offset lineset0, 6 call grcg_lineset_line_put pascal, offset lineset1, 6 mov ah, 0Fh call _grcg_setcolor_direct_seg1_raw call grcg_lineset_line_put pascal, offset lineset0, 0 call grcg_lineset_line_put pascal, offset lineset1, 0 GRCG_OFF_CLOBBERING dx pop di pop si pop bp retn sub_D5E2 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D694 proc near @@set = word ptr -6 @@line_i = word ptr -4 @@center_x = word ptr -2 enter 6, 0 push si push di cmp byte_21D70, 0 jnz loc_D751 mov [bp+@@center_x], (64 shl 4) mov [bp+@@set], offset _linesets xor di, di jmp short loc_D707 ; --------------------------------------------------------------------------- loc_D6B1: mov [bp+@@line_i], (LINESET_LINE_COUNT - 2) jmp short loc_D6EE ; --------------------------------------------------------------------------- loc_D6B8: mov bx, [bp+@@line_i] shl bx, 2 add bx, [bp+@@set] mov ax, [bp+@@center_x] mov [bx+lineset_t.LS_center.x], ax mov bx, [bp+@@line_i] shl bx, 2 add bx, [bp+@@set] mov [bx+lineset_t.LS_center.y], (216 shl 4) mov bx, [bp+@@line_i] add bx, bx add bx, [bp+@@set] mov word ptr [bx+lineset_t.LS_radius], (256 shl 4) mov bx, [bp+@@set] add bx, [bp+@@line_i] mov byte ptr [bx+lineset_t.LS_angle], 40h dec [bp+@@line_i] loc_D6EE: cmp [bp+@@line_i], 0 jge short loc_D6B8 mov bx, [bp+@@set] mov word ptr [bx+lineset_t.LS_velocity_y], 0 inc di add [bp+@@set], size lineset_t add [bp+@@center_x], (256 shl 4) loc_D707: cmp di, 2 jl short loc_D6B1 mov si, offset _boss_particles xor di, di jmp short loc_D746 ; --------------------------------------------------------------------------- loc_D713: call randring1_next16_mod pascal, (PLAYFIELD_W shl 4) mov [si+boss_particle_t.BP_pos.x], ax call randring1_next16_mod pascal, (PLAYFIELD_W shl 4) ; Huh? mov [si+boss_particle_t.BP_pos.y], ax mov ax, [si+boss_particle_t.BP_pos.x] mov [si+boss_particle_t.BP_origin.x], ax mov [si+boss_particle_t.BP_origin.y], (-1 shl 4) mov [si+boss_particle_t.BP_velocity.x], 0 mov [si+boss_particle_t.BP_velocity.y], 0 call randring1_next16_and pascal, 3 add al, PAT_PARTICLE mov [si+boss_particle_t.BP_patnum], al inc di add si, size boss_particle_t loc_D746: cmp di, BOSS_PARTICLE_COUNT jl short loc_D713 inc byte_21D70 jmp short loc_D770 ; --------------------------------------------------------------------------- loc_D751: mov si, offset _boss_particles xor di, di jmp short loc_D76B ; --------------------------------------------------------------------------- loc_D758: cmp [si+boss_particle_t.BP_velocity.y], (10 shl 4) jge short loc_D767 mov al, _stage_frame_mod2 mov ah, 0 add [si+boss_particle_t.BP_velocity.y], ax loc_D767: inc di add si, size boss_particle_t loc_D76B: cmp di, BOSS_PARTICLE_COUNT jl short loc_D758 loc_D770: pop di pop si leave retn sub_D694 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D774 proc near var_4 = word ptr -4 var_2 = word ptr -2 enter 4, 0 push si push di call sub_D694 mov [bp+var_2], 4 mov si, offset _linesets xor di, di jmp short loc_D7E8 ; --------------------------------------------------------------------------- loc_D789: call lineset_forward_copy pascal, si mov ax, [si+lineset_t.LS_velocity_y] add [si+lineset_t.LS_center.y], ax cmp [si+lineset_t.LS_velocity_y], (-14 shl 4) jle short loc_D7AB cmp _stage_frame_mod4, 0 jnz short loc_D7A6 mov ax, 1 jmp short loc_D7A8 ; --------------------------------------------------------------------------- loc_D7A6: xor ax, ax loc_D7A8: sub [si+lineset_t.LS_velocity_y], ax loc_D7AB: cmp [si+lineset_t.LS_radius], (96 shl 4) jle short loc_D7B6 sub [si+lineset_t.LS_radius], 2 loc_D7B6: mov ax, word_21D72 and ax, 1FFh cmp ax, 100h jnb short loc_D7C8 mov ax, [bp+var_2] add [si+lineset_t.LS_center.x], ax jmp short loc_D7CD ; --------------------------------------------------------------------------- loc_D7C8: mov ax, [bp+var_2] sub [si+lineset_t.LS_center.x], ax loc_D7CD: mov ax, [bp+var_2] cwd sub ax, dx sar ax, 1 add al, [si+lineset_t.LS_angle] mov [si+lineset_t.LS_angle], al inc di add si, size lineset_t mov ax, [bp+var_2] neg ax mov [bp+var_2], ax loc_D7E8: cmp di, 2 jl short loc_D789 inc word_21D72 mov si, offset _linesets cmp [si+lineset_t.LS_center.y], (80 shl 4) jge short loc_D82E mov ax, (80 shl 4) sub ax, [si+lineset_t.LS_center.y] mov [bp+var_2], ax xor di, di jmp short loc_D829 ; --------------------------------------------------------------------------- loc_D808: mov [bp+var_4], (LINESET_LINE_COUNT - 2) jmp short loc_D81E ; --------------------------------------------------------------------------- loc_D80F: mov bx, [bp+var_4] shl bx, 2 mov ax, [bp+var_2] add [bx+si+lineset_t.LS_center.y], ax dec [bp+var_4] loc_D81E: cmp [bp+var_4], 0 jge short loc_D80F inc di add si, size lineset_t loc_D829: cmp di, 2 jl short loc_D808 loc_D82E: call _grcg_setmode_rmw_seg1 mov ah, GC_BRG call _grcg_setcolor_direct_seg1_raw call sub_D327 call grcg_lineset_line_put pascal, offset lineset0, 18 call grcg_lineset_line_put pascal, offset lineset0, 12 call grcg_lineset_line_put pascal, offset lineset1, 18 call grcg_lineset_line_put pascal, offset lineset1, 12 mov ah, GC_RG call _grcg_setcolor_direct_seg1_raw call grcg_lineset_line_put pascal, offset lineset0, 6 call grcg_lineset_line_put pascal, offset lineset1, 6 mov ah, 0Fh call _grcg_setcolor_direct_seg1_raw call grcg_lineset_line_put pascal, offset lineset0, 0 call grcg_lineset_line_put pascal, offset lineset1, 0 GRCG_OFF_CLOBBERING dx pop di pop si leave retn sub_D774 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D88D proc near push bp mov bp, sp push si cmp byte_21D74, 0 jnz short loc_D8B7 mov si, offset _boss_particles cmp [si+boss_particle_t.BP_velocity.y], 0 jge short loc_D8B7 xor dx, dx jmp short loc_D8AE ; --------------------------------------------------------------------------- loc_D8A5: mov [si+boss_particle_t.BP_origin.y], ((PLAYFIELD_H + 1) shl 4) inc dx add si, size boss_particle_t loc_D8AE: cmp dx, BOSS_PARTICLE_COUNT jl short loc_D8A5 inc byte_21D74 loc_D8B7: mov si, offset _boss_particles xor dx, dx jmp short loc_D8D1 ; --------------------------------------------------------------------------- loc_D8BE: cmp [si+boss_particle_t.BP_velocity.y], (-10 shl 4) jle short loc_D8CD mov al, _stage_frame_mod2 mov ah, 0 sub [si+boss_particle_t.BP_velocity.y], ax loc_D8CD: inc dx add si, size boss_particle_t loc_D8D1: cmp dx, BOSS_PARTICLE_COUNT jl short loc_D8BE pop si pop bp retn sub_D88D endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D8D9 proc near @@line_i = word ptr -4 var_2 = word ptr -2 enter 4, 0 push si push di call sub_D88D mov [bp+var_2], 4 mov si, offset _linesets xor di, di jmp short loc_D944 ; --------------------------------------------------------------------------- loc_D8EE: call lineset_forward_copy pascal, si mov ax, [si+lineset_t.LS_velocity_y] add [si+lineset_t.LS_center.y], ax cmp [si+lineset_t.LS_velocity_y], (14 shl 4) jge short loc_D907 mov al, _stage_frame_mod2 mov ah, 0 add [si+lineset_t.LS_velocity_y], ax loc_D907: cmp [si+lineset_t.LS_radius], (96 shl 4) jle short loc_D912 sub [si+lineset_t.LS_radius], 2 loc_D912: mov ax, word_21D72 and ax, 1FFh cmp ax, 100h jnb short loc_D924 mov ax, [bp+var_2] add [si+lineset_t.LS_center.x], ax jmp short loc_D929 ; --------------------------------------------------------------------------- loc_D924: mov ax, [bp+var_2] sub [si+lineset_t.LS_center.x], ax loc_D929: mov ax, [bp+var_2] cwd sub ax, dx sar ax, 1 add al, [si+lineset_t.LS_angle] mov [si+lineset_t.LS_angle], al inc di add si, size lineset_t mov ax, [bp+var_2] neg ax mov [bp+var_2], ax loc_D944: cmp di, 2 jl short loc_D8EE inc word_21D72 mov si, offset _linesets cmp [si+lineset_t.LS_center.y], (80 shl 4) jge short loc_D98C mov ax, (80 shl 4) sub ax, [si+lineset_t.LS_center.y] mov [bp+var_2], ax xor di, di jmp short loc_D985 ; --------------------------------------------------------------------------- loc_D964: mov [bp+@@line_i], (LINESET_LINE_COUNT - 2) jmp short loc_D97A ; --------------------------------------------------------------------------- loc_D96B: mov bx, [bp+@@line_i] shl bx, 2 mov ax, [bp+var_2] add [bx+si+lineset_t.LS_center.y], ax dec [bp+@@line_i] loc_D97A: cmp [bp+@@line_i], 0 jge short loc_D96B inc di add si, size lineset_t loc_D985: cmp di, 2 jl short loc_D964 jmp short loc_D9C6 ; --------------------------------------------------------------------------- loc_D98C: cmp [si+lineset_t.LS_center.y], (304 shl 4) jle short loc_D9C6 mov ax, [si+lineset_t.LS_center.y] add ax, (-304 shl 4) mov [bp+var_2], ax xor di, di jmp short loc_D9C1 ; --------------------------------------------------------------------------- loc_D9A0: mov [bp+@@line_i], (LINESET_LINE_COUNT - 2) jmp short loc_D9B6 ; --------------------------------------------------------------------------- loc_D9A7: mov bx, [bp+@@line_i] shl bx, 2 mov ax, [bp+var_2] sub [bx+si+lineset_t.LS_center.y], ax dec [bp+@@line_i] loc_D9B6: cmp [bp+@@line_i], 0 jge short loc_D9A7 inc di add si, size lineset_t loc_D9C1: cmp di, 2 jl short loc_D9A0 loc_D9C6: call _grcg_setmode_rmw_seg1 mov ah, GC_BRG call _grcg_setcolor_direct_seg1_raw call sub_D327 call grcg_lineset_line_put pascal, offset lineset0, 18 call grcg_lineset_line_put pascal, offset lineset0, 12 call grcg_lineset_line_put pascal, offset lineset1, 18 call grcg_lineset_line_put pascal, offset lineset1, 12 mov ah, GC_RG call _grcg_setcolor_direct_seg1_raw call grcg_lineset_line_put pascal, offset lineset0, 6 call grcg_lineset_line_put pascal, offset lineset1, 6 mov ah, 0Fh call _grcg_setcolor_direct_seg1_raw call grcg_lineset_line_put pascal, offset lineset0, 0 call grcg_lineset_line_put pascal, offset lineset1, 0 GRCG_OFF_CLOBBERING dx pop di pop si leave retn sub_D8D9 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_DA25 proc near @@cel = word ptr -2 enter 2, 0 push si cmp byte_21D75, 0 jnz short loc_DA4F mov si, offset _boss_particles xor cx, cx jmp short loc_DA46 ; --------------------------------------------------------------------------- loc_DA38: mov [si+boss_particle_t.BP_origin.y], (240 shl 4) mov [si+boss_particle_t.BP_velocity.y], (-1 shl 4) inc cx add si, size boss_particle_t loc_DA46: cmp cx, BOSS_PARTICLE_COUNT jl short loc_DA38 inc byte_21D75 loc_DA4F: mov si, offset _boss_particles xor cx, cx jmp short loc_DA7E ; --------------------------------------------------------------------------- loc_DA56: mov ax, [si+boss_particle_t.BP_pos.y] mov bx, (64 shl 4) cwd idiv bx mov dx, (PARTICLE_CELS - 1) sub dx, ax mov [bp+@@cel], dx cmp [bp+@@cel], 0 jge short loc_DA72 mov [bp+@@cel], 0 loc_DA72: mov al, byte ptr [bp+@@cel] add al, PAT_PARTICLE mov [si+boss_particle_t.BP_patnum], al inc cx add si, size boss_particle_t loc_DA7E: cmp cx, BOSS_PARTICLE_COUNT jl short loc_DA56 pop si leave retn sub_DA25 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public SHINKI_BG_RENDER shinki_bg_render proc near var_1 = byte ptr -1 enter 2, 0 cmp _boss_phase, 0 jnz short loc_DA9E call boss_backdrop_render pascal, (32 shl 16) or 120, 1 leave retn ; --------------------------------------------------------------------------- loc_DA9E: cmp _boss_phase, 1 jnz short loc_DADD mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx mov [bp+var_1], al cmp [bp+var_1], 8 jnb short loc_DAC4 call boss_backdrop_render pascal, (32 shl 16) or 120, 1 jmp short loc_DAC7 ; --------------------------------------------------------------------------- loc_DAC4: call sub_E92E loc_DAC7: mov byte_24498, 0Fh mov ax, _bb_stage_seg mov word_2449C, ax mov al, [bp+var_1] mov ah, 0 push ax call sub_DF36 leave retn ; --------------------------------------------------------------------------- loc_DADD: cmp _boss_phase, 4 jnb short loc_DAEC call sub_E92E call sub_D5E2 leave retn ; --------------------------------------------------------------------------- loc_DAEC: cmp _boss_phase, 8 jnb short loc_DAFB call sub_E92E call sub_D774 leave retn ; --------------------------------------------------------------------------- loc_DAFB: cmp _boss_phase, 0Ch jnb short loc_DB0A call sub_E92E call sub_D8D9 leave retn ; --------------------------------------------------------------------------- loc_DB0A: push (32 shl 16) or 256 push 17 call cdg_put_noalpha call sub_E950 call sub_DA25 call grcg_setcolor pascal, (GC_RMW shl 16) + 6 call sub_D327 GRCG_OFF_CLOBBERING dx leave retn shinki_bg_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_DB33 proc near var_2 = word ptr -2 arg_0 = word ptr 4 arg_2 = word ptr 6 enter 2, 0 push si push di mov di, [bp+arg_2] mov si, [bp+arg_0] push (224 shl 16) or 200 mov ax, di sar ax, 4 push ax call grcg_circle mov [bp+var_2], 0 jmp loc_DBF1 ; --------------------------------------------------------------------------- loc_DB58: call vector2_at pascal, offset _drawpoint, ((224 shl 4) shl 16) or (200 shl 4), di, si push offset point_24490 push ((224 shl 4) shl 16) or (200 shl 4) push di lea ax, [si+85] push ax call vector2_at push offset point_24494 push ((224 shl 4) shl 16) or (200 shl 4) push di lea ax, [si-85] push ax call vector2_at sar _drawpoint.x, 4 sar _drawpoint.y, 4 sar point_24490.x, 4 sar point_24490.y, 4 sar point_24494.x, 4 sar point_24494.y, 4 call grcg_line pascal, _drawpoint.x, _drawpoint.y, point_24490.x, point_24490.y call grcg_line pascal, point_24490.x, point_24490.y, point_24494.x, point_24494.y call grcg_line pascal, _drawpoint.x, _drawpoint.y, point_24494.x, point_24494.y inc [bp+var_2] add si, 2Ah ; '*' loc_DBF1: cmp [bp+var_2], 2 jl loc_DB58 pop di pop si leave retn 4 sub_DB33 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_DBFF proc near push bp mov bp, sp push si push di mov si, offset _linesets cmp byte_21D76, 0 jnz short loc_DC2C xor di, di jmp short loc_DC22 ; --------------------------------------------------------------------------- loc_DC12: mov bx, di add bx, bx mov [bx+si+lineset_t.LS_radius], (1 shl 4) mov bx, di mov byte ptr [bx+si+lineset_t.LS_angle], 0 inc di loc_DC22: cmp di, (LINESET_LINE_COUNT - 1) jl short loc_DC12 mov byte_21D76, 1 loc_DC2C: mov di, (LINESET_LINE_COUNT - 2) jmp short loc_DC49 ; --------------------------------------------------------------------------- loc_DC31: lea bx, [di-1] add bx, bx mov ax, [bx+si+lineset_t.LS_radius] mov bx, di add bx, bx mov [bx+si+lineset_t.LS_radius], ax mov bx, di mov al, [bx+si+(lineset_t.LS_angle - 1)] mov [bx+si+(lineset_t.LS_angle - 0)], al dec di loc_DC49: or di, di jg short loc_DC31 add [si+lineset_t.LS_radius], (5 shl 4) cmp [si+lineset_t.LS_radius], (320 shl 4) jl short loc_DC66 mov [si+lineset_t.LS_radius], (1 shl 4) mov al, 3 sub al, byte_21D76 mov byte_21D76, al loc_DC66: cmp byte_21D76, 1 jnz short loc_DC74 mov al, [si+lineset_t.LS_angle] inc al jmp short loc_DC79 ; --------------------------------------------------------------------------- loc_DC74: mov al, [si+lineset_t.LS_angle] add al, -1 loc_DC79: mov [si+lineset_t.LS_angle], al call grcg_setcolor pascal, (GC_RMW shl 16) + 8 push [si+lineset_t.LS_radius[18 * word]] mov al, [si+lineset_t.LS_angle[18 * byte]] mov ah, 0 push ax call sub_DB33 call grcg_setcolor pascal, (GC_RMW shl 16) + 9 push [si+lineset_t.LS_radius[9 * word]] mov al, [si+lineset_t.LS_angle[9 * byte]] mov ah, 0 push ax call sub_DB33 cmp _boss_phase, 9 jb short loc_DCBA cmp _boss_phase, 0Ch jbe short loc_DCC5 loc_DCBA: call grcg_setcolor pascal, (GC_RMW shl 16) + 15 loc_DCC5: push [si+lineset_t.LS_radius] mov al, [si+lineset_t.LS_angle] mov ah, 0 push ax call sub_DB33 GRCG_OFF_CLOBBERING dx pop di pop si pop bp retn sub_DBFF endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public EXALICE_BG_RENDER exalice_bg_render proc near var_1 = byte ptr -1 enter 2, 0 cmp _boss_phase, 0 jnz short loc_DCEF cmp _boss_phase_frame, 2 jg short loc_DD3D jmp short loc_DD38 ; --------------------------------------------------------------------------- loc_DCEF: cmp _boss_phase, 1 jnz short loc_DD1B mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx mov [bp+var_1], al call sub_E92E mov byte_24498, 0Fh mov ax, _bb_stage_seg mov word_2449C, ax mov al, [bp+var_1] mov ah, 0 push ax call sub_DF36 leave retn ; --------------------------------------------------------------------------- loc_DD1B: cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnb short loc_DD2A call sub_E92E call sub_DBFF leave retn ; --------------------------------------------------------------------------- loc_DD2A: cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jz short loc_DD38 cmp _boss_phase_frame, 2 jg short loc_DD3D loc_DD38: call tiles_render_all leave retn ; --------------------------------------------------------------------------- loc_DD3D: call sub_BEE6 leave retn exalice_bg_render endp ; =============== S U B R O U T I N E ======================================= public PLAYFIELD_FILLM_32_0_320_192 playfield_fillm_32_0_320_192 proc near push di cli mov dx, 7Eh ; '~' xor al, al out dx, al out dx, al out dx, al out dx, al sti GRCG_FILL_PLAYFIELD_ROWS 192, 176, dx mov ax, GRAM_400 + (PLAYFIELD_TOP * ROW_SIZE) shr 4 mov es, ax assume es:nothing mov di, (191 * ROW_SIZE) + PLAYFIELD_VRAM_LEFT loc_DD61: mov es:[di], eax mov es:[di+(352 / 8)], eax sub di, ROW_SIZE jge short loc_DD61 pop di retn playfield_fillm_32_0_320_192 endp ; --------------------------------------------------------------------------- nop ; =============== S U B R O U T I N E ======================================= sub_DD72 proc near push si push di mov cx, ax sar ax, 3 mov di, ax and cl, 7 xor ah, ah mov al, [bx+1398h] ror ax, cl mov bx, dx shl dx, 6 add di, dx shr dx, 2 add di, dx mov dx, GRAM_400 mov es, dx assume es:nothing shr si, 4 mov cx, si add cx, bx cmp cx, 190h ja short loc_DDAA mov cx, si xor dx, dx jmp short loc_DDB3 ; --------------------------------------------------------------------------- loc_DDAA: mov cx, 190h sub cx, bx mov dx, si sub dx, cx loc_DDB3: or ah, ah jz short loc_DDC0 nop loc_DDB8: stosw add di, ROW_SIZE - 2 loop loc_DDB8 jmp short loc_DDC6 ; --------------------------------------------------------------------------- loc_DDC0: stosb add di, ROW_SIZE - 1 loop loc_DDC0 loc_DDC6: or dx, dx jz short loc_DDD2 sub di, 7D00h xchg cx, dx jmp short loc_DDB3 ; --------------------------------------------------------------------------- loc_DDD2: pop di pop si retn sub_DD72 endp ; --------------------------------------------------------------------------- nop ; =============== S U B R O U T I N E ======================================= include th05/formats/bb_curvebullet.asm ; =============== S U B R O U T I N E ======================================= public PLAYFIELD_FILLM_0_0_384_192__1 playfield_fillm_0_0_384_192__1 proc near push di GRCG_FILL_PLAYFIELD_ROWS 192, 176 pop di retn playfield_fillm_0_0_384_192__1 endp ; =============== S U B R O U T I N E ======================================= public PLAYFIELD_FILLM_0_205_384_163 playfield_fillm_0_205_384_163 proc near push di GRCG_FILL_PLAYFIELD_ROWS 0, 205 pop di retn playfield_fillm_0_205_384_163 endp include th04/hardware/fillm64-56_256-256.asm include th05/formats/bb_load.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_DF36 proc near var_6 = word ptr -6 var_4 = word ptr -4 var_2 = byte ptr -2 var_1 = byte ptr -1 arg_0 = word ptr 4 enter 6, 0 push di push GC_TDW mov al, byte_24498 mov ah, 0 push ax call grcg_setcolor mov ax, word_2449C mov fs, ax mov di, [bp+arg_0] shl di, 7 mov [bp+var_6], 10h loc_DF59: mov [bp+var_4], 20h ; ' ' mov [bp+var_2], 18h loc_DF62: mov al, fs:[di] mov [bp+var_1], al loc_DF68: test [bp+var_1], 80h jz short loc_DF8C mov ax, [bp+var_4] mov dx, [bp+var_6] cmp _scroll_active, 0 jz short loc_DF7F add dx, _scroll_line loc_DF7F: cmp dx, RES_Y jl short loc_DF89 sub dx, RES_Y loc_DF89: call sub_CE80 loc_DF8C: shl [bp+var_1], 1 add [bp+var_4], 10h dec [bp+var_2] jz short loc_DFA1 test [bp+var_2], 7 jnz short loc_DF68 inc di jmp short loc_DF62 ; --------------------------------------------------------------------------- loc_DFA1: add di, 2 add [bp+var_6], 10h cmp [bp+var_6], 180h jb short loc_DF59 GRCG_OFF_CLOBBERING dx pop di leave retn 2 sub_DF36 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_DFBA proc near var_6 = dword ptr -6 var_2 = byte ptr -2 var_1 = byte ptr -1 arg_0 = word ptr 4 enter 6, 0 push di mov _tile_invalidate_box, (2 shl 16) or 2 mov ax, _bb_stage_seg mov fs, ax mov di, [bp+arg_0] shl di, 7 mov word ptr [bp+var_6+2], (8 shl 4) loc_DFD8: mov word ptr [bp+var_6], (8 shl 4) mov [bp+var_2], 18h loc_DFE1: mov al, fs:[di] mov [bp+var_1], al loc_DFE7: test [bp+var_1], 80h jnz short loc_DFF4 call tiles_invalidate_around pascal, large [bp+var_6] loc_DFF4: shl [bp+var_1], 1 add word ptr [bp+var_6], (16 shl 4) dec [bp+var_2] jz short loc_E00A test [bp+var_2], 7 jnz short loc_DFE7 inc di jmp short loc_DFE1 ; --------------------------------------------------------------------------- loc_E00A: add di, 2 add word ptr [bp+var_6+2], (16 shl 4) cmp word ptr [bp+var_6+2], (PLAYFIELD_H shl 4) jb short loc_DFD8 pop di leave retn 2 sub_DFBA endp ; =============== S U B R O U T I N E ======================================= public PLAYFIELD_FILLM_0_0_384_192__2 playfield_fillm_0_0_384_192__2 proc near push di GRCG_FILL_PLAYFIELD_ROWS 192, 176 pop di retn playfield_fillm_0_0_384_192__2 endp include th04/formats/z_super_roll_put_tiny.asm include th04/main/tiles_invalidate.asm include th05/formats/super_roll_put_16x16_m.asm include th04/main/enemy/inv.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public END_GAME end_game proc far push bp mov bp, sp cmp _continues_used, 0 jz short loc_E45D les bx, _resident assume es:nothing mov es:[bx+resident_t.end_sequence], ES_CONTINUED jmp short loc_E466 ; --------------------------------------------------------------------------- loc_E45D: les bx, _resident mov es:[bx+resident_t.end_sequence], ES_1CC loc_E466: kajacall KAJA_SONG_FADE, 4 push 10h call palette_black_out push ds push offset aMaine ; "maine" nopcall GameCore pop bp retf end_game endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public END_EXTRA end_extra proc far push bp mov bp, sp les bx, _resident mov es:[bx+resident_t.end_sequence], ES_EXTRA kajacall KAJA_SONG_FADE, 4 push 10h call palette_black_out push ds push offset aMaine_0 ; "maine" nopcall GameCore pop bp retf end_extra endp include th05/main/player/shots_add.asm include th04/main/player/shot_velocity.asm ; =============== S U B R O U T I N E ======================================= sub_E4FC proc far xor bx, bx xor ax, ax mov al, _power mov cx, 9 loc_E506: cmp ax, SHOT_LEVELS[bx] jb short loc_E511 add bx, 2 loop loc_E506 loc_E511: mov dx, bx shr dx, 1 mov _shot_level, dl add bx, _playchar_shot_funcs mov ax, [bx] mov _playchar_shot_func, ax nopcall hud_power_put retf sub_E4FC endp include th05/formats/bb_txt_load.asm include th04/formats/bb_txt_put.asm include th04/main/bullets_gather_inv.asm include th04/main/item/invalidate.asm include th04/hardware/grcg_modecol.asm ; =============== S U B R O U T I N E ======================================= sub_E708 proc near mov bx, sp push di mov di, ss:[bx+4] mov cx, ss:[bx+2] push ds pop es assume es:_DATA xor eax, eax rep stosd pop di retn 4 sub_E708 endp ; --------------------------------------------------------------------------- nop include th04/main/playperf.asm include th05/main/select_for_playchar.asm include th04/main/select_for_rank.asm include th04/formats/scoredat_code_asm.asm ; =============== S U B R O U T I N E ======================================= sub_E7DC proc near mov ax, 3D00h mov dx, offset aGENSOU_SCR int 21h ; DOS - 2+ - OPEN DISK FILE WITH HANDLE ; DS:DX -> ASCIZ filename ; AL = access mode ; 0 - read jnb short loc_E7E7 retn ; --------------------------------------------------------------------------- loc_E7E7: mov bx, ax xor ah, ah mov al, _playchar imul ax, 5 add al, _rank imul ax, size scoredat_section_t mov dx, ax xor cx, cx mov ax, 4200h int 21h ; DOS - 2+ - MOVE FILE READ/WRITE POINTER (LSEEK) ; AL = method: offset from beginning of file mov ah, 3Fh mov dx, offset _hi mov cx, size scoredat_section_t int 21h ; DOS - 2+ - READ FROM FILE WITH HANDLE ; BX = file handle, CX = number of bytes to read ; DS:DX -> buffer mov ah, 3Eh int 21h ; DOS - 2+ - CLOSE A FILE WITH HANDLE ; BX = file handle call scoredat_decode retn sub_E7DC endp ; =============== S U B R O U T I N E ======================================= sub_E813 proc near call scoredat_encode mov ax, 3D02h mov dx, offset aGENSOU_SCR int 21h ; DOS - 2+ - OPEN DISK FILE WITH HANDLE ; DS:DX -> ASCIZ filename ; AL = access mode ; 2 - read & write mov bx, ax xor ah, ah mov al, _playchar imul ax, 5 add al, _rank imul ax, size scoredat_section_t mov dx, ax xor cx, cx mov ax, 4200h int 21h ; DOS - 2+ - MOVE FILE READ/WRITE POINTER (LSEEK) ; AL = method: offset from beginning of file mov ah, 40h mov dx, offset _hi mov cx, size scoredat_section_t int 21h ; DOS - 2+ - WRITE TO FILE WITH HANDLE ; BX = file handle, CX = number of bytes to write, DS:DX -> buffer mov ah, 3Eh int 21h ; DOS - 2+ - CLOSE A FILE WITH HANDLE ; BX = file handle call scoredat_decode retn sub_E813 endp ; =============== S U B R O U T I N E ======================================= sub_E84A proc near push si push di mov dx, 4 loc_E84F: mov si, dx shl si, 3 add si, offset _hi.score.g_points[SCORE_DIGITS - 1] mov bx, offset _score_lebcd[SCORE_DIGITS - 1] mov cx, SCORE_DIGITS loc_E85E: mov al, [si] sub al, gb_0_ cmp al, [bx] jb short loc_E86C ja short loc_E86F dec bx dec si loop loc_E85E loc_E86C: dec dx jns short loc_E84F loc_E86F: inc dx mov byte_25342, dl cmp dx, 5 jnb short loc_E8EF push ds pop es mov bx, 3 jmp short loc_E8AD ; --------------------------------------------------------------------------- loc_E880: imul di, bx, (SCOREDAT_NAME_LEN + 1) mov si, di add si, offset _hi.score.g_name[0 * (SCOREDAT_NAME_LEN + 1)] add di, offset _hi.score.g_name[1 * (SCOREDAT_NAME_LEN + 1)] movsd movsd mov di, bx shl di, 3 mov si, di add si, offset _hi.score.g_points[0 * SCORE_DIGITS] add di, offset _hi.score.g_points[1 * SCORE_DIGITS] movsd movsd mov al, _hi.score.g_stage+0[bx] mov _hi.score.g_stage+1[bx], al dec bx loc_E8AD: cmp bx, dx jge short loc_E880 imul di, dx, (SCOREDAT_NAME_LEN + 1) add di, offset _hi.score.g_name mov si, offset gCONTINUE movsd movsd mov di, dx shl di, 3 add di, offset _hi.score.g_points mov si, offset _score_lebcd movsd movsd sub di, SCORE_DIGITS mov cx, SCORE_DIGITS loc_E8D5: add byte ptr [di], gb_0_ inc di loop loc_E8D5 mov al, _stage_id cmp al, 6 jnz short loc_E8E4 xor al, al loc_E8E4: mov di, dx add al, gb_1_ mov _hi.score.g_stage[di], al call sub_E813 loc_E8EF: pop di pop si retn sub_E84A endp ; =============== S U B R O U T I N E ======================================= sub_E8F2 proc near cmp _turbo_mode, 0 jz short locret_E8FC call sub_E84A locret_E8FC: retn sub_E8F2 endp ; --------------------------------------------------------------------------- nop ; =============== S U B R O U T I N E ======================================= sub_E8FE proc near call sub_E7DC xor bx, bx mov cx, SCORE_DIGITS loc_E906: mov al, _hi.score.g_points[bx] sub al, gb_0_ mov _hiscore_lebcd[bx], al inc bx loop loc_E906 retn sub_E8FE endp ; =============== S U B R O U T I N E ======================================= public PLAYFIELD_FILLM_0_104_384_192 playfield_fillm_0_104_384_192 proc near push di GRCG_FILL_PLAYFIELD_ROWS 0, 104 GRCG_FILL_PLAYFIELD_ROWS 296, 72 pop di retn playfield_fillm_0_104_384_192 endp ; --------------------------------------------------------------------------- nop ; =============== S U B R O U T I N E ======================================= sub_E92E proc near pushf cli GRCG_SETMODE_VIA_MOV al, GC_TDW mov dx, 7Eh ; '~' xor al, al out dx, al out dx, al out dx, al out dx, al popf push di GRCG_FILL_PLAYFIELD_ROWS 0, PLAYFIELD_H GRCG_OFF_VIA_XOR al pop di retn sub_E92E endp ; =============== S U B R O U T I N E ======================================= sub_E950 proc near pushf cli GRCG_SETMODE_VIA_MOV al, GC_TDW mov dx, 7Eh ; '~' xor al, al out dx, al out dx, al out dx, al out dx, al popf push di GRCG_FILL_PLAYFIELD_ROWS 0, 240 GRCG_OFF_VIA_XOR al pop di retn sub_E950 endp include th05/main/laser_render_hittest.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_EACE proc near push bp mov bp, sp xor ax, ax mov word_2D05E, ax mov _hitshot_next_free_id, ax mov _frames_unused, 0 mov _stage_frame, 0 mov _stage_frame_mod2, 0 mov _stage_frame_mod4, 0 mov _stage_frame_mod8, 0 mov _stage_frame_mod16, 0 mov word_25FE6, 1 mov byte_25FF8, 0 mov byte_25FE8, 0 mov _palette_changed, 0 mov _bullet_clear_trigger, 0 mov _stage_graze, 0 mov _circles_color, GC_R call grc_setclip pascal, large (PLAYFIELD_LEFT shl 16) or PLAYFIELD_TOP, large ((PLAYFIELD_RIGHT - 1) shl 16) or (PLAYFIELD_BOTTOM - 1) push offset _hitshots push size _hitshots / 4 call sub_E708 push offset _lasers push size _lasers / 4 call sub_E708 push offset _shots push size _shots / 4 call sub_E708 push offset _enemies push size _enemies / 4 call sub_E708 push offset _sparks push size _sparks / 4 call sub_E708 push offset _bullets push (size _pellets + size _bullets16) / 4 call sub_E708 push offset _custom_entities push size _custom_entities / 4 call sub_E708 push offset _circles push size _circles / 4 call sub_E708 push offset _items push size _items / 4 call sub_E708 push offset _pointnums push size _pointnums / 4 call sub_E708 push offset _gather_circles push size _gather_circles / 4 call sub_E708 mov _gather_template.GT_ring_points, 8 mov _gather_template.GT_col, 9 mov _gather_template.GT_radius, (64 shl 4) mov _gather_template.GT_angle_delta, 2 mov _gather_template.GT_velocity.x, 0 mov _gather_template.GT_velocity.y, 0 pop bp retn sub_EACE endp include th04/main/enemy/render.asm include th04/main/circles.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_ED87 proc far var_A = byte ptr -0Ah var_8 = byte ptr -8 arg_0 = dword ptr 6 enter 0Ah, 0 push si cmp dword_2C930, 0 jz short loc_ED9D push word ptr dword_2C930+2 call hmem_free loc_ED9D: pushd [bp+arg_0] call file_ropen push ss lea ax, [bp+var_A] push ax push 0Ah call file_read mov al, _playchar mov ah, 0 add ax, ax lea dx, [bp+var_8] add ax, dx mov bx, ax mov ax, ss:[bx] mov dl, _playchar mov dh, 0 add dx, dx lea bx, [bp+var_A] add dx, bx mov bx, dx sub ax, ss:[bx] mov si, ax push ax call hmem_allocbyte mov word ptr dword_2C930+2, ax mov word ptr dword_2C930, 0 mov al, _playchar mov ah, 0 add ax, ax lea dx, [bp+var_A] add ax, dx mov bx, ax movzx eax, word ptr ss:[bx] push eax push 0 call file_seek pushd [dword_2C930] push si call file_read call file_close pop si leave retf 4 sub_ED87 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_EE17 proc near push bp mov bp, sp les bx, off_221D0 assume es:nothing mov al, _stage_id add al, 30h ; '0' mov es:[bx+4], al push word ptr off_221D0+2 push bx call sub_ED87 pop bp retn sub_EE17 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_EE32 proc near push bp mov bp, sp cmp dword_2C930, 0 jz short loc_EE4F push word ptr dword_2C930+2 call hmem_free mov dword_2C930, 0 loc_EE4F: pop bp retn sub_EE32 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_EE51 proc near push bp mov bp, sp mov al, 0 pop bp retn sub_EE51 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_EE58 proc near push bp mov bp, sp cmp _scroll_speed, 0 jnz short loc_EE92 cmp _page_back, 1 jnz short loc_EE92 nopcall sub_F2B4 mov fp_2C92E, offset sub_EE51 mov ax, _boss_bg_render_func mov _boss_bg_render, ax mov eax, _boss_update_func mov _boss_update, eax mov ax, _boss_fg_render_func mov _boss_fg_render, ax mov _overlay_text, offset popup_boss_bgm_update_and_render mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_EE92: inc _total_std_frames mov al, 0 pop bp retn sub_EE58 endp include th04/formats/dialog_box_put.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_EEF2 proc near push bp mov bp, sp push di call egc_start_copy_inlined_noframe mov ax, GRAM_400 + (PLAYFIELD_TOP * ROW_SIZE) shr 4 mov es, ax assume es:nothing mov di, (PLAYFIELD_H - 1) * ROW_SIZE + PLAYFIELD_VRAM_LEFT mov dx, 0A6h mov al, _page_front loc_EF07: mov cx, 24 loc_EF0A: out dx, al xor al, 1 mov bx, es:[di] out dx, al xor al, 1 mov es:[di], bx add di, 2 loop loc_EF0A sub di, ROW_SIZE + (24 * 2) jge short loc_EF07 out dx, al call egc_off pop di pop bp retn sub_EEF2 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_EF2A proc near arg_0 = word ptr 4 arg_2 = word ptr 6 push bp mov bp, sp push di call egc_start_copy_inlined_noframe mov ax, [bp+arg_0] mov bx, ax shl ax, 2 add ax, bx add ax, GRAM_400 mov es, ax assume es:nothing mov di, (127 * ROW_SIZE) mov ax, [bp+arg_2] shr ax, 3 add di, ax mov dx, 0A6h mov al, _page_back loc_EF51: mov cx, 8 loc_EF54: out dx, al xor al, 1 mov bx, es:[di] out dx, al xor al, 1 mov es:[di], bx add di, 2 loop loc_EF54 sub di, ROW_SIZE + (8 * 2) jge short loc_EF51 call egc_off pop di pop bp retn 4 sub_EF2A endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_EF74 proc near arg_0 = word ptr 4 arg_2 = word ptr 6 push bp mov bp, sp push si push di mov si, [bp+arg_0] jmp short loc_EF9C ; --------------------------------------------------------------------------- loc_EF7E: mov di, [bp+arg_2] jmp short loc_EF91 ; --------------------------------------------------------------------------- loc_EF83: call text_putca pascal, di, si, (' ' shl 16) + TX_WHITE inc di loc_EF91: mov ax, [bp+arg_2] add ax, 1Eh cmp ax, di jg short loc_EF83 inc si loc_EF9C: mov ax, [bp+arg_0] add ax, 3 cmp ax, si jg short loc_EF7E pop di pop si pop bp retn 4 sub_EF74 endp include th04/formats/dialog_box_fade_in.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_EFDE proc near s = dword ptr -8 var_4 = word ptr -4 var_2 = word ptr -2 arg_0 = byte ptr 4 enter 8, 0 mov al, [bp+arg_0] mov ah, 0 mov bx, ax cmp bx, 0Eh ja loc_F181 add bx, bx jmp cs:off_F188[bx] loc_EFF7: mov word_2C934, 14h mov word_2C936, 14h mov word_2C938, 0 jmp loc_F181 ; --------------------------------------------------------------------------- loc_F00C: mov word_2C934, 6 mov word_2C936, 0Ch mov word_2C938, 1 jmp loc_F181 ; --------------------------------------------------------------------------- loc_F021: les bx, dword_2C930 mov al, es:[bx] mov [bp+arg_0], al inc word ptr dword_2C930 push 1 call frame_delay cmp word_2C938, 0 jnz short loc_F045 push 2000F0h jmp short loc_F04B ; --------------------------------------------------------------------------- loc_F045: push 1200070h loc_F04B: mov al, [bp+arg_0] mov ah, 0 push ax call sub_F36B jmp loc_F0ED ; --------------------------------------------------------------------------- loc_F057: mov eax, dword_2C930 mov [bp+s], eax call super_entry_bfnt pascal, [bp+s] loc_F068: pushd [bp+s] ; s call _strlen add sp, 4 inc ax add word ptr dword_2C930, ax jmp loc_F181 ; --------------------------------------------------------------------------- loc_F07C: cmp _stage_id, 6 jz short loc_F091 call super_clean pascal, (180 shl 16) or 320 jmp loc_F181 ; --------------------------------------------------------------------------- loc_F091: call sub_F4DD jmp loc_F181 ; --------------------------------------------------------------------------- loc_F097: mov eax, dword_2C930 mov [bp+s], eax les bx, [bp+s] cmp byte ptr es:[bx], 24h ; '$' jnz short loc_F0AD push (KAJA_SONG_STOP shl 8) jmp short loc_F0BB ; --------------------------------------------------------------------------- loc_F0AD: call snd_load pascal, [bp+s], SND_LOAD_SONG push (KAJA_SONG_PLAY shl 8) loc_F0BB: call snd_kaja_interrupt jmp short loc_F068 ; --------------------------------------------------------------------------- loc_F0C2: les bx, dword_2C930 mov ax, es:[bx] mov [bp+var_2], ax mov ax, es:[bx+2] mov [bp+var_4], ax mov al, es:[bx+4] mov [bp+arg_0], al add word ptr dword_2C930, 5 push [bp+var_2] push [bp+var_4] mov ah, 0 push ax call super_roll_put loc_F0ED: jmp loc_F181 ; --------------------------------------------------------------------------- loc_F0F0: push 6000Ch call sub_EF74 push 140014h call sub_EF74 les bx, dword_2C930 mov al, es:[bx] mov [bp+arg_0], al inc word ptr dword_2C930 mov ah, 0 push ax call palette_white_out loc_F118: jmp short loc_F181 ; --------------------------------------------------------------------------- loc_F11A: les bx, dword_2C930 mov al, es:[bx] mov [bp+arg_0], al inc word ptr dword_2C930 mov ah, 0 push ax call palette_white_in jmp short loc_F118 ; --------------------------------------------------------------------------- loc_F132: inc word_2C936 cmp word_2C938, 0 jnz short loc_F142 mov ax, 14h jmp short loc_F145 ; --------------------------------------------------------------------------- loc_F142: mov ax, 6 loc_F145: mov word_2C934, ax jmp short loc_F170 ; --------------------------------------------------------------------------- loc_F14A: les bx, dword_2C930 mov al, es:[bx] mov [bp+arg_0], al inc word ptr dword_2C930 push word_2C934 push word_2C936 mov ah, 0 push ax push TX_WHITE call gaiji_putca add word_2C934, 2 loc_F170: mov al, 1 leave retn 2 ; --------------------------------------------------------------------------- loc_F176: push word_2C934 push word_2C936 call sub_EF74 loc_F181: mov al, 0 leave retn 2 sub_EFDE endp ; --------------------------------------------------------------------------- db 0 off_F188 dw offset loc_EFF7 dw offset loc_F00C dw offset loc_F021 dw offset loc_F057 dw offset loc_F07C dw offset loc_F097 dw offset loc_F0C2 dw offset loc_F181 dw offset loc_F181 dw offset loc_F0F0 dw offset loc_F11A dw offset loc_F132 dw offset loc_F14A dw offset loc_F170 dw offset loc_F176 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_F1A6 proc near var_6 = dword ptr -6 var_2 = byte ptr -2 var_1 = byte ptr -1 enter 6, 0 push si mov word ptr [bp+var_6+2], ds mov word ptr [bp+var_6], offset _dialog_kanji_buf loc_F1B3: les bx, dword_2C930 mov al, es:[bx] mov [bp+var_1], al inc word ptr dword_2C930 cmp [bp+var_1], 0FFh jz loc_F2AE cmp [bp+var_1], 0Dh jnz loc_F2A5 cmp word_2C938, 0 jnz short loc_F1E6 mov word_2C934, 14h mov word_2C936, 14h jmp short loc_F1F2 ; --------------------------------------------------------------------------- loc_F1E6: mov word_2C934, 6 mov word_2C936, 0Ch loc_F1F2: call text_boxfilla pascal, (20 shl 16) + 20, (50 shl 16) + 23, TX_BLUE call text_boxfilla pascal, (6 shl 16) + 12, (36 shl 16) + 15, TX_BLUE push word_2C934 push word_2C936 call sub_EF74 mov [bp+var_2], 0 loc_F227: call far ptr _input_reset_sense les bx, dword_2C930 mov al, es:[bx] mov [bp+var_1], al inc word ptr dword_2C930 cmp [bp+var_1], 0FFh jnz short loc_F249 call input_wait_for_change pascal, 0 jmp short loc_F2AB ; --------------------------------------------------------------------------- loc_F249: push word ptr [bp+var_1] call sub_EFDE or al, al jnz short loc_F227 les bx, [bp+var_6] mov al, [bp+var_1] mov es:[bx], al push es les si, dword_2C930 mov al, es:[si] pop es mov es:[bx+1], al inc word ptr dword_2C930 call text_putsa pascal, word_2C934, word_2C936, word ptr [bp+var_6+2], bx, TX_WHITE add word_2C934, 2 call _input_sense cmp _key_det, INPUT_NONE jnz short loc_F296 push 2 jmp short loc_F29E ; --------------------------------------------------------------------------- loc_F296: test [bp+var_2], 1 jz short loc_F227 push 1 loc_F29E: call frame_delay jmp short loc_F227 ; --------------------------------------------------------------------------- loc_F2A5: push word ptr [bp+var_1] call sub_EFDE loc_F2AB: jmp loc_F1B3 ; --------------------------------------------------------------------------- loc_F2AE: call _playfield_tram_wipe pop si leave retn sub_F1A6 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_F2B4 proc far push bp mov bp, sp les bx, _resident cmp es:[bx+resident_t.demo_num], 0 jz short loc_F333 cmp byte_221EC, 0 jnz short loc_F318 call sub_F4DD call super_entry_bfnt pascal, ds, offset aSt06_bb1 ; "st06.bb1" call super_entry_bfnt pascal, ds, offset aSt06_bb2 ; "st06.bb2" call snd_load pascal, ds, offset aSt06b, SND_LOAD_SONG kajacall KAJA_SONG_PLAY push ds push offset aDemo5_rec ; "DEMO5.REC" call file_ropen call file_read pascal, large [_DemoBuf], (DEMO_N * 4) * 2 call file_close mov _stage_frame, 0 inc byte_221EC pop bp retf ; --------------------------------------------------------------------------- loc_F318: push word ptr _DemoBuf+2 call hmem_free push 8 call palette_black_out push ds push offset aOp_0 ; "op" nopcall GameCore pop bp retf ; --------------------------------------------------------------------------- loc_F333: call cdg_free pascal, 0 call _playfield_tram_wipe mov PaletteTone, 100 call far ptr palette_show graph_accesspage _page_front call dialog_box_fade_in call sub_EEF2 call sub_F1A6 call sub_F463 graph_accesspage _page_back push 1 call frame_delay pop bp retf sub_F2B4 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_F36B proc near var_6 = word ptr -6 var_4 = dword ptr -4 arg_0 = word ptr 4 arg_2 = word ptr 6 arg_4 = word ptr 8 enter 6, 0 push si push di mov di, offset aBss0_cd2_0 mov [bp+var_6], offset aKao0_cd2_0 cmp [bp+arg_0], 0FFh jz loc_F432 cmp _Ems, 0 jz loc_F40F cmp word_2C938, 0 jnz short loc_F39C mov [bp+var_4], 186A0h jmp short loc_F3A4 ; --------------------------------------------------------------------------- loc_F39C: mov [bp+var_4], 30D40h loc_F3A4: mov si, _cdg_slots.CDG_plane_size + (size cdg_t * 2) mov ax, [bp+arg_0] imul si imul ax, 5 movzx eax, ax add [bp+var_4], eax push si call hmem_allocbyte mov _cdg_slots.seg_alpha + (size cdg_t * 2), ax push _Ems pushd [bp+var_4] push ax push 0 movzx eax, si push eax call ems_read movzx eax, si add [bp+var_4], eax mov ax, 4 imul si mov si, ax push si call hmem_allocbyte mov _cdg_slots.seg_colors + (size cdg_t * 2), ax push _Ems pushd [bp+var_4] push ax push 0 movzx eax, si push eax call ems_read movzx eax, si add [bp+var_4], eax jmp short loc_F432 ; --------------------------------------------------------------------------- loc_F40F: cmp word_2C938, 0 jz short loc_F41B mov al, _stage_id jmp short loc_F421 ; --------------------------------------------------------------------------- loc_F41B: mov di, [bp+var_6] mov al, _playchar loc_F421: add al, 30h ; '0' mov [di+3], al call cdg_load_single pascal, 2, ds, di, [bp+arg_0] loc_F432: push 1 call frame_delay push [bp+arg_4] push [bp+arg_2] call sub_EF2A cmp [bp+arg_0], 0FFh jz short loc_F45D call cdg_put pascal, [bp+arg_4], [bp+arg_2], 2 call cdg_free pascal, 2 loc_F45D: pop di pop si leave retn 6 sub_F36B endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_F463 proc near push bp mov bp, sp push si cmp _Ems, 0 jz short loc_F499 mov ax, _cdg_slots.CDG_plane_size + (size cdg_t * 0) shl ax, 2 mov si, ax push ax call hmem_allocbyte mov _cdg_slots.seg_colors + (size cdg_t * 0), ax push _Ems pushd 84D0h push ax push 0 movzx eax, si push eax call ems_read jmp short loc_F4D1 ; --------------------------------------------------------------------------- loc_F499: mov al, _playchar mov ah, 0 mov bx, ax cmp bx, PLAYCHAR_COUNT - 1 ja short loc_F4D1 add bx, bx jmp cs:off_F4D5[bx] @@reimu: push 0 push ds push offset aBb0_cdg ; "bb0.cdg" jmp short loc_F4CA ; --------------------------------------------------------------------------- @@marisa: push 0 push ds push offset aBb1_cdg ; "bb1.cdg" jmp short loc_F4CA ; --------------------------------------------------------------------------- @@mima: push 0 push ds push offset aBb2_cdg ; "bb2.cdg" jmp short loc_F4CA ; --------------------------------------------------------------------------- @@yuuka: push 0 push ds push offset aBb3_cdg ; "bb3.cdg" loc_F4CA: push 0 call cdg_load_single_noalpha loc_F4D1: pop si pop bp retn db 0 off_F4D5 dw offset @@reimu dw offset @@marisa dw offset @@mima dw offset @@yuuka sub_F463 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_F4DD proc near push bp mov bp, sp push si call super_clean pascal, (36 shl 16) or 320 call super_entry_bfnt pascal, ds, offset aSt06_16_bft ; "st06_16.bft" mov si, 36 jmp short loc_F501 ; --------------------------------------------------------------------------- loc_F4FA: call super_convert_tiny pascal, si inc si loc_F501: cmp si, 172 jl short loc_F4FA cmp _playchar, PLAYCHAR_YUUKA jnz short loc_F514 push ds push offset aBomb3_bft_0 ; "bomb3.bft" jmp short loc_F518 ; --------------------------------------------------------------------------- loc_F514: push ds push offset aBomb0_bft_0 ; "bomb0.bft" loc_F518: call super_entry_bfnt pop si pop bp retn sub_F4DD endp include th04/main/boss/explosions_small.asm include th04/main/boss/explosions_big.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_F6E4 proc near push bp mov bp, sp push si xor si, si jmp short loc_F6FB ; --------------------------------------------------------------------------- loc_F6EC: mov al, _score_lebcd[si] les bx, _resident assume es:nothing add bx, si mov es:[bx+resident_t.score_last], al inc si loc_F6FB: cmp si, SCORE_DIGITS jl short loc_F6EC call sub_10398 pop si pop bp retn sub_F6E4 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame ; int pascal far GameCore(char *arg0); public GAMECORE GameCore proc far ; ZUN symbol [MAGNet2010] _arg0 = dword ptr 6 push bp mov bp, sp call sub_F6E4 cmp _Ems, 0 jz short loc_F71C push _Ems call ems_free loc_F71C: les bx, _resident mov ax, _total_std_frames mov es:[bx+resident_t.std_frames], ax mov ax, _items_spawned mov es:[bx+resident_t.items_spawned], ax mov ax, _items_collected mov es:[bx+resident_t.items_collected], ax mov ax, _total_point_items_collected mov es:[bx+resident_t.point_items_collected], ax mov ax, _total_max_valued_point_items_collected mov es:[bx+resident_t.max_valued_point_items_collected], ax mov ax, _enemies_gone mov es:[bx+resident_t.enemies_gone], ax mov ax, _enemies_killed mov es:[bx+resident_t.enemies_killed], ax mov eax, _total_slow_frames mov es:[bx+resident_t.slow_frames], eax mov eax, _total_frames mov es:[bx+resident_t.frames], eax call bb_txt_free call cdg_free_all call bb_stage_free call sub_EE32 call bb_playchar_free call std_free call map_free call super_free call graph_hide call text_clear call _game_exit pushd 0 pushd [bp+_arg0] ; arg0 pushd [bp+_arg0] ; path call _execl add sp, 0Ch pop bp retf 4 GameCore endp include th04/main/item/render.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_F7EC proc near var_4 = word ptr -4 var_2 = word ptr -2 enter 4, 0 push si push di mov ax, _midboss_phase_frame shl ax, 4 mov [bp+var_4], ax cmp [bp+var_4], 300h jl short loc_F80F mov [bp+var_4], 300h mov al, angle_2268E inc al mov angle_2268E, al loc_F80F: mov [bp+var_2], 0 jmp short loc_F88C ; --------------------------------------------------------------------------- loc_F816: push _midboss_pos.cur.x push [bp+var_4] mov al, angle_2268E mov ah, 0 add ax, ax mov bx, ax push _CosTable8[bx] call vector1_at mov si, ax push _midboss_pos.cur.y push [bp+var_4] mov al, angle_2268E mov ah, 0 add ax, ax mov bx, ax push _SinTable8[bx] call vector1_at mov di, ax cmp di, (-16 shl 4) jle short loc_F881 cmp di, ((PLAYFIELD_H + 16) shl 4) jge short loc_F881 cmp si, (-16 shl 4) jle short loc_F881 cmp si, ((PLAYFIELD_W + 16) shl 4) jge short loc_F881 mov ax, si sar ax, 4 add ax, (PLAYFIELD_LEFT - 16) mov si, ax call scroll_subpixel_y_to_vram_seg1 pascal, di mov di, ax push si push ax mov al, _midboss_sprite mov ah, 0 push ax call super_roll_put loc_F881: inc [bp+var_2] mov al, angle_2268E add al, 10h mov angle_2268E, al loc_F88C: cmp [bp+var_2], 10h jl short loc_F816 pop di pop si leave retn sub_F7EC endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_F896 proc near var_1 = byte ptr -1 enter 2, 0 push si push di cmp byte_2C99C, 24h ; '$' jb short loc_F8B0 call _playfield_tram_wipe mov _overlay_text, offset nullfunc_near mov al, 1 jmp short loc_F902 ; --------------------------------------------------------------------------- loc_F8B0: mov al, byte_2C99C mov ah, 0 mov bx, 4 cwd idiv bx or dx, dx jnz short loc_F8FC mov al, byte_2C99C mov ah, 0 cwd idiv bx mov [bp+var_1], al cmp [bp+var_1], 0 jz short loc_F8FC mov si, 1 jmp short loc_F8F7 ; --------------------------------------------------------------------------- loc_F8D5: mov di, 4 jmp short loc_F8F1 ; --------------------------------------------------------------------------- loc_F8DA: push di push si mov al, [bp+var_1] mov ah, 0 mov dx, 40h sub dx, ax push dx push TX_BLACK call gaiji_putca add di, 2 loc_F8F1: cmp di, 52 jl short loc_F8DA inc si loc_F8F7: cmp si, 24 jl short loc_F8D5 loc_F8FC: inc byte_2C99C mov al, 0 loc_F902: pop di pop si leave retn sub_F896 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_F906 proc near var_1 = byte ptr -1 enter 2, 0 push si push di cmp byte_2C99C, 0 jnz short loc_F920 call _playfield_tram_black mov _overlay_text, offset nullfunc_near mov al, 1 jmp short loc_F972 ; --------------------------------------------------------------------------- loc_F920: dec byte_2C99C mov al, byte_2C99C mov ah, 0 mov bx, 4 cwd idiv bx or dx, dx jnz short loc_F970 mov al, byte_2C99C mov ah, 0 cwd idiv bx mov [bp+var_1], al cmp [bp+var_1], 0 jz short loc_F970 mov si, 1 jmp short loc_F96B ; --------------------------------------------------------------------------- loc_F949: mov di, 4 jmp short loc_F965 ; --------------------------------------------------------------------------- loc_F94E: push di push si mov al, [bp+var_1] mov ah, 0 mov dx, 40h sub dx, ax push dx push TX_BLACK call gaiji_putca add di, 2 loc_F965: cmp di, 52 jl short loc_F94E inc si loc_F96B: cmp si, 24 jl short loc_F949 loc_F970: mov al, 0 loc_F972: pop di pop si leave retn sub_F906 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_F976 proc near var_2 = word ptr -2 enter 2, 0 mov byte_2C99C, 20h ; ' ' loc_F97F: call sub_F906 or al, al jnz short loc_F98F push 1 call frame_delay jmp short loc_F97F ; --------------------------------------------------------------------------- loc_F98F: mov PaletteTone, 50 call far ptr palette_show loc_F99A: call sub_F896 or al, al jnz short loc_F9AA push 1 call frame_delay jmp short loc_F99A ; --------------------------------------------------------------------------- loc_F9AA: mov [bp+var_2], 32h ; '2' jmp short loc_F9DE ; --------------------------------------------------------------------------- loc_F9B1: call gaiji_putca pascal, [bp+var_2], (12 shl 16) + gb_G_, TX_WHITE push 1 call frame_delay call text_putsa pascal, [bp+var_2], 12, ds, offset asc_226B3, TX_WHITE sub [bp+var_2], 2 loc_F9DE: cmp [bp+var_2], 8 jg short loc_F9B1 mov [bp+var_2], 8 jmp short loc_FA18 ; --------------------------------------------------------------------------- loc_F9EB: call gaiji_putca pascal, [bp+var_2], (12 shl 16) + gb_G_, TX_WHITE push 1 call frame_delay call text_putsa pascal, [bp+var_2], 12, ds, offset asc_226B6, TX_WHITE add [bp+var_2], 2 loc_FA18: cmp [bp+var_2], 14h jl short loc_F9EB call gaiji_putsa pascal, (20 shl 16) + 12, ds offset gGAMEOVER, TX_WHITE call input_wait_for_change pascal, 0 call _playfield_tram_wipe call sub_FAA3 mov ah, 0 mov [bp+var_2], ax mov byte_2C99C, 20h ; ' ' loc_FA47: call sub_F906 or al, al jnz short loc_FA57 push 1 call frame_delay jmp short loc_FA47 ; --------------------------------------------------------------------------- loc_FA57: cmp [bp+var_2], 0 jnz short loc_FA7D mov PaletteTone, 100 call far ptr palette_show loc_FA68: call sub_F896 or al, al jnz short loc_FA78 push 1 call frame_delay jmp short loc_FA68 ; --------------------------------------------------------------------------- loc_FA78: call _playfield_tram_wipe jmp short loc_FA9E ; --------------------------------------------------------------------------- loc_FA7D: les bx, _resident assume es:nothing mov es:[bx+resident_t.end_sequence], ES_SCORE kajacall KAJA_SONG_FADE, 4 push 4 call palette_black_out push ds push offset aMaine_1 ; "maine" nopcall GameCore loc_FA9E: mov al, byte ptr [bp+var_2] leave retn sub_F976 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_FAA3 proc near var_2 = byte ptr -2 var_1 = byte ptr -1 enter 2, 0 push si push di cmp _stage_id, 6 jz loc_FBF5 xor di, di mov si, 1 mov al, 3 sub al, _continues_used mov [bp+var_2], al cmp [bp+var_2], 0 jz loc_FBF5 call gaiji_putsa pascal, (19 shl 16) + 10, ds, offset gCONTINUE?, TX_WHITE call gaiji_putsa pascal, (24 shl 16) + 13, ds, offset gYES, TX_GREEN + TX_REVERSE call gaiji_putsa pascal, (25 shl 16) + 15, ds, offset gNO, TX_WHITE call gaiji_putsa pascal, (19 shl 16) + 22, ds, offset gCREDIT, TX_GREEN push (33 shl 16) + 22 mov al, [bp+var_2] mov ah, 0 add ax, gb_0_ push ax push TX_GREEN call gaiji_putca loc_FB27: call _input_reset_sense_held or si, si jnz short loc_FBA7 mov si, _key_det test si, INPUT_UP jnz short loc_FB40 test si, INPUT_DOWN jz short loc_FB8E loc_FB40: mov ax, 1 sub ax, di mov di, ax or di, di jnz short loc_FB51 mov [bp+var_1], TX_GREEN + TX_REVERSE jmp short loc_FB55 ; --------------------------------------------------------------------------- loc_FB51: mov [bp+var_1], 0E1h loc_FB55: push (24 shl 16) + 13 push ds push offset gYES mov al, [bp+var_1] mov ah, 0 push ax call gaiji_putsa cmp di, 1 jnz short loc_FB75 mov [bp+var_1], TX_GREEN + TX_REVERSE jmp short loc_FB79 ; --------------------------------------------------------------------------- loc_FB75: mov [bp+var_1], TX_WHITE loc_FB79: push (25 shl 16) + 15 push ds push offset gNO mov al, [bp+var_1] mov ah, 0 push ax call gaiji_putsa loc_FB8E: test si, INPUT_CANCEL jz short loc_FB99 mov di, 1 jmp short loc_FBB5 ; --------------------------------------------------------------------------- loc_FB99: test si, INPUT_OK jnz short loc_FBB5 test si, INPUT_SHOT jz short loc_FBAB jmp short loc_FBB5 ; --------------------------------------------------------------------------- loc_FBA7: mov si, _key_det loc_FBAB: push 1 call frame_delay jmp loc_FB27 ; --------------------------------------------------------------------------- loc_FBB5: or di, di jnz short loc_FBF5 call sub_E8F2 mov _power, 1 mov _dream, 1 les bx, _resident mov al, es:[bx+resident_t.credit_bombs] mov _bombs, al mov al, es:[bx+resident_t.credit_lives] mov _lives, al nopcall sub_E4FC nopcall sub_10407 nopcall sub_104BB inc _continues_used call sub_10398 call hud_score_put mov al, 0 jmp short loc_FBF7 ; --------------------------------------------------------------------------- loc_FBF5: mov al, 1 loc_FBF7: pop di pop si leave retn sub_FAA3 endp include th05/main/lasers_update_render.asm include th05/main/bullet/curvebullets_render.asm include th04/main/item/splashes_render.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_100C6 proc near @@i = word ptr -2 push bp mov bp, sp sub sp, 2 push si push di mov ax, GRAM_400 mov es, ax mov si, offset _bullets[(BULLET_COUNT - 1) * size bullet_t] mov [bp+@@i], 0 jmp loc_10171 ; --------------------------------------------------------------------------- loc_100DE: cmp [si+bullet_t.flag], 1 jnz loc_1016B cmp [si+bullet_t.spawn_state], BSS_CLOUD_BACKWARDS ja short loc_10108 mov ax, [si+bullet_t.pos.cur.y] add ax, ((PLAYFIELD_TOP - (BULLET16_H / 2)) shl 4) call scroll_subpixel_y_to_vram_seg1 pascal, ax mov dx, ax mov ax, [si+bullet_t.pos.cur.x] sar ax, 4 add ax, (PLAYFIELD_LEFT - (BULLET16_W / 2)) call z_super_roll_put_tiny_16x16_raw pascal, [si+bullet_t.BULLET_patnum] jmp short loc_1016B ; --------------------------------------------------------------------------- loc_10108: cmp [si+bullet_t.pos.cur.y], 0 jl short loc_1016B cmp [si+bullet_t.pos.cur.y], (PLAYFIELD_H shl 4) jge short loc_1016B cmp [si+bullet_t.pos.cur.x], 0 jl short loc_1016B cmp [si+bullet_t.pos.cur.x], ((PLAYFIELD_W + 16) shl 4) ; Huh? jge short loc_1016B cmp [si+bullet_t.BULLET_patnum], PAT_BULLET16_N_RED jl short loc_10141 cmp [si+bullet_t.BULLET_patnum], PAT_BULLET16_D_BLUE jl short loc_10134 cmp [si+bullet_t.BULLET_patnum], PAT_BULLET16_D_GREEN jl short loc_10141 loc_10134: cmp [si+bullet_t.BULLET_patnum], PAT_BULLET16_V_BLUE jl short loc_10146 cmp [si+bullet_t.BULLET_patnum], (PAT_CLOUD_PELLET + BULLET_CLOUD_CELS) jge short loc_10146 loc_10141: mov di, (PAT_CLOUD_BULLET16_BLUE - 1) jmp short loc_10149 ; --------------------------------------------------------------------------- loc_10146: mov di, (PAT_CLOUD_BULLET16_RED - 1) loc_10149: mov al, [si+bullet_t.spawn_state] mov ah, 0 mov bx, (BSS_CLOUD_FRAMES / BULLET_CLOUD_CELS) cwd idiv bx add di, ax call scroll_subpixel_y_to_vram_seg1 pascal, [si+bullet_t.pos.cur.y] mov dx, ax mov ax, [si+bullet_t.pos.cur.x] sar ax, 4 add ax, 16 call z_super_roll_put_tiny_32x32_raw pascal, di loc_1016B: inc [bp+@@i] sub si, size bullet_t loc_10171: cmp [bp+@@i], BULLET16_COUNT jl loc_100DE cmp _bullet_clear_trigger, 0 jnz short loc_101DC cmp _bullet_clear_time, 0 jnz short loc_101DC jmp short loc_101BD ; --------------------------------------------------------------------------- loc_1018A: mov bx, _pellet_clouds_render_count add bx, bx mov si, _pellet_clouds_render[bx] mov al, [si+bullet_t.spawn_state] mov ah, 0 mov bx, (BSS_CLOUD_FRAMES / BULLET_CLOUD_CELS) cwd idiv bx add ax, (PAT_CLOUD_PELLET - 1) mov di, ax mov ax, [si+bullet_t.pos.cur.y] add ax, (8 shl 4) call scroll_subpixel_y_to_vram_seg1 pascal, ax mov dx, ax mov ax, [si+bullet_t.pos.cur.x] sar ax, 4 add ax, 24 call z_super_roll_put_tiny_16x16_raw pascal, di loc_101BD: mov ax, _pellet_clouds_render_count dec _pellet_clouds_render_count or ax, ax jnz short loc_1018A mov ah, 0Fh call _grcg_setcolor_direct_seg1_raw call _pellets_render_top mov ah, byte ptr _pellet_bottom_col call _grcg_setcolor_direct_seg1_raw call _pellets_render_bottom jmp short @@ret ; --------------------------------------------------------------------------- loc_101DC: mov [bp+@@i], 0 jmp short loc_10209 ; --------------------------------------------------------------------------- loc_101E3: cmp [si+bullet_t.flag], 1 jnz short loc_10203 mov ax, [si+bullet_t.pos.cur.y] add ax, (8 shl 4) call scroll_subpixel_y_to_vram_seg1 pascal, ax mov dx, ax mov ax, [si+bullet_t.pos.cur.x] sar ax, 4 add ax, 24 call z_super_roll_put_tiny_16x16_raw pascal, [si+bullet_t.BULLET_patnum] loc_10203: inc [bp+@@i] sub si, size bullet_t loc_10209: cmp [bp+@@i], PELLET_COUNT jl short loc_101E3 @@ret: pop di pop si leave retn sub_100C6 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_10214 proc near push bp mov bp, sp cmp _stage_id, 5 jnz short loc_10223 mov _scroll_active, 0 loc_10223: mov al, _page_back mov ah, 0 add ax, ax mov dx, _scroll_line mov bx, ax mov _scroll_line_on_page[bx], dx cmp byte_23F04, 0 jz short loc_1024F cmp _scroll_active, 0 jz short loc_1024F cmp _stage_id, 5 jz short loc_1024F call graph_scrollup pascal, dx loc_1024F: mov _scroll_last_delta, 0 mov al, _scroll_subpixel_line add al, _scroll_speed mov _scroll_subpixel_line, al cmp al, 16 jb short loc_10282 mov ah, 0 shr ax, 4 sub _scroll_line, ax jns short loc_10274 add _scroll_line, RES_Y loc_10274: mov byte_23EFC, al and _scroll_subpixel_line, 0Fh shl ax, 4 mov _scroll_last_delta, ax loc_10282: call sub_BD20 pop bp retn sub_10214 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_10287 proc near push bp mov bp, sp cmp word_2CE06, 0 jz short loc_102B9 cmp _stage_frame_mod2, 0 jnz short loc_1029D mov ax, 0FFFEh jmp short loc_102A0 ; --------------------------------------------------------------------------- loc_1029D: mov ax, 2 loc_102A0: mov word_2CE02, ax cmp _stage_frame_mod4, 1 ja short loc_102AF mov ax, 0FFFEh jmp short loc_102B2 ; --------------------------------------------------------------------------- loc_102AF: mov ax, 2 loc_102B2: mov word_2CE04, ax dec word_2CE06 loc_102B9: cmp word_2CE02, 0 jge short loc_102F0 push (PLAYFIELD_LEFT shl 16) or 0 push ((PLAYFIELD_RIGHT - 1) shl 16) or (RES_Y - 1) mov ax, word_2CE02 neg ax push ax call egc_shift_left push (PLAYFIELD_LEFT shl 16) or 0 push ((PLAYFIELD_RIGHT - 1) shl 16) or (RES_Y - 1) mov ax, word_2CE02 neg ax push ax call egc_shift_left jmp short loc_1030C ; --------------------------------------------------------------------------- loc_102F0: cmp word_2CE02, 0 jle short loc_10311 push (PLAYFIELD_LEFT shl 16) or 0 push ((PLAYFIELD_RIGHT - 1) shl 16) or (RES_Y - 1) push word_2CE02 call egc_shift_right loc_1030C: mov byte_226C2, 2 loc_10311: cmp word_2CE04, 0 jge short loc_10346 cmp _scroll_line, 0 jnz short loc_1032D push (PLAYFIELD_LEFT shl 16) or PLAYFIELD_TOP push ((PLAYFIELD_RIGHT - 1) shl 16) or (PLAYFIELD_BOTTOM - 1) jmp short loc_10339 ; --------------------------------------------------------------------------- loc_1032D: push (PLAYFIELD_LEFT shl 16) or 0 push ((PLAYFIELD_RIGHT - 1) shl 16) or (RES_Y - 1) loc_10339: mov ax, word_2CE04 neg ax push ax call egc_shift_up jmp short loc_10377 ; --------------------------------------------------------------------------- loc_10346: cmp word_2CE04, 0 jle short loc_1037C cmp _scroll_line, 0 jnz short loc_10362 push (PLAYFIELD_LEFT shl 16) or PLAYFIELD_TOP push ((PLAYFIELD_RIGHT - 1) shl 16) or (PLAYFIELD_BOTTOM - 1) jmp short loc_1036E ; --------------------------------------------------------------------------- loc_10362: push (PLAYFIELD_LEFT shl 16) or 0 push ((PLAYFIELD_RIGHT - 1) shl 16) or (RES_Y - 1) loc_1036E: push word_2CE04 call egc_shift_down loc_10377: mov byte_226C2, 2 loc_1037C: cmp byte_226C2, 0 jz short loc_10396 dec byte_226C2 call tiles_invalidate_all mov word_2CE02, 0 mov word_2CE04, 0 loc_10396: pop bp retn sub_10287 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_10398 proc near push bp mov bp, sp push si mov dx, 1 mov si, SCORE_DIGITS - 1 jmp short loc_103E9 ; --------------------------------------------------------------------------- loc_103A4: cmp dx, 1 jnz short loc_103D0 les bx, _resident assume es:nothing add bx, si mov al, es:[bx+resident_t.score_highest] cmp al, _score_lebcd[si] jnb short loc_103BE mov dx, 2 jmp short loc_103D0 ; --------------------------------------------------------------------------- loc_103BE: les bx, _resident add bx, si mov al, es:[bx+resident_t.score_highest] cmp al, _score_lebcd[si] jbe short loc_103D0 xor dx, dx loc_103D0: cmp dx, 2 jnz short loc_103E3 mov al, _score_lebcd[si] les bx, _resident add bx, si mov es:[bx+resident_t.score_highest], al loc_103E3: mov _score_lebcd[si], 0 dec si loc_103E9: or si, si jg short loc_103A4 mov _score_delta, 0 mov _score_delta_frame, 0 mov _hiscore_popup_shown, 0 pop si pop bp retn sub_10398 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_10407 proc far var_2 = byte ptr -2 var_1 = byte ptr -1 push bp mov bp, sp sub sp, 2 push si mov al, _lives dec al mov [bp+var_1], al cmp [bp+var_1], 6 jge short loc_10461 mov [bp+var_2], 0 mov si, 3Eh ; '>' jmp short loc_1043A ; --------------------------------------------------------------------------- loc_10425: call gaiji_putca pascal, si, (13 shl 16) + gs_YINYANG, TX_WHITE add si, 2 inc [bp+var_2] loc_1043A: mov al, [bp+var_2] cmp al, [bp+var_1] jl short loc_10425 jmp short loc_10459 ; --------------------------------------------------------------------------- loc_10444: call gaiji_putca pascal, si, (13 shl 16) + 2, TX_WHITE add si, 2 inc [bp+var_2] loc_10459: cmp [bp+var_2], 5 jl short loc_10444 jmp short loc_104B8 ; --------------------------------------------------------------------------- loc_10461: call text_putsa pascal, (62 shl 16) + 13, ds, offset aB@b@bB@b@, TX_WHITE cmp [bp+var_1], 0Ah jl short loc_104A2 push (68 shl 16) + 13 mov al, [bp+var_1] cbw mov bx, 10 cwd idiv bx add ax, gb_0_ push ax push TX_WHITE call gaiji_putca mov al, [bp+var_1] cbw mov bx, 10 cwd idiv bx mov [bp+var_1], dl loc_104A2: push (70 shl 16) + 13 mov al, [bp+var_1] cbw add ax, gb_0_ push ax push TX_WHITE call gaiji_putca loc_104B8: pop si leave retf sub_10407 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_104BB proc far var_2 = byte ptr -2 var_1 = byte ptr -1 push bp mov bp, sp sub sp, 2 push si mov [bp+var_2], 0 cmp _bombs, 5 ja short loc_10514 mov si, 3Eh ; '>' mov al, _bombs mov [bp+var_1], al jmp short loc_104ED ; --------------------------------------------------------------------------- loc_104D8: call gaiji_putca pascal, si, (11 shl 16) + gs_BOMB, TX_WHITE add si, 2 inc [bp+var_2] loc_104ED: mov al, [bp+var_2] cmp al, [bp+var_1] jl short loc_104D8 jmp short loc_1050C ; --------------------------------------------------------------------------- loc_104F7: call gaiji_putca pascal, si, (11 shl 16) + g_EMPTY, TX_WHITE add si, 2 inc [bp+var_2] loc_1050C: cmp [bp+var_2], 5 jl short loc_104F7 jmp short loc_10571 ; --------------------------------------------------------------------------- loc_10514: mov al, _bombs mov [bp+var_1], al call text_putsa pascal, (62 shl 16) + 11, ds, offset aB@b@bB@b@_0, TX_WHITE cmp [bp+var_1], 0Ah jl short loc_1055B push (68 shl 16) + 11 mov al, [bp+var_1] cbw mov bx, 10 cwd idiv bx add ax, gb_0_ push ax push TX_WHITE call gaiji_putca mov al, [bp+var_1] cbw mov bx, 10 cwd idiv bx mov [bp+var_1], dl loc_1055B: push (70 shl 16) + 11 mov al, [bp+var_1] cbw add ax, gb_0_ push ax push TX_WHITE call gaiji_putca loc_10571: pop si leave retf sub_104BB endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public HUD_POINT_ITEMS_PUT hud_point_items_put proc far push bp mov bp, sp call hud_int_put pascal, (62 shl 16) + 16, _stage_point_items_collected, TX_WHITE call hud_int_put pascal, (62 shl 16) + 15, _extend_point_items_collected, TX_CYAN pop bp retf hud_point_items_put endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public HUD_DREAM_PUT hud_dream_put proc far @@bar_colors = byte ptr -(((HUD_DREAM_COLOR_COUNT + 1) / word) * word) push bp mov bp, sp sub sp, 0Ah mov ax, word ptr _HUD_DREAM_COLORS + 0 mov word ptr [bp+@@bar_colors + 0], ax mov ax, word ptr _HUD_DREAM_COLORS + 2 mov word ptr [bp+@@bar_colors + 2], ax mov ax, word ptr _HUD_DREAM_COLORS + 4 mov word ptr [bp+@@bar_colors + 4], ax mov ax, word ptr _HUD_DREAM_COLORS + 6 mov word ptr [bp+@@bar_colors + 6], ax mov al, _HUD_DREAM_COLORS + 8 mov [bp+@@bar_colors + 8], al cmp byte_22720, 7Fh ja short loc_105E6 cmp _dream, 128 jb short loc_105E6 mov _popup_id_new, POPUP_ID_DREAMBONUS_MAX mov _popup, offset popup_update_and_render cmp _bullet_clear_time, 20 jnb short loc_105E6 mov _bullet_clear_time, 20 loc_105E6: mov al, _dream mov byte_22720, al push 14h mov ah, 0 push ax mov al, _dream mov ah, 0 mov bx, (BAR_MAX / (HUD_DREAM_COLOR_COUNT - 1)) cwd idiv bx lea dx, [bp+@@bar_colors] add ax, dx mov bx, ax mov al, ss:[bx] mov ah, 0 push ax call hud_bar_put leave retf hud_dream_put endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public HUD_GRAZE_PUT hud_graze_put proc far push bp mov bp, sp call hud_int_put pascal, (62 shl 16) + 18, _stage_graze, TX_WHITE pop bp retf hud_graze_put endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public HUD_POWER_PUT hud_power_put proc far @@bar_colors = byte ptr -(((HUD_POWER_COLOR_COUNT + 1) / word) * word) push bp mov bp, sp sub sp, -@@bar_colors push si push di mov si, offset _HUD_POWER_COLORS lea di, [bp+@@bar_colors] push ss pop es mov cx, ((HUD_POWER_COLOR_COUNT + 1) / word) rep movsw push 16h mov al, _power mov ah, 0 push ax mov al, _shot_level mov ah, 0 lea dx, [bp+@@bar_colors] add ax, dx mov bx, ax mov al, ss:[bx] mov ah, 0 push ax call hud_bar_put pop di pop si leave retf hud_power_put endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1065B proc far @@bar_colors = byte ptr -10h var_A = word ptr -0Ah var_8 = word ptr -8 var_6 = word ptr -6 var_4 = word ptr -4 var_2 = byte ptr -2 arg_0 = word ptr 6 push bp mov bp, sp sub sp, 10h push si mov si, [bp+arg_0] mov ax, word_22734 mov [bp+var_A], ax mov ax, word_22736 mov [bp+var_8], ax mov ax, word_22738 mov [bp+var_6], ax mov ax, word_2273A mov [bp+var_4], ax mov al, byte_2273C mov [bp+var_2], al mov ax, word ptr _HUD_HP_COLORS + 0 mov word ptr [bp+@@bar_colors + 0], ax mov ax, word ptr _HUD_HP_COLORS + 2 mov word ptr [bp+@@bar_colors + 2], ax mov al, _HUD_HP_COLORS + 4 mov [bp+@@bar_colors + 4], al or si, si jz short loc_106C8 call gaiji_putsa pascal, (61 shl 16) + 8, ds, offset gsENEMY, TX_YELLOW push 9 push si mov ax, si mov bx, (BAR_MAX / (HUD_HP_COLOR_COUNT - 1)) cwd idiv bx lea dx, [bp+@@bar_colors] add ax, dx mov bx, ax mov al, ss:[bx] mov ah, 0 push ax call hud_bar_put jmp short loc_106EE ; --------------------------------------------------------------------------- loc_106C8: push (61 shl 16) + 8 push ss lea ax, [bp+var_6+1] push ax push TX_WHITE call gaiji_putsa push (56 shl 16) + 9 push ss lea ax, [bp+var_A] push ax push TX_WHITE call gaiji_putsa loc_106EE: pop si leave retf 2 sub_1065B endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public HUD_PUT hud_put proc far push bp mov bp, sp call gaiji_putsa pascal, (60 shl 16) + 3, ds offset gsHISCORE, TX_YELLOW call gaiji_putsa pascal, (61 shl 16) + 5, ds offset gsSCORE, TX_YELLOW call hud_score_put mov al, _playchar mov ah, 0 mov bx, ax cmp bx, PLAYCHAR_COUNT - 1 ja short loc_10796 add bx, bx jmp word ptr cs:table_1083C[bx] @@reimu: call gaiji_putsa pascal, (57 shl 16) + 11, ds, offset gsREIGEKI, TX_YELLOW call gaiji_putsa pascal, (57 shl 16) + 13, ds, offset gsREIMU, TX_YELLOW push (62 shl 16) + 21 push ds push offset gsREIRYOKU jmp short loc_1078E ; --------------------------------------------------------------------------- @@not_reimu: call gaiji_putsa pascal, (57 shl 16) + 11, ds, offset gsBOMB, TX_YELLOW call gaiji_putsa pascal, (57 shl 16) + 13, ds, offset gsPLAYER, TX_YELLOW push (62 shl 16) + 21 push ds push offset gsPOWER loc_1078E: push TX_YELLOW call gaiji_putsa loc_10796: call sub_104BB call sub_10407 call gaiji_putca pascal, (58 shl 16) + 16, (0E6h shl 16) + TX_YELLOW call gaiji_putsa pascal, (57 shl 16) + 15, ds, offset gsRUIKEI, TX_CYAN call hud_point_items_put call gaiji_putca pascal, (63 shl 16) + 19, (0E7h shl 16) + TX_YELLOW call hud_dream_put call gaiji_putca pascal, (58 shl 16) + 18, (0E8h shl 16) + TX_YELLOW call hud_graze_put call hud_power_put push (57 shl 16) + 23 push ds mov al, _rank mov ah, 0 shl ax, 3 add ax, offset glEASY push ax cmp _rank, RANK_EASY jnz short loc_10812 mov ax, TX_GREEN jmp short loc_1082D ; --------------------------------------------------------------------------- loc_10812: cmp _rank, RANK_NORMAL jnz short loc_1081E mov ax, TX_CYAN jmp short loc_1082D ; --------------------------------------------------------------------------- loc_1081E: cmp _rank, RANK_HARD jnz short loc_1082A mov ax, TX_MAGENTA jmp short loc_1082D ; --------------------------------------------------------------------------- loc_1082A: mov ax, TX_RED loc_1082D: push ax call gaiji_putsa push 0 call sub_1065B pop bp retf db 0 table_1083C dw @@reimu dw @@not_reimu dw @@not_reimu dw @@not_reimu hud_put endp ; --------------------------------------------------------------------------- ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MIDBOSS1_RENDER midboss1_render proc near @@y = word ptr -2 enter 2, 0 push si push di cmp _midboss_phase, PHASE_EXPLODE_BIG jnb loc_108F6 mov ax, _midboss_pos.cur.x sar ax, 4 add ax, 16 mov di, ax call scroll_subpixel_y_to_vram_seg1 pascal, _midboss_pos.cur.y mov [bp+@@y], ax mov al, _midboss_sprite mov ah, 0 mov dl, _stage_frame_mod16 mov dh, 0 mov bx, 4 push ax mov ax, dx cwd idiv bx pop dx add dx, ax mov si, dx call super_roll_put pascal, di, [bp+@@y], dx mov ax, _midboss_pos.cur.x sar ax, 4 mov di, ax mov ax, _midboss_pos.cur.y add ax, (-16 shl 4) call scroll_subpixel_y_to_vram_seg1 pascal, ax mov [bp+@@y], ax cmp _midboss_phase, 2 jnz short loc_108C2 mov al, _stage_frame_mod8 mov ah, 0 cwd sub ax, dx sar ax, 1 add ax, 208 mov si, ax loc_108B6: call super_roll_put pascal, di, [bp+@@y], si jmp short loc_10900 ; --------------------------------------------------------------------------- loc_108C2: cmp _midboss_phase, 3 jnz short loc_10900 mov al, _stage_frame_mod8 mov ah, 0 cwd sub ax, dx sar ax, 1 add ax, 212 mov si, ax cmp _midboss_damage_this_frame, 0 jz short loc_108B6 call super_roll_put_1plane pascal, di, [bp+@@y], si, large PLANE_PUT or GC_BRGI mov _midboss_damage_this_frame, 0 jmp short loc_10900 ; --------------------------------------------------------------------------- loc_108F6: cmp _midboss_phase, PHASE_EXPLODE_BIG jnz short loc_10900 call sub_F7EC loc_10900: pop di pop si leave retn midboss1_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public SARA_FG_RENDER sara_fg_render proc near @@y = word ptr -2 enter 2, 0 push si push di mov ax, _boss_pos.cur.x sar ax, 4 mov di, ax mov ax, _boss_pos.cur.y sar ax, 4 add ax, (-1 shl 4) mov [bp+@@y], ax cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnz short loc_10934 push di push ax mov al, _boss_sprite mov ah, 0 push ax call super_large_put loc_10932: jmp short loc_10999 ; --------------------------------------------------------------------------- loc_10934: cmp _boss_sprite, 184 jz short loc_10942 cmp _boss_sprite, 186 jnz short loc_1094D loc_10942: mov al, _boss_sprite mov ah, 0 mov dl, _stage_frame_mod8 jmp short loc_1095D ; --------------------------------------------------------------------------- loc_1094D: cmp _boss_sprite, 180 jnz short loc_1096F mov al, _boss_sprite mov ah, 0 mov dl, _stage_frame_mod16 loc_1095D: mov dh, 0 mov bx, 4 push ax mov ax, dx cwd idiv bx pop dx add dx, ax mov si, dx jmp short loc_10976 ; --------------------------------------------------------------------------- loc_1096F: mov al, _boss_sprite mov ah, 0 mov si, ax loc_10976: cmp _boss_damage_this_frame, 0 jnz short loc_10989 call super_put pascal, di, [bp+@@y], si jmp short loc_10932 ; --------------------------------------------------------------------------- loc_10989: call super_put_1plane pascal, di, [bp+@@y], si, large PLANE_PUT or GC_BRGI loc_10999: call explosions_small_update_and_render call explosions_big_update_and_render pop di pop si leave retn sara_fg_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MIDBOSS2_RENDER midboss2_render proc near @@y = word ptr -2 enter 2, 0 push si push di cmp _midboss_phase, PHASE_EXPLODE_BIG jnb short loc_10A1C cmp _midboss_pos.cur.y, 0 jl short loc_10A26 mov ax, _midboss_pos.cur.x sar ax, 4 mov di, ax mov ax, _midboss_pos.cur.y add ax, (-16 shl 4) call scroll_subpixel_y_to_vram_seg1 pascal, ax mov [bp+@@y], ax cmp _midboss_sprite, 202 jnz short loc_109E3 mov al, _stage_frame_mod16 mov ah, 0 mov bx, 4 cwd idiv bx add ax, 202 jmp short loc_109F0 ; --------------------------------------------------------------------------- loc_109E3: mov al, _stage_frame_mod8 mov ah, 0 cwd sub ax, dx sar ax, 1 add ax, 206 loc_109F0: mov si, ax cmp _midboss_damage_this_frame, 0 jnz short loc_10A05 call super_roll_put pascal, di, [bp+@@y], si jmp short loc_10A26 ; --------------------------------------------------------------------------- loc_10A05: call super_roll_put_1plane pascal, di, [bp+@@y], si, large PLANE_PUT or GC_BRGI mov _midboss_damage_this_frame, 0 jmp short loc_10A26 ; --------------------------------------------------------------------------- loc_10A1C: cmp _midboss_phase, PHASE_EXPLODE_BIG jnz short loc_10A26 call sub_F7EC loc_10A26: pop di pop si leave retn midboss2_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public LOUISE_FG_RENDER louise_fg_render proc near @@y = word ptr -2 enter 2, 0 push si push di mov ax, _boss_pos.cur.x sar ax, 4 mov si, ax mov ax, _boss_pos.cur.y sar ax, 4 add ax, (-1 shl 4) mov di, ax cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnz short loc_10A59 push si push ax mov al, _boss_sprite mov ah, 0 push ax call super_large_put loc_10A57: jmp short loc_10A94 ; --------------------------------------------------------------------------- loc_10A59: mov al, _boss_sprite mov ah, 0 mov dl, _stage_frame_mod16 mov dh, 0 mov bx, 4 push ax mov ax, dx cwd idiv bx pop dx add dx, ax mov [bp-2], dx cmp _boss_damage_this_frame, 0 jnz short loc_10A84 call super_put pascal, si, di, dx jmp short loc_10A57 ; --------------------------------------------------------------------------- loc_10A84: call super_put_1plane pascal, si, di, [bp+@@y], large PLANE_PUT or GC_BRGI loc_10A94: call explosions_small_update_and_render call explosions_big_update_and_render pop di pop si leave retn louise_fg_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MIDBOSS3_RENDER midboss3_render proc near @@y = word ptr -2 enter 2, 0 push si push di cmp _midboss_phase, PHASE_EXPLODE_BIG jnb short loc_10B0F cmp _midboss_pos.cur.y, 0 jl short loc_10B19 mov ax, _midboss_pos.cur.x sar ax, 4 mov di, ax mov ax, _midboss_pos.cur.y add ax, (-16 shl 4) call scroll_subpixel_y_to_vram_seg1 pascal, ax mov [bp+@@y], ax cmp _midboss_sprite, 208 jnz short loc_10ADE mov al, _stage_frame_mod16 mov ah, 0 mov bx, 8 cwd idiv bx add ax, 208 jmp short loc_10AE3 ; --------------------------------------------------------------------------- loc_10ADE: mov al, _midboss_sprite mov ah, 0 loc_10AE3: mov si, ax cmp _midboss_damage_this_frame, 0 jnz short loc_10AF8 call super_roll_put pascal, di, [bp+@@y], si jmp short loc_10B19 ; --------------------------------------------------------------------------- loc_10AF8: call super_roll_put_1plane pascal, di, [bp+@@y], si, large PLANE_PUT or GC_BRGI mov _midboss_damage_this_frame, 0 jmp short loc_10B19 ; --------------------------------------------------------------------------- loc_10B0F: cmp _midboss_phase, PHASE_EXPLODE_BIG jnz short loc_10B19 call sub_F7EC loc_10B19: pop di pop si leave retn midboss3_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public PUPPETS_RENDER puppets_render proc near @@x = word ptr -0Ah @@y = word ptr -8 @@patnum = word ptr -6 @@left = word ptr -4 @@i = word ptr -2 enter 0Ah, 0 push si push di mov si, offset puppets mov [bp+@@i], 0 jmp loc_10C3E ; --------------------------------------------------------------------------- loc_10B2E: cmp [si+puppet_t.flag], 0 jz loc_10C38 mov ax, [si+puppet_t.pos.cur.x] sar ax, 4 add ax, (PLAYFIELD_LEFT - (PUPPET_W / 2)) mov [bp+@@left], ax cmp [bp+@@left], 0 jle loc_10C38 cmp [bp+@@left], (PLAYFIELD_W + PUPPET_W) jge loc_10C38 mov ax, [si+puppet_t.pos.cur.y] sar ax, 4 mov di, ax cmp di, (-PUPPET_H / 2) jle loc_10C38 cmp di, (PLAYFIELD_H + (PUPPET_H / 2)) jge loc_10C38 mov ax, _stage_frame and ax, 1Fh cmp ax, 16 jnb short loc_10B7B mov al, _stage_frame_mod16 mov ah, 0 jmp short loc_10B87 ; --------------------------------------------------------------------------- loc_10B7B: mov al, _stage_frame_mod16 mov ah, 0 push ax mov ax, 10h pop dx sub ax, dx loc_10B87: cwd sub ax, dx sar ax, 1 add di, ax mov ax, [si+puppet_t.PUPPET_patnum] mov [bp+@@patnum], ax cmp [si+puppet_t.flag], 1 jnz short loc_10BA1 mov al, _stage_frame_mod2 mov ah, 0 add [bp+@@patnum], ax loc_10BA1: cmp [si+puppet_t.PUPPET_damage_this_frame], 0 jnz short loc_10BB5 call super_roll_put pascal, [bp+@@left], di, [bp+@@patnum] jmp short loc_10BC7 ; --------------------------------------------------------------------------- loc_10BB5: call super_put_1plane pascal, [bp+@@left], di, [bp+@@patnum], large PLANE_PUT or GC_BRGI loc_10BC7: mov ax, [si+puppet_t.pos.cur.y] sar ax, 4 add ax, 10h mov di, ax cmp byte_2D07F, 1 jnz short loc_10BFD cmp _stage_frame_mod2, 0 jz short loc_10C25 call grcg_setcolor pascal, (GC_RMW shl 16) + 15 mov ax, [bp+@@left] add ax, 16 call grcg_circle pascal, ax, di, [si+puppet_t.radius_gather] jmp short loc_10C1F ; --------------------------------------------------------------------------- loc_10BFD: cmp byte_2D07F, 2 jnz short loc_10C25 call grcg_setcolor pascal, (GC_RMW shl 16) + 15 mov ax, [bp+@@left] add ax, 16 call grcg_circlefill pascal, ax, di, [si+puppet_t.radius_gather] loc_10C1F: GRCG_OFF_CLOBBERING dx loc_10C25: mov bx, [bp+@@i] add bx, bx lea ax, [bp+@@x] add bx, ax mov ax, [bp+@@left] add ax, 16 mov ss:[bx], ax loc_10C38: inc [bp+@@i] add si, size puppet_t loc_10C3E: cmp [bp+@@i], PUPPET_COUNT jl loc_10B2E cmp byte_2D07F, 2 jnz short loc_10C6C call grcg_setcolor pascal, (GC_RMW shl 16) + 9 call grcg_hline pascal, [bp+@@x], [bp+@@y], di GRCG_OFF_CLOBBERING dx jmp short loc_10C96 ; --------------------------------------------------------------------------- loc_10C6C: cmp byte_2D07F, 3 jnz short loc_10C96 push [bp+@@x] push di mov al, byte_2D07E mov ah, 0 push ax call super_put mov ax, [bp+@@x] add ax, 64 push ax push di mov al, byte_2D07E mov ah, 0 inc ax push ax call super_put loc_10C96: pop di pop si leave retn puppets_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public ALICE_FG_RENDER alice_fg_render proc near @@y = word ptr -2 enter 2, 0 push si push di mov ax, _boss_pos.cur.x sar ax, 4 mov di, ax mov ax, _boss_pos.cur.y sar ax, 4 add ax, (-1 shl 4) mov [bp+@@y], ax cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnz short loc_10CCA push di push ax mov al, _boss_sprite mov ah, 0 push ax call super_large_put jmp short loc_10D1C ; --------------------------------------------------------------------------- loc_10CCA: mov al, _boss_sprite mov ah, 0 mov si, ax cmp si, 180 jnz short loc_10CDC mov al, _stage_frame_mod16 jmp short loc_10CEC ; --------------------------------------------------------------------------- loc_10CDC: cmp si, 184 jnz short loc_10CE9 mov al, _stage_frame_mod2 mov ah, 0 jmp short loc_10CF4 ; --------------------------------------------------------------------------- loc_10CE9: mov al, _stage_frame_mod8 loc_10CEC: mov ah, 0 mov bx, 4 cwd idiv bx loc_10CF4: add si, ax cmp _boss_damage_this_frame, 0 jnz short loc_10D09 call super_put pascal, di, [bp+@@y], si jmp short loc_10D19 ; --------------------------------------------------------------------------- loc_10D09: call super_put_1plane pascal, di, [bp+@@y], si, large PLANE_PUT or GC_BRGI loc_10D19: call puppets_render loc_10D1C: call explosions_small_update_and_render call explosions_big_update_and_render pop di pop si leave retn alice_fg_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_10D26 proc near arg_0 = word ptr 4 @@patnum = word ptr 6 @@y = word ptr 8 @@x = word ptr 0Ah push bp mov bp, sp push si push di mov di, [bp+@@x] mov si, [bp+@@patnum] cmp si, 184 jz short loc_10D3D cmp si, 200 jnz short loc_10D49 loc_10D3D: mov al, _stage_frame_mod8 mov ah, 0 cwd sub ax, dx sar ax, 1 add si, ax loc_10D49: cmp [bp+arg_0], 0 jnz short loc_10D5B call super_put pascal, di, [bp+@@y], si jmp short loc_10D6B ; --------------------------------------------------------------------------- loc_10D5B: call super_put_1plane pascal, di, [bp+@@y], si, large PLANE_PUT or GC_BRGI loc_10D6B: pop di pop si pop bp retn 8 sub_10D26 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MAI_YUKI_FG_RENDER mai_yuki_fg_render proc near @@y = word ptr -4 @@x = word ptr -2 enter 4, 0 push si push di mov ax, _boss_pos.cur.x sar ax, 4 mov si, ax mov ax, _boss_pos.cur.y sar ax, 4 add ax, (-1 shl 4) mov di, ax mov ax, _yuki_pos.cur.x sar ax, 4 mov [bp+@@x], ax mov ax, _yuki_pos.cur.y sar ax, 4 add ax, (-1 shl 4) mov [bp+@@y], ax cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnz short loc_10DDA cmp _boss2_mode_change, 0 jnz short loc_10DBC push si push di mov al, _boss_sprite mov ah, 0 push ax call super_large_put jmp short loc_10E07 ; --------------------------------------------------------------------------- loc_10DBC: push [bp+@@x] push [bp+@@y] mov al, _yuki_sprite mov ah, 0 push ax call super_large_put push si push di mov al, _boss_sprite mov ah, 0 push ax mov al, _boss_damage_this_frame jmp short loc_10E19 ; --------------------------------------------------------------------------- loc_10DDA: cmp _boss_phase, PHASE_BOSS_EXPLODE_SMALL jbe short loc_10DE8 cmp _boss2_mode_change, 0 jz short loc_10DF9 loc_10DE8: push si push di mov al, _boss_sprite mov ah, 0 push ax mov al, _boss_damage_this_frame mov ah, 0 push ax call sub_10D26 loc_10DF9: cmp _boss_phase, PHASE_BOSS_EXPLODE_SMALL jbe short loc_10E07 cmp _boss2_mode_change, 0 jnz short loc_10E1F loc_10E07: push [bp+@@x] push [bp+@@y] mov al, _yuki_sprite mov ah, 0 add ax, B4_CELS push ax mov al, _yuki_damage_this_frame loc_10E19: mov ah, 0 push ax call sub_10D26 loc_10E1F: call explosions_small_update_and_render call explosions_big_update_and_render mov _boss_damage_this_frame, 0 mov _yuki_damage_this_frame, 0 pop di pop si leave retn mai_yuki_fg_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MIDBOSS4_RENDER midboss4_render proc near @@patnum = word ptr -2 enter 2, 0 push si push di cmp _midboss_phase, PHASE_EXPLODE_BIG jnb short loc_10EA4 cmp _midboss_pos.cur.y, 0 jl short loc_10EAE mov ax, _midboss_pos.cur.x sar ax, 4 mov si, ax mov ax, _midboss_pos.cur.y add ax, (-16 shl 4) call scroll_subpixel_y_to_vram_seg1 pascal, ax mov di, ax mov al, _midboss_sprite mov ah, 0 mov dl, _stage_frame_mod16 mov dh, 0 mov bx, 4 push ax mov ax, dx cwd idiv bx pop dx add dx, ax mov [bp+@@patnum], dx cmp _midboss_damage_this_frame, 0 jnz short loc_10E8D cmp angle_2D085, 0 jz short loc_10E8D call super_roll_put pascal, si, di, dx jmp short loc_10EAE ; --------------------------------------------------------------------------- loc_10E8D: call super_roll_put_1plane pascal, si, di, [bp+@@patnum], large PLANE_PUT or GC_BRGI mov _midboss_damage_this_frame, 0 jmp short loc_10EAE ; --------------------------------------------------------------------------- loc_10EA4: cmp _midboss_phase, PHASE_EXPLODE_BIG jnz short loc_10EAE call sub_F7EC loc_10EAE: pop di pop si leave retn midboss4_render endp include th05/main/bullet/b4balls_render.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_10F12 proc near @@y = word ptr -2 enter 2, 0 push si push di mov ax, _boss_pos.cur.x sar ax, 4 mov di, ax mov ax, _boss_pos.cur.y sar ax, 4 add ax, (-1 shl 4) mov [bp+@@y], ax cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnz short loc_10F42 push di push ax mov al, _boss_sprite mov ah, 0 push ax call super_large_put loc_10F40: jmp short loc_10F86 ; --------------------------------------------------------------------------- loc_10F42: mov al, _boss_sprite mov ah, 0 mov si, ax cmp _boss_sprite, 208 jz short loc_10F57 cmp _boss_sprite, 192 jnz short loc_10F63 loc_10F57: mov al, _stage_frame_mod8 mov ah, 0 cwd sub ax, dx sar ax, 1 add si, ax loc_10F63: cmp _boss_damage_this_frame, 0 jnz short loc_10F76 call super_put pascal, di, [bp+@@y], si jmp short loc_10F40 ; --------------------------------------------------------------------------- loc_10F76: call super_put_1plane pascal, di, [bp+@@y], si, large PLANE_PUT or GC_BRGI loc_10F86: call explosions_small_update_and_render call explosions_big_update_and_render pop di pop si leave retn sub_10F12 endp include th05/main/bullet/knives_render.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public YUMEKO_FG_RENDER yumeko_fg_render proc near var_6 = word ptr -6 @@x = word ptr -4 @@patnum = word ptr -2 enter 6, 0 push si push di mov ax, _boss_pos.cur.x sar ax, 4 mov si, ax mov ax, _boss_pos.cur.y sar ax, 4 add ax, (-1 shl 4) mov di, ax cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnz short loc_11001 push si push ax mov al, _boss_sprite mov ah, 0 push ax call super_large_put jmp short loc_11069 ; --------------------------------------------------------------------------- loc_11001: cmp _boss_phase, 0 jnz short loc_11029 mov ax, _boss2_pos.x sar ax, 4 mov [bp+@@x], ax mov ax, _boss2_pos.y sar ax, 4 add ax, (-1 shl 4) mov [bp+var_6], ax call super_put_rect pascal, [bp+@@x], ax, 192 loc_11029: mov al, _boss_sprite mov ah, 0 mov dl, _stage_frame_mod16 mov dh, 0 mov bx, 4 push ax mov ax, dx cwd idiv bx pop dx add dx, ax mov [bp+@@patnum], dx cmp _boss_damage_this_frame, 0 jnz short loc_11054 call super_put pascal, si, di, dx jmp short loc_11064 ; --------------------------------------------------------------------------- loc_11054: call super_put_1plane pascal, si, di, [bp+@@patnum], large PLANE_PUT or GC_BRGI loc_11064: mov _boss_damage_this_frame, 0 loc_11069: call explosions_small_update_and_render call explosions_big_update_and_render pop di pop si leave retn yumeko_fg_render endp include th05/main/bullet/b6balls_render.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public SHINKI_FG_RENDER shinki_fg_render proc near var_4 = word ptr -4 @@y = word ptr -2 enter 4, 0 push si push di mov ax, _boss_pos.cur.x sar ax, 4 mov si, ax mov ax, _boss_pos.cur.y sar ax, 4 add ax, (-1 shl 4) mov [bp+@@y], ax cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnz short loc_11114 push si push ax mov al, _boss_sprite mov ah, 0 push ax call super_large_put jmp short loc_1117A ; --------------------------------------------------------------------------- loc_11114: mov al, _boss_sprite mov ah, 0 mov di, ax cmp di, 184 jge short loc_11146 cmp _boss_damage_this_frame, 0 jnz short loc_11134 call super_put pascal, si, [bp+@@y], ax jmp short loc_11175 ; --------------------------------------------------------------------------- loc_11134: call super_put_1plane pascal, si, [bp+@@y], di, large PLANE_PUT or GC_BRGI jmp short loc_11175 ; --------------------------------------------------------------------------- loc_11146: sub si, 96 sub [bp+@@y], 16 cmp _boss_damage_this_frame, 0 jz short loc_11157 add di, 4 loc_11157: mov [bp+var_4], 0 jmp short loc_1116F ; --------------------------------------------------------------------------- loc_1115E: call super_put_8 pascal, si, [bp+@@y], di inc [bp+var_4] add si, 64 inc di loc_1116F: cmp [bp+var_4], 4 jl short loc_1115E loc_11175: mov _boss_damage_this_frame, 0 loc_1117A: call explosions_small_update_and_render call explosions_big_update_and_render pop di pop si leave retn shinki_fg_render endp include th05/main/stage/s2part.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_111B7 proc near var_2 = word ptr -2 @@s2part = word ptr 4 enter 2, 0 push si push di mov si, [bp+@@s2part] mov ax, _stage_frame and ax, 4095 mov di, ax cmp di, 1000 jge short loc_111EF call randring1_next16_mod pascal, 20h add al, 30h mov [si+s2particle_t.S2P_angle], al mov al, [si+s2particle_t.S2P_angle] mov ah, 0 mov dx, 50h sub dx, ax shl dx, 3 shl dx, 4 add dx, (64 shl 4) jmp @@set_pos ; --------------------------------------------------------------------------- loc_111EF: cmp di, 1128 jge short loc_11235 sub di, 1000 mov ax, di mov bx, 8 cwd idiv bx add ax, 30h mov [bp+var_2], ax call randring1_next16_mod pascal, 20h add al, byte ptr [bp+var_2] mov [si+s2particle_t.S2P_angle], al mov ax, di shl ax, 3 mov di, ax mov al, [si+s2particle_t.S2P_angle] mov ah, 0 mov dx, [bp+var_2] add dx, 20h sub dx, ax shl dx, 3 shl dx, 4 add dx, di add dx, (64 shl 4) jmp @@set_pos ; --------------------------------------------------------------------------- loc_11235: cmp di, 2000 jge short loc_1125C call randring1_next16_mod pascal, 20h add al, 40h mov [si+s2particle_t.S2P_angle], al mov al, [si+s2particle_t.S2P_angle] mov ah, 0 mov dx, 60h sub dx, ax shl dx, 3 shl dx, 4 add dx, (128 shl 4) jmp @@set_pos ; --------------------------------------------------------------------------- loc_1125C: cmp di, 2128 jge short loc_112A0 sub di, 2000 mov ax, di mov bx, 8 cwd idiv bx mov dx, 40h sub dx, ax mov [bp+var_2], dx call randring1_next16_mod pascal, 20h add al, byte ptr [bp+var_2] mov [si+s2particle_t.S2P_angle], al mov ax, di shl ax, 3 mov di, ax mov al, [si+s2particle_t.S2P_angle] mov ah, 0 mov dx, [bp+var_2] add dx, 20h sub dx, ax shl dx, 3 shl dx, 4 mov ax, (128 shl 4) jmp short loc_11309 ; --------------------------------------------------------------------------- loc_112A0: cmp di, 3000 jge short loc_112C7 call randring1_next16_mod pascal, 20h add al, 30h mov [si+s2particle_t.S2P_angle], al mov al, [si+s2particle_t.S2P_angle] mov ah, 0 mov dx, 50h sub dx, ax shl dx, 3 shl dx, 4 add dx, (64 shl 4) jmp @@set_pos ; --------------------------------------------------------------------------- loc_112C7: cmp di, 3128 jge short loc_1130F sub di, 3000 mov ax, di mov bx, 8 cwd idiv bx mov dx, 30h sub dx, ax mov [bp+var_2], dx call randring1_next16_mod pascal, 20h add al, byte ptr [bp+var_2] mov [si+s2particle_t.S2P_angle], al mov ax, di shl ax, 3 mov di, ax mov al, [si+s2particle_t.S2P_angle] mov ah, 0 mov dx, [bp+var_2] add dx, 20h sub dx, ax shl dx, 3 shl dx, 4 mov ax, (64 shl 4) loc_11309: sub ax, di add dx, ax jmp short @@set_pos ; --------------------------------------------------------------------------- loc_1130F: cmp di, 3968 jge short loc_11331 call randring1_next16_mod pascal, 20h add al, 20h mov [si+s2particle_t.S2P_angle], al mov al, [si+s2particle_t.S2P_angle] mov ah, 0 mov dx, 40h sub dx, ax shl dx, 3 shl dx, 4 jmp short @@set_pos ; --------------------------------------------------------------------------- loc_11331: sub di, 3968 mov ax, di mov bx, 8 cwd idiv bx add ax, 20h mov [bp+var_2], ax call randring1_next16_mod pascal, 20h add al, byte ptr [bp+var_2] mov [si+s2particle_t.S2P_angle], al mov ax, di shl ax, 3 mov di, ax mov al, [si+s2particle_t.S2P_angle] mov ah, 0 mov dx, [bp+var_2] add dx, 20h sub dx, ax shl dx, 3 shl dx, 4 add dx, di @@set_pos: mov [si+s2particle_t.pos.cur.x], dx call IRand mov bx, 8 cwd idiv bx shl dx, 4 add [si+s2particle_t.pos.cur.x], dx mov [si+s2particle_t.zoom], 8 mov [si+s2particle_t.pos.cur.y], 0 push ds lea ax, [si+s2particle_t.pos.velocity.x] push ax push ds lea ax, [si+s2particle_t.pos.velocity.y] push ax push word ptr [si+s2particle_t.S2P_angle] push (8 shl 4) call vector2 pop di pop si leave retn 2 sub_111B7 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public STAGE2_UPDATE stage2_update proc near var_4 = word ptr -4 var_2 = word ptr -2 enter 4, 0 push si push di cmp _boss_phase, 1 jbe short loc_113B9 cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jb loc_1162C loc_113B9: cmp _boss_phase, 1 jnz short loc_113C9 cmp _boss_phase_frame, 32 jge loc_1162C loc_113C9: cmp _stage_frame, 304 jnb loc_11475 mov _scroll_active, 0 cmp _stage_frame, 256 jb loc_1146F mov ax, 303 sub ax, _stage_frame mov [bp+var_2], ax mov al, byte ptr [bp+var_2] mov Palettes, al mov Palettes+1, al mov ax, [bp+var_2] imul ax, 5 mov Palettes+2, al mov al, byte_22859 mov ah, 0 add ax, 100 mov PaletteTone, ax mov _palette_changed, 1 mov al, byte_22859 add al, 2 mov byte_22859, al cmp _stage_frame_mod4, 0 jnz short loc_1146F mov ax, _stage_frame sub ax, 256 shr ax, 2 mov [bp+var_2], ax mov ax, 0Bh sub ax, [bp+var_2] mov di, ax mov ax, [bp+var_2] add ax, 0Ch mov [bp+var_4], ax mov [bp+var_2], 0 jmp short loc_11469 ; --------------------------------------------------------------------------- loc_11441: mov bx, [bp+var_2] shl bx, 6 mov ax, di add ax, ax add bx, ax mov _tile_ring[bx], 5048h mov bx, [bp+var_2] shl bx, 6 mov ax, [bp+var_4] add ax, ax add bx, ax mov _tile_ring[bx], 5048h inc [bp+var_2] loc_11469: cmp [bp+var_2], 19h jl short loc_11441 loc_1146F: call tiles_invalidate_all jmp loc_1162C ; --------------------------------------------------------------------------- loc_11475: cmp _stage_frame, 306 jnb short loc_114CD call graph_scrollup pascal, _scroll_line xor di, di jmp short loc_114AD ; --------------------------------------------------------------------------- loc_1148A: mov [bp+var_2], 0 jmp short loc_114A6 ; --------------------------------------------------------------------------- loc_11491: mov bx, [bp+var_2] shl bx, 6 mov ax, di add ax, ax add bx, ax mov _tile_ring[bx], 48h inc [bp+var_2] loc_114A6: cmp [bp+var_2], 19h jl short loc_11491 inc di loc_114AD: cmp di, 18h jl short loc_1148A call tiles_invalidate_all mov _scroll_active, 1 mov word_22856, 0 mov byte_22858, 0 mov byte_2CE4C, 0 jmp loc_1162C ; --------------------------------------------------------------------------- loc_114CD: cmp byte_22859, 0 jz short loc_114F8 cmp byte_22859, 4 jbe short loc_114E5 mov al, byte_22859 add al, 0FCh mov byte_22859, al jmp short loc_114EA ; --------------------------------------------------------------------------- loc_114E5: mov byte_22859, 0 loc_114EA: mov al, byte_22859 mov ah, 0 add ax, 100 mov PaletteTone, ax jmp loc_11627 ; --------------------------------------------------------------------------- loc_114F8: cmp word_22856, 40h jge short loc_11553 cmp _stage_frame_mod2, 0 jnz short loc_11553 mov ax, word_22856 imul ax, size s2particle_t add ax, offset s2particles mov si, ax mov [si+s2particle_t.flag], 1 call randring1_next16_mod pascal, 20h add al, 30h mov [si+s2particle_t.S2P_angle], al mov al, [si+s2particle_t.S2P_angle] mov ah, 0 mov dx, 50h sub dx, ax shl dx, 3 shl dx, 4 add dx, (64 shl 4) mov [si+s2particle_t.pos.cur.x], dx mov [si+s2particle_t.pos.cur.y], 0 push ds lea ax, [si+s2particle_t.pos.velocity.x] push ax push ds lea ax, [si+s2particle_t.pos.velocity.y] push ax push word ptr [si+s2particle_t.S2P_angle] push (8 shl 4) call vector2 inc word_22856 loc_11553: call grcg_setcolor pascal, (GC_RMW shl 16) + 0 mov si, offset s2particles mov [bp+var_2], 0 jmp short loc_115D4 ; --------------------------------------------------------------------------- loc_11568: cmp [si+s2particle_t.flag], 0 jz short loc_115CE lea ax, [si+s2particle_t.pos] call _motion_update_1 pascal, ax cmp ax, (-8 shl 4) jle short loc_11589 cmp ax, ((PLAYFIELD_W + 8) shl 4) jge short loc_11589 cmp dx, (-8 shl 4) jle short loc_11589 cmp dx, ((PLAYFIELD_H + 8) shl 4) jl short loc_1158F loc_11589: call sub_111B7 pascal, si jmp short loc_115CE ; --------------------------------------------------------------------------- loc_1158F: mov ax, GRAM_400 mov es, ax test byte ptr [bp+var_2], 3 jz short loc_1159D inc [si+s2particle_t.zoom] loc_1159D: mov ax, [si+s2particle_t.zoom] shr ax, 4 mov di, ax cmp di, (PARTICLE_CELS - 1) jl short loc_115AD mov di, (PARTICLE_CELS - 1) loc_115AD: add di, PAT_PARTICLE mov ax, [si+s2particle_t.pos.cur.x] sar ax, 4 add ax, (PLAYFIELD_LEFT - (PARTICLE_W / 2)) mov [bp+var_4], ax mov ax, [si+s2particle_t.pos.cur.y] add ax, ((PLAYFIELD_TOP - (PARTICLE_H / 2)) shl 4) call scroll_subpixel_y_to_vram_seg1 pascal, ax mov cx, [bp+var_4] call z_super_roll_put_16x16_mono_raw pascal, di loc_115CE: inc [bp+var_2] add si, size s2particle_t loc_115D4: cmp [bp+var_2], S2PARTICLE_COUNT jl short loc_11568 GRCG_OFF_CLOBBERING dx cmp _stage_frame_mod4, 0 jnz short loc_1162C cmp byte_2CE4C, 0 jnz short loc_115FF inc byte_22858 cmp byte_22858, 3Fh ; '?' jb short loc_1160E inc byte_2CE4C jmp short loc_1160E ; --------------------------------------------------------------------------- loc_115FF: dec byte_22858 cmp byte_22858, 20h ; ' ' ja short loc_1160E dec byte_2CE4C loc_1160E: mov al, byte_22858 add al, al mov Palettes, al mov al, byte_22858 add al, al mov Palettes+1, al mov al, byte_22858 shl al, 2 mov Palettes+2, al loc_11627: mov _palette_changed, 1 loc_1162C: pop di pop si leave retn stage2_update endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MIDBOSSX_RENDER midbossx_render proc near push bp mov bp, sp push si push di cmp _midboss_phase, PHASE_EXPLODE_BIG jnb short loc_11687 cmp _midboss_pos.cur.y, 0 jl short loc_11691 mov ax, _midboss_pos.cur.x sar ax, 4 mov si, ax mov ax, _midboss_pos.cur.y add ax, (-16 shl 4) call scroll_subpixel_y_to_vram_seg1 pascal, ax mov di, ax cmp _midboss_damage_this_frame, 0 jnz short loc_1166D push si push ax mov al, _midboss_sprite mov ah, 0 push ax call super_roll_put jmp short loc_11691 ; --------------------------------------------------------------------------- loc_1166D: push si push di mov al, _midboss_sprite mov ah, 0 push ax pushd PLANE_PUT or GC_BRGI call super_roll_put_1plane mov _midboss_damage_this_frame, 0 jmp short loc_11691 ; --------------------------------------------------------------------------- loc_11687: cmp _midboss_phase, PHASE_EXPLODE_BIG jnz short loc_11691 call sub_F7EC loc_11691: pop di pop si pop bp retn midbossx_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public EXALICE_CUSTOMBULLETS_RENDER exalice_custombullets_render proc near @@left = word ptr -0Ah @@patnum = word ptr -8 var_6 = word ptr -6 @@angle = word ptr -4 @@i = word ptr -2 enter 0Ah, 0 push si push di mov di, offset _firewaves mov [bp+@@i], 0 jmp loc_117BA ; --------------------------------------------------------------------------- loc_116A6: cmp byte ptr [di], 0 jz loc_117B4 mov si, [di+2] mov ax, si and ax, 0Fh cwd sub ax, dx sar ax, 1 mov [bp+@@angle], ax and si, 0FFF0h mov al, [di+1] mov ah, 0 add ax, PAT_FIREWAVE_LEFT mov [bp+@@patnum], ax jmp loc_117A6 ; --------------------------------------------------------------------------- loc_116CE: cmp si, PLAYFIELD_TOP + PLAYFIELD_H jge loc_1179F push 0 push word ptr [di+4] mov bx, [bp+@@angle] add bx, bx push _SinTable8[bx] call vector1_at mov [bp+var_6], ax cmp byte ptr [di+1], 0 jnz short loc_116F8 add [bp+var_6], 10h jmp short loc_11701 ; --------------------------------------------------------------------------- loc_116F8: mov ax, PLAYFIELD_RIGHT sub ax, [bp+var_6] mov [bp+var_6], ax loc_11701: mov ax, [bp+var_6] mov [bp+@@left], ax cmp byte ptr [di+1], 0 jnz short loc_11749 cmp [bp+var_6], 20h ; ' ' jle short loc_11727 push 4 push si dec ax mov bx, 8 cwd idiv bx push ax lea ax, [si+15] push ax call grcg_byteboxfill_x loc_11727: mov ax, _player_pos.cur.y mov bx, 10h cwd idiv bx sub ax, si cmp ax, 10h jnb short loc_1178F mov ax, _player_pos.cur.x cwd idiv bx mov dx, [bp+var_6] add dx, 0FFE0h cmp ax, dx jge short loc_1178F jmp short loc_1178A ; --------------------------------------------------------------------------- loc_11749: add [bp+var_6], 16 cmp [bp+var_6], PLAYFIELD_RIGHT jge short loc_1176A mov ax, [bp+var_6] mov bx, 8 cwd idiv bx push ax push si push PLAYFIELD_VRAM_RIGHT - 1 lea ax, [si+15] push ax call grcg_byteboxfill_x loc_1176A: mov ax, _player_pos.cur.y mov bx, 10h cwd idiv bx sub ax, si cmp ax, 10h jnb short loc_1178F mov ax, _player_pos.cur.x cwd idiv bx mov dx, [bp+var_6] add dx, 0FFE0h cmp ax, dx jle short loc_1178F loc_1178A: mov _player_is_hit, 1 loc_1178F: mov ax, GRAM_400 mov es, ax mov dx, si mov ax, [bp+@@left] call z_super_roll_put_tiny_16x16_raw pascal, [bp+@@patnum] loc_1179F: sub si, 10h add [bp+@@angle], 8 loc_117A6: cmp si, 10h jl short loc_117B4 cmp [bp+@@angle], 80h jl loc_116CE loc_117B4: inc [bp+@@i] add di, size firewave_t loc_117BA: cmp [bp+@@i], 2 jl loc_116A6 call curvebullets_render pop di pop si leave retn exalice_custombullets_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public EXALICE_FG_RENDER exalice_fg_render proc near @@y = word ptr -2 enter 2, 0 push si push di mov ax, _boss_pos.cur.x sar ax, 4 mov di, ax mov ax, _boss_pos.cur.y sar ax, 4 add ax, (-1 shl 4) mov [bp+@@y], ax cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnz short loc_117F9 push di push ax mov al, _boss_sprite mov ah, 0 push ax call super_large_put jmp short loc_11862 ; --------------------------------------------------------------------------- loc_117F9: mov al, _boss_sprite mov ah, 0 mov si, ax mov al, byte_2CE56 mov ah, 0 mov bx, 2 cwd idiv bx or dx, dx jz short loc_11812 add si, 8 loc_11812: cmp _boss_damage_this_frame, 0 jnz short loc_11825 call super_put pascal, di, [bp+@@y], si jmp short loc_1183A ; --------------------------------------------------------------------------- loc_11825: call super_put_1plane pascal, di, [bp+@@y], si, large PLANE_PUT or GC_BRGI mov _boss_damage_this_frame, 0 loc_1183A: cmp si, 181 jg short loc_11862 cmp _boss_phase, 2 jb short loc_11862 mov al, _stage_frame_mod16 mov ah, 0 mov bx, 4 cwd idiv bx add ax, patnum_2CE64 mov si, ax call super_put pascal, di, [bp+@@y], ax loc_11862: call explosions_small_update_and_render call explosions_big_update_and_render pop di pop si leave retn exalice_fg_render endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MIDBOSS5_RENDER midboss5_render proc near push bp mov bp, sp push si push di cmp _midboss_phase, PHASE_EXPLODE_BIG jnb short loc_118C3 cmp _midboss_pos.cur.y, 0 jl short loc_118CD mov ax, _midboss_pos.cur.x sar ax, 4 mov si, ax mov ax, _midboss_pos.cur.y add ax, (-16 shl 4) call scroll_subpixel_y_to_vram_seg1 pascal, ax mov di, ax cmp _midboss_damage_this_frame, 0 jnz short loc_118A9 push si push ax mov al, _midboss_sprite mov ah, 0 push ax call super_roll_put jmp short loc_118CD ; --------------------------------------------------------------------------- loc_118A9: push si push di mov al, _midboss_sprite mov ah, 0 push ax pushd PLANE_PUT or GC_BRGI call super_roll_put_1plane mov _midboss_damage_this_frame, 0 jmp short loc_118CD ; --------------------------------------------------------------------------- loc_118C3: cmp _midboss_phase, PHASE_EXPLODE_BIG jnz short loc_118CD call sub_F7EC loc_118CD: pop di pop si pop bp retn midboss5_render endp playfield_tram_loop_func _playfield_tram_wipe, near, playfield_tram_loop_func _playfield_tram_black, near, ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_11914 proc near var_1 = byte ptr -1 enter 2, 0 push si push di cmp byte_2288A, 48h ; 'H' jb short loc_1195D call _playfield_tram_wipe les bx, _resident assume es:nothing cmp es:[bx+resident_t.demo_num], 0 jz short loc_11936 cmp es:[bx+resident_t.demo_num], 5 jnz short loc_1193E loc_11936: mov _overlay_text, offset popup_titles_update_and_render jmp short loc_11956 ; --------------------------------------------------------------------------- loc_1193E: mov _overlay_text, offset nullfunc_near call gaiji_putsa pascal, (18 shl 16) + 12, ds, offset gDEMO_PLAY, TX_YELLOW + TX_BLINK loc_11956: mov _popup_titles_frame, 0 jmp short loc_119AD ; --------------------------------------------------------------------------- loc_1195D: mov al, byte_2288A mov ah, 0 mov bx, 8 cwd idiv bx or dx, dx jnz short loc_119A9 mov al, byte_2288A mov ah, 0 cwd idiv bx mov [bp+var_1], al cmp [bp+var_1], 0 jz short loc_119A9 mov si, 1 jmp short loc_119A4 ; --------------------------------------------------------------------------- loc_11982: mov di, 4 jmp short loc_1199E ; --------------------------------------------------------------------------- loc_11987: push di push si mov al, [bp+var_1] mov ah, 0 mov dx, 40h sub dx, ax push dx push TX_BLACK call gaiji_putca add di, 2 loc_1199E: cmp di, 52 jl short loc_11987 inc si loc_119A4: cmp si, 24 jl short loc_11982 loc_119A9: inc byte_2288A loc_119AD: pop di pop si leave retn sub_11914 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_119B1 proc near var_1 = byte ptr -1 enter 2, 0 push si push di cmp byte_2288A, 0 jnz short loc_119C9 call _playfield_tram_black mov _overlay_text, offset nullfunc_near jmp short loc_11A19 ; --------------------------------------------------------------------------- loc_119C9: dec byte_2288A mov al, byte_2288A mov ah, 0 mov bx, 8 cwd idiv bx or dx, dx jnz short loc_11A19 mov al, byte_2288A mov ah, 0 cwd idiv bx mov [bp+var_1], al cmp [bp+var_1], 0 jz short loc_11A19 mov si, 1 jmp short loc_11A14 ; --------------------------------------------------------------------------- loc_119F2: mov di, 4 jmp short loc_11A0E ; --------------------------------------------------------------------------- loc_119F7: push di push si mov al, [bp+var_1] mov ah, 0 mov dx, 40h sub dx, ax push dx push TX_BLACK call gaiji_putca add di, 2 loc_11A0E: cmp di, 52 jl short loc_119F7 inc si loc_11A14: cmp si, 24 jl short loc_119F2 loc_11A19: pop di pop si leave retn sub_119B1 endp main_0_TEXT ends POPUP_TITLES_INVALIDATE procdesc near POPUP_TITLES_UPDATE_AND_RENDER procdesc near POPUP_BOSS_BGM_UPDATE_AND_RENDER procdesc near main_01_TEXT segment byte public 'CODE' use16 include th04/main/hud/popup.asm include th04/main/player/pos_update_and_clamp.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_12017 proc near var_1 = byte ptr -1 enter 2, 0 dec _miss_time cmp _miss_time, MISS_ANIM_FRAMES ja locret_12148 cmp _miss_time, MISS_ANIM_FRAMES jnz short loc_12092 mov _player_pos.velocity.x, 0 mov _player_pos.velocity.y, 0 mov _power_overflow_level, 0 mov _miss_explosion_radius, 0 call items_miss_add mov al, _power mov ah, 0 mov bx, 4 cwd idiv bx mov [bp+var_1], al cmp [bp+var_1], 10h jbe short loc_12064 mov [bp+var_1], 10h loc_12064: mov al, [bp+var_1] sub _power, al nopcall sub_E4FC call snd_se_play pascal, 2 cmp _playperf, 38 jbe short loc_12083 mov _playperf, 38 loc_12083: push 4 nopcall playperf_lower les bx, _resident inc es:[bx+resident_t.miss_count] loc_12092: cmp _dream, 2 jbe short loc_120B1 cmp _boss_phase, 0 jz short loc_120A7 cmp _stage_frame_mod2, 0 jz short loc_120B6 loc_120A7: mov al, _dream add al, -2 mov _dream, al jmp short loc_120B6 ; --------------------------------------------------------------------------- loc_120B1: mov _dream, 1 loc_120B6: nopcall hud_dream_put add _miss_explosion_radius, MISS_EXPLOSION_RADIUS_VELOCITY mov al, _miss_explosion_angle add al, MISS_EXPLOSION_ANGLE_VELOCITY mov _miss_explosion_angle, al cmp _miss_time, MISS_ANIM_FRAMES - MISS_ANIM_FLASH_AT jnb short locret_12148 cmp _lives, 1 jbe short loc_120F0 test _miss_time, 1 jz short loc_120E5 mov PaletteTone, 150 jmp short loc_120EB ; --------------------------------------------------------------------------- loc_120E5: mov PaletteTone, 100 loc_120EB: mov _palette_changed, 1 loc_120F0: cmp _miss_time, 0 jnz short locret_12148 mov _player_pos.cur.x, 192 * 16 mov _player_pos.prev.x, 192 * 16 mov _player_pos.cur.y, 368 * 16 mov _player_pos.prev.y, 368 * 16 mov _player_pos.velocity.x, 0 mov _player_pos.velocity.y, -32 cmp _lives, 1 jbe short loc_12142 dec _lives nopcall sub_10407 les bx, _resident mov al, es:[bx+resident_t.credit_bombs] mov _bombs, al nopcall sub_104BB mov _bullet_clear_time, 32 leave retn ; --------------------------------------------------------------------------- loc_12142: call sub_F976 mov byte_25FE8, al locret_12148: leave retn sub_12017 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1214A proc near var_1 = byte ptr -1 enter 2, 0 push si cmp _player_invincibility_time, 0 jz short loc_12161 dec _player_invincibility_time mov _player_is_hit, 0 jmp short loc_12188 ; --------------------------------------------------------------------------- loc_12161: cmp _player_is_hit, 0 jz short loc_12188 mov _miss_time, MISS_ANIM_FRAMES + DEATHBOMB_WINDOW mov _player_is_hit, 0 mov _player_invincibility_time, MISS_INVINCIBILITY_FRAMES mov byte_2CEBD, 48h ; 'H' mov _player_pos.velocity.x, 0 mov _player_pos.velocity.y, 0 loc_12188: cmp byte_2CEBD, 0 jnz loc_12224 mov _player_pos.velocity.x, 0 mov _player_pos.velocity.y, 0 mov ax, _key_det and ax, INPUT_MOVEMENT mov si, ax mov [bp+var_1], 1 loc_121A9: call player_move pascal, si or al, al jnz short loc_121CA cmp [bp+var_1], 0 jz short loc_121CA cmp word_2CE9E, si jz short loc_121CA mov ax, word_2CE9E not ax and si, ax mov [bp+var_1], 0 jmp short loc_121A9 ; --------------------------------------------------------------------------- loc_121CA: cmp _shiftkey, 0 jz short loc_121E7 mov ax, _player_pos.velocity.x cwd sub ax, dx sar ax, 1 mov _player_pos.velocity.x, ax mov ax, _player_pos.velocity.y cwd sub ax, dx sar ax, 1 mov _player_pos.velocity.y, ax loc_121E7: call player_pos_update_and_clamp cmp [bp+var_1], 0 jz short loc_121F4 mov word_2CE9E, si loc_121F4: test _key_det.lo, low INPUT_SHOT jz short loc_12207 cmp _shot_time, 0 jnz short loc_12207 mov _shot_time, SHOT_CYCLE_FRAMES loc_12207: cmp _shot_time, SHOT_CYCLE_FRAMES jbe short loc_12213 mov _shot_time, 0 loc_12213: cmp _shot_time, 0 jz short loc_1222E call _playchar_shot_func dec _shot_time jmp short loc_1222E ; --------------------------------------------------------------------------- loc_12224: push offset _player_pos call _motion_update_1 dec byte_2CEBD loc_1222E: mov eax, _player_option_pos_cur mov _player_option_pos_prev, eax mov eax, _player_pos.cur mov _player_option_pos_cur, eax mov ax, _player_pos.velocity.x sub _player_option_pos_cur.x, ax mov ax, _player_pos.velocity.y sub _player_option_pos_cur.y, ax test _key_det.lo, low INPUT_BOMB jz short loc_12256 call player_bomb loc_12256: cmp _miss_time, 0 jz short loc_12260 call sub_12017 loc_12260: pop si leave retn sub_1214A endp include th04/main/player/render.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_123AD proc near @@i = word ptr -2 enter 2, 0 push si push di mov _tile_invalidate_box.x, 16 mov _tile_invalidate_box.y, 16 mov si, offset _shots mov di, offset _hitshots mov [bp+@@i], 0 jmp short loc_123E0 ; --------------------------------------------------------------------------- loc_123CC: cmp [si+shot_t.flag], 0 jz short loc_123DA call tiles_invalidate_around pascal, [si+shot_t.pos.prev.y], [si+shot_t.pos.prev.x] loc_123DA: inc [bp+@@i] add si, size shot_t loc_123E0: cmp [bp+@@i], SHOT_COUNT jl short loc_123CC mov [bp+@@i], 0 jmp short @@hitshot_more? ; --------------------------------------------------------------------------- @@hitshot_loop: cmp [di+hitshot_t.HITSHOT_age], 0 jz short @@hitshot_next call tiles_invalidate_around pascal, [di+hitshot_t.pos.prev.y], [di+hitshot_t.pos.prev.x] @@hitshot_next: inc [bp+@@i] add di, size hitshot_t @@hitshot_more?: cmp [bp+@@i], HITSHOT_COUNT jl short @@hitshot_loop pop di pop si leave retn sub_123AD endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1240B proc near var_5 = byte ptr -5 @@sa = word ptr -4 @@i = word ptr -2 enter 6, 0 push si push di mov _shots_alive_count, 0 mov si, offset _shots mov [bp+@@sa], offset _shots_alive mov [bp+@@i], 0 jmp loc_12537 ; --------------------------------------------------------------------------- loc_12427: cmp byte ptr [si], 2 jnz short loc_12432 mov byte ptr [si], 0 jmp loc_12531 ; --------------------------------------------------------------------------- loc_12432: cmp byte ptr [si], 0 jz loc_12531 cmp byte ptr [si], 1 jnz loc_124FA mov al, [si+shot_t.SHOT_type] mov ah, 0 dec ax mov bx, ax cmp bx, 3 ja loc_124FA add bx, bx jmp word ptr cs:table_1259B[bx] shots_update_homing: cmp byte ptr [si+1], 10h jb short loc_12460 mov [si+shot_t.SHOT_type], ST_NORMAL loc_12460: cmp _homing_target.x, SUBPIXEL_NONE jz loc_124FA mov ax, _homing_target.y sub ax, [si+4] push ax mov ax, _homing_target.x sub ax, [si+2] push ax call iatan2 mov dl, [si+11h] sub dl, al mov [bp+var_5], dl cmp [bp+var_5], 80h jb short loc_124B0 mov al, [bp+var_5] mov ah, 0 push ax mov ax, 100h pop dx sub ax, dx mov bx, 4 cwd idiv bx mov [bp+var_5], al cmp [bp+var_5], 3 jnb short loc_124A8 jmp short loc_124C4 ; --------------------------------------------------------------------------- loc_124A8: mov al, [bp+var_5] add [si+11h], al jmp short loc_124E2 ; --------------------------------------------------------------------------- loc_124B0: mov al, [bp+var_5] mov ah, 0 mov bx, 4 cwd idiv bx mov [bp+var_5], al cmp [bp+var_5], 3 jnb short loc_124DC loc_124C4: mov ax, _homing_target.y sub ax, [si+4] push ax mov ax, _homing_target.x sub ax, [si+2] push ax call iatan2 mov [si+11h], al jmp short loc_124E2 ; --------------------------------------------------------------------------- loc_124DC: mov al, [bp+var_5] sub [si+11h], al loc_124E2: lea ax, [si+0Ah] push ax push word ptr [si+11h] call shot_velocity_set jmp short loc_124FA ; --------------------------------------------------------------------------- shots_update_missile_left: inc word ptr [si+0Ah] jmp short shots_update_missile_straight ; --------------------------------------------------------------------------- shots_update_missile_right: dec word ptr [si+0Ah] shots_update_missile_straight: sub word ptr [si+0Ch], 4 loc_124FA: lea ax, [si+2] call _motion_update_1 pascal, ax cmp ax, (-(SHOT_W / 2) shl 4) jle short loc_12516 cmp ax, ((PLAYFIELD_W + (SHOT_W / 2)) shl 4) jge short loc_12516 cmp dx, (-(SHOT_H / 2) shl 4) jle short loc_12516 cmp dx, ((PLAYFIELD_H + (SHOT_H / 2)) shl 4) jl short loc_1251B loc_12516: mov byte ptr [si], 2 jmp short loc_12531 ; --------------------------------------------------------------------------- loc_1251B: mov bx, [bp+@@sa] mov [bx+shot_alive_t.SA_pos.x], ax mov [bx+shot_alive_t.SA_pos.y], dx mov [bx+shot_alive_t.SA_shot], si add [bp+@@sa], size shot_alive_t inc _shots_alive_count inc byte ptr [si+1] loc_12531: inc [bp+@@i] add si, size shot_t loc_12537: cmp [bp+@@i], SHOT_COUNT jl loc_12427 mov di, offset _hitshots mov [bp+@@i], 0 jmp short @@hitshot_more? ; --------------------------------------------------------------------------- @@hitshot_loop: cmp [di+hitshot_t.HITSHOT_age], HITSHOT_AGE_MAX jb short @@hitshot_active? mov [di+hitshot_t.HITSHOT_age], 0 @@hitshot_active?: cmp [di+hitshot_t.HITSHOT_age], 0 jz short @@hitshot_next lea ax, [di+hitshot_t.pos] push ax call _motion_update_1 cmp ax, -(HITSHOT_W / 2) shl 4 jle short @@hitshot_clipped cmp ax, (PLAYFIELD_W + (HITSHOT_W / 2)) shl 4 jge short @@hitshot_clipped cmp dx, -(HITSHOT_H / 2) shl 4 jle short @@hitshot_clipped cmp dx, (PLAYFIELD_H + (HITSHOT_H / 2)) shl 4 jl short @@hitshot_update @@hitshot_clipped: mov [di+hitshot_t.HITSHOT_age], HITSHOT_AGE_CLIPPED jmp short @@hitshot_next ; --------------------------------------------------------------------------- @@hitshot_update: inc [di+hitshot_t.HITSHOT_age] mov al, [di+hitshot_t.HITSHOT_age] mov ah, 0 mov bx, 3 cwd idiv bx cmp dx, 1 jnz short @@hitshot_next inc [di+hitshot_t.patnum] @@hitshot_next: inc [bp+@@i] add di, size hitshot_t @@hitshot_more?: cmp [bp+@@i], HITSHOT_COUNT jl short @@hitshot_loop pop di pop si leave retn sub_1240B endp ; --------------------------------------------------------------------------- table_1259B dw shots_update_homing dw shots_update_missile_left dw shots_update_missile_right dw shots_update_missile_straight ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public SHOTS_RENDER shots_render proc near @@shot = word ptr -4 @@i = word ptr -2 enter 4, 0 push si push di mov ax, GRAM_400 mov es, ax assume es:nothing call _grcg_setmode_rmw_seg1 mov di, offset _shots_alive mov [bp+@@i], 0 jmp short @@shots_more? ; --------------------------------------------------------------------------- @@shot_loop: cmp [di+shot_alive_t.SA_pos.x], SUBPIXEL_NONE jz short @@shot_next mov ax, [di+shot_alive_t.SA_shot] mov [bp+@@shot], ax mov ch, 0 mov bx, [bp+@@shot] mov cl, [bx+shot_t.patnum_base] mov al, [bx+shot_t.SHOT_age] and al, 1 add al, cl mov cl, al mov ax, [di+shot_alive_t.SA_pos.y] add ax, ((PLAYFIELD_TOP - (SHOT_H / 2)) shl 4) call scroll_subpixel_y_to_vram_seg1 pascal, ax mov dx, ax mov ax, [di+shot_alive_t.SA_pos.x] sar ax, 4 add ax, (PLAYFIELD_LEFT - (SHOT_W / 2)) call z_super_roll_put_tiny_16x16_raw pascal, cx @@shot_next: inc [bp+@@i] add di, size shot_alive_t @@shots_more?: mov ax, [bp+@@i] cmp ax, _shots_alive_count jb short @@shot_loop mov si, offset _hitshots mov [bp+@@i], 0 jmp short @@hitshot_more? ; --------------------------------------------------------------------------- @@hitshot_loop: cmp [si+hitshot_t.HITSHOT_age], HITSHOT_AGE_MAX jnb short @@hitshot_next cmp [si+hitshot_t.HITSHOT_age], 0 jbe short @@hitshot_next mov ch, 0 mov cl, [si+hitshot_t.patnum] mov ax, [si+hitshot_t.pos.cur.y] add ax, ((PLAYFIELD_TOP - (HITSHOT_H / 2)) shl 4) call scroll_subpixel_y_to_vram_seg1 pascal, ax mov dx, ax mov ax, [si+hitshot_t.pos.cur.x] sar ax, 4 add ax, PLAYFIELD_LEFT - (HITSHOT_W / 2) call z_super_roll_put_tiny_16x16_raw pascal, cx @@hitshot_next: inc [bp+@@i] add si, size hitshot_t @@hitshot_more?: cmp [bp+@@i], HITSHOT_COUNT jl short @@hitshot_loop GRCG_OFF_CLOBBERING dx pop di pop si leave retn shots_render endp include th05/main/player/hitshot_from.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_126B3 proc far var_B = byte ptr -0Bh var_A = word ptr -0Ah var_8 = word ptr -8 var_6 = word ptr -6 var_4 = word ptr -4 @@i = word ptr -2 enter 0Ch, 0 push si push di mov ax, _shot_hitbox_center.x sub ax, _shot_hitbox_radius.x mov [bp+var_4], ax mov ax, _shot_hitbox_center.y sub ax, _shot_hitbox_radius.y mov [bp+var_6], ax mov ax, _shot_hitbox_radius.x add ax, ax mov [bp+var_8], ax mov ax, _shot_hitbox_radius.y add ax, ax mov [bp+var_A], ax xor si, si mov [bp+var_B], 0 mov di, offset _shots_alive mov [bp+@@i], 0 jmp short @@shots_more? ; --------------------------------------------------------------------------- @@shot_loop: mov ax, [di+shot_alive_t.SA_pos.x] sub ax, [bp+var_4] cmp ax, [bp+var_8] ja short @@shot_next mov ax, [di+shot_alive_t.SA_pos.y] sub ax, [bp+var_6] cmp ax, [bp+var_A] ja short @@shot_next inc [bp+var_B] mov bx, [di+shot_alive_t.SA_shot] mov al, [bx+shot_t.damage] mov ah, 0 mov dl, [bp+var_B] mov dh, 0 push dx cwd pop bx idiv bx or ax, ax jnz short loc_1271E mov ax, 1 loc_1271E: add si, ax inc byte_2D060 test byte_2D060, 1 jz short loc_1273B call sparks_add_random pascal, [di+shot_alive_t.SA_pos.x], [di+shot_alive_t.SA_pos.y], large (((8 shl 4) shl 16) or 1) loc_1273B: call hitshot_from pascal, [di+shot_alive_t.SA_shot] mov [di+shot_alive_t.SA_pos.x], SUBPIXEL_NONE @@shot_next: inc [bp+@@i] add di, size shot_alive_t @@shots_more?: mov ax, [bp+@@i] cmp ax, _shots_alive_count jb short @@shot_loop cmp _bombing, 0 jz short loc_127BD cmp byte_2297E, 0 jz short loc_12769 mov ax, si shr ax, 2 mov si, ax loc_12769: cmp _stage_frame_mod4, 0 jnz short loc_12783 push ( 3 shl 16) or 4 push (15 shl 16) or 3 nopcall select_for_playchar add si, ax loc_12783: cmp _playchar, PLAYCHAR_MARISA jnz short loc_127BD cmp _bomb_frame, 16 jb short loc_127BD cmp _bomb_frame, 80 jnb short loc_127BD mov al, _bomb_frame mov ah, 0 mov bx, 4 cwd idiv bx or dx, dx jnz short loc_127BD mov ax, _player_pos.cur.x sub ax, [bp+var_4] cmp ax, [bp+var_8] ja short loc_127BD mov ax, _player_pos.cur.y cmp ax, [bp+var_6] jb short loc_127BD add si, 16h loc_127BD: cmp byte_2297E, 0 jz short loc_127FA cmp _playchar, PLAYCHAR_REIMU jbe short loc_127D2 cmp _playchar, PLAYCHAR_YUUKA jb short loc_12821 loc_127D2: cmp _stage_id, 6 jnz short loc_127E7 mov ax, 5 imul si mov si, ax mov ax, si shr ax, 2 jmp short loc_12831 ; --------------------------------------------------------------------------- loc_127E7: cmp _playchar, PLAYCHAR_REIMU jnz short loc_12833 mov ax, 8 imul si mov si, ax mov bx, 7 jmp short loc_1282B ; --------------------------------------------------------------------------- loc_127FA: cmp _stage_id, 6 jnz short loc_1281A cmp _playchar, PLAYCHAR_REIMU jnz short loc_1281A mov ax, 4 imul si mov si, ax mov bx, 5 mov ax, si xor dx, dx div bx mov si, ax loc_1281A: cmp _playchar, PLAYCHAR_YUUKA jnz short loc_12833 loc_12821: mov ax, 4 imul si mov si, ax mov bx, 5 loc_1282B: mov ax, si xor dx, dx div bx loc_12831: mov si, ax loc_12833: movzx eax, si add _score_delta, eax mov ax, si pop di pop si leave retf sub_126B3 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_12842 proc far var_B = byte ptr -0Bh var_A = word ptr -0Ah var_8 = word ptr -8 var_6 = word ptr -6 var_4 = word ptr -4 @@i = word ptr -2 enter 0Ch, 0 push si push di mov ax, _shot_hitbox_center.x sub ax, _shot_hitbox_radius.x mov [bp+var_4], ax mov ax, _shot_hitbox_center.y sub ax, _shot_hitbox_radius.y mov [bp+var_6], ax mov ax, _shot_hitbox_radius.x add ax, ax mov [bp+var_8], ax mov ax, _shot_hitbox_radius.y add ax, ax mov [bp+var_A], ax xor di, di mov [bp+var_B], 0 mov si, offset _shots_alive mov [bp+@@i], 0 jmp short @@shots_more? ; --------------------------------------------------------------------------- @@shot_loop: mov ax, [si+shot_alive_t.SA_pos.x] sub ax, [bp+var_4] cmp ax, [bp+var_8] ja short @@shot_next mov ax, [si+shot_alive_t.SA_pos.y] sub ax, [bp+var_6] cmp ax, [bp+var_A] ja short @@shot_next inc [bp+var_B] mov bx, [si+shot_alive_t.SA_shot] mov al, [bx+shot_t.damage] mov ah, 0 mov dl, [bp+var_B] mov dh, 0 push dx cwd pop bx idiv bx or ax, ax jnz short loc_128AD mov ax, 1 loc_128AD: add di, ax inc byte_2D060 test byte_2D060, 1 jz short loc_128CA call sparks_add_random pascal, [si+shot_alive_t.SA_pos.x], [si+shot_alive_t.SA_pos.y], large (((8 shl 4) shl 16) or 1) loc_128CA: cmp _rank, RANK_EASY jnz short loc_128D8 cmp _stage_frame_mod4, 0 jnz short loc_128EA loc_128D8: mov eax, dword ptr [si+shot_alive_t.SA_pos] mov _bullet_template.BT_origin, eax call randring1_next16 mov _bullet_template.BT_angle, al call sub_15DE2 loc_128EA: call hitshot_from pascal, [si+shot_alive_t.SA_shot] mov [si+shot_alive_t.SA_pos.x], SUBPIXEL_NONE @@shot_next: inc [bp+@@i] add si, size shot_alive_t @@shots_more?: mov ax, [bp+@@i] cmp ax, _shots_alive_count jb @@shot_loop movzx eax, di add _score_delta, eax mov ax, di pop di pop si leave retf sub_12842 endp SHOT_L0 procdesc pascal near SHOT_L1 procdesc pascal near SHOT_REIMU_L2 procdesc pascal near SHOT_REIMU_L3 procdesc pascal near SHOT_REIMU_L4 procdesc pascal near SHOT_REIMU_L5 procdesc pascal near SHOT_REIMU_L6 procdesc pascal near SHOT_REIMU_L7 procdesc pascal near SHOT_REIMU_L8 procdesc pascal near SHOT_REIMU_L9 procdesc pascal near SHOT_MARISA_L2 procdesc pascal near SHOT_MARISA_L3 procdesc pascal near SHOT_MARISA_L4 procdesc pascal near SHOT_MARISA_L5 procdesc pascal near SHOT_MARISA_L6 procdesc pascal near SHOT_MARISA_L7 procdesc pascal near SHOT_MARISA_L8 procdesc pascal near SHOT_MARISA_L9 procdesc pascal near SHOT_MIMA_L2 procdesc pascal near SHOT_MIMA_L3 procdesc pascal near SHOT_MIMA_L4 procdesc pascal near SHOT_MIMA_L5 procdesc pascal near SHOT_MIMA_L6 procdesc pascal near SHOT_MIMA_L7 procdesc pascal near SHOT_MIMA_L8 procdesc pascal near SHOT_MIMA_L9 procdesc pascal near SHOT_YUUKA_L2 procdesc pascal near SHOT_YUUKA_L3 procdesc pascal near SHOT_YUUKA_L4 procdesc pascal near SHOT_YUUKA_L5 procdesc pascal near SHOT_YUUKA_L6 procdesc pascal near SHOT_YUUKA_L7 procdesc pascal near SHOT_YUUKA_L8 procdesc pascal near SHOT_YUUKA_L9 procdesc pascal near PLAYER_INVALIDATE procdesc pascal near PLAYER_MOVE procdesc pascal near \ input:word HUD_BAR_PUT procdesc near HUD_SCORE_PUT procdesc near SCORE_UPDATE_AND_RENDER procdesc near BOSS_RESET procdesc near BB_STAGE_LOAD procdesc near BB_STAGE_FREE procdesc near STAGE1_SETUP procdesc near STAGE2_SETUP procdesc near STAGE3_SETUP procdesc near STAGE4_SETUP procdesc near STAGE5_SETUP procdesc near STAGE6_SETUP procdesc near STAGEX_SETUP procdesc near extern SCORE_DELTA_COMMIT:proc main_01_TEXT ends ; =========================================================================== ; Segment type: Pure code seg2 segment word public 'CODE' use16 assume cs:g_seg2 ;org 3 assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing include th03/math/vector2.asm nop include th03/math/vector2_between_plus.asm seg2 ends seg2_ segment word public 'CODE' use16 include th04/snd/pmd_res.asm include th02/snd/mmd_res.asm include th04/snd/detmodes.asm include th04/formats/cdg_put_noalpha.asm include th04/snd/se.asm include th04/formats/cdg_put.asm include th02/exit.asm include th04/math/vector1_at.asm include th04/math/vector2_at.asm include th05/snd/load.asm include th05/snd/kajaint.asm include th02/initmain.asm include th04/hardware/input_sense.asm include th05/hardware/input_held.asm include th05/hardware/input_wait.asm include th05/hardware/frame_delay.asm db 0 include th04/formats/cdg_load.asm seg2_ ends ; =========================================================================== ; Segment type: Pure code main_031_TEXT segment byte public 'CODE' use16 assume cs:main_03 ;org 8 assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing include th04/main/scroll_y_3.asm MOTION_UPDATE_DEF 2 ; =============== S U B R O U T I N E ======================================= public ENEMY_POS_UPDATE enemy_pos_update proc near lea ax, [si+enemy_t.pos] call _motion_update_2 pascal, ax test [si+enemy_t.E_clip], ENEMY_CLIP_X jz short @@clip_y? ; Note that these comparisons abuse underflow to implicitly handle the ; negative direction as well. add ax, ((ENEMY_W / 2) shl 4) cmp ax, ((PLAYFIELD_W + ENEMY_W) shl 4) jnb short @@clip @@clip_y?: test [si+enemy_t.E_clip], ENEMY_CLIP_Y jz short @@on_playfield add dx, ((ENEMY_H / 2) shl 4) cmp dx, ((PLAYFIELD_H + ENEMY_H) shl 4) jnb short @@clip @@on_playfield: clc retn ; --------------------------------------------------------------------------- @@clip: inc _enemies_gone stc retn enemy_pos_update endp ; =============== S U B R O U T I N E ======================================= public ENEMY_VELOCITY_SET enemy_velocity_set proc near lea ax, [si+enemy_t.pos.velocity.x] push ax push word ptr [si+enemy_t.E_angle] xor ah, ah mov al, [si+enemy_t.E_speed] push ax call vector2_near retn enemy_velocity_set endp ; =============== S U B R O U T I N E ======================================= sub_15330 proc near push es call player_angle_from pascal, [si+enemy_t.pos.cur.x], [si+enemy_t.pos.cur.y], word ptr [si+enemy_t.E_angle] mov [si+enemy_t.E_angle], al pop es call enemy_velocity_set retn sub_15330 endp ; =============== S U B R O U T I N E ======================================= sub_15345 proc near push si push di mov cx, size _bullet_template / 2 add si, 28h ; '(' push es push ds pop es assume es:_DATA mov di, offset _bullet_template rep movsw pop es assume es:nothing pop di pop si retn sub_15345 endp ; --------------------------------------------------------------------------- nop ; =============== S U B R O U T I N E ======================================= sub_1535A proc near push si push di mov si, _enemy_cur mov es, _std_seg loc_15364: mov di, [si+enemy_t.E_script] add di, [si+enemy_t.E_script_ip] mov bl, es:[di] mov bh, 0 cmp bx, 3Ah ; ':' ja loc_1575C mov cl, [si+enemy_t.E_cur_instr_frame] mov al, 1 mov ah, es:[di+1] xor dx, dx add bx, bx jmp cs:off_1575F[bx] loc_15388: mov byte ptr [si], 2 mov al, 1 jmp loc_1575C ; --------------------------------------------------------------------------- loc_15390: or cl, cl jnz short loc_153A1 mov ax, es:[di+1] mov [si+enemy_t.E_speed], ah mov [si+enemy_t.E_angle], al call enemy_velocity_set loc_153A1: call enemy_pos_update jb short loc_15388 mov ah, es:[di+3] mov al, 4 jmp loc_15748 ; --------------------------------------------------------------------------- loc_153AF: or cl, cl jnz short loc_153B6 call enemy_velocity_set loc_153B6: call enemy_pos_update jb short loc_15388 mov ah, es:[di+1] mov al, 2 jmp loc_15748 ; --------------------------------------------------------------------------- loc_153C4: or cl, cl jnz short loc_153D2 mov al, es:[di+1] mov [si+enemy_t.E_speed], al call enemy_velocity_set loc_153D2: call enemy_pos_update jb short loc_15388 mov ah, es:[di+2] mov al, 3 jmp loc_15748 ; --------------------------------------------------------------------------- loc_153E0: inc dl loc_153E2: or cl, cl jnz short loc_153F7 mov ax, es:[di+1] mov [si+enemy_t.E_speed], ah mov [si+enemy_t.E_angle], al mov al, es:[di+3] mov [si+enemy_t.E_angle_delta], al loc_153F7: push dx call enemy_velocity_set pop dx or dl, dl jz short loc_15418 mov al, es:[di+4] cbw add [si+enemy_t.pos.velocity.x], ax mov al, es:[di+5] cbw add [si+enemy_t.pos.velocity.y], ax mov ah, es:[di+6] mov al, 7 jmp short loc_1541E ; --------------------------------------------------------------------------- loc_15418: mov ah, es:[di+4] mov al, 5 loc_1541E: jmp short loc_15447 ; --------------------------------------------------------------------------- loc_15420: inc dl loc_15422: call enemy_velocity_set or dl, dl jz short loc_15441 mov al, es:[di+1] cbw add [si+enemy_t.pos.velocity.x], ax mov al, es:[di+2] cbw add [si+enemy_t.pos.velocity.y], ax mov ah, es:[di+3] mov al, 4 jmp short loc_15447 ; --------------------------------------------------------------------------- loc_15441: mov ah, es:[di+1] mov al, 2 loc_15447: push ax call enemy_pos_update pop ax jb loc_15388 mov dl, [si+enemy_t.E_angle_delta] add [si+enemy_t.E_angle], dl jmp loc_15748 ; --------------------------------------------------------------------------- loc_15459: or cl, cl jnz short loc_1547D mov eax, dword ptr [si+enemy_t.pos.cur] mov dword ptr [si+enemy_t.pos.prev], eax jmp short loc_1547D ; --------------------------------------------------------------------------- loc_15467: or cl, cl jnz short loc_15470 mov [si+enemy_t.pos.velocity.x], 0 loc_15470: mov ax, _scroll_last_delta mov [si+enemy_t.pos.velocity.y], ax call enemy_pos_update jb loc_15388 loc_1547D: mov ah, es:[di+1] mov al, 2 jmp loc_15748 ; --------------------------------------------------------------------------- loc_15486: inc dl loc_15488: or cl, cl jnz short loc_15497 mov [si+enemy_t.E_angle], 0 mov al, es:[di+2] mov [si+enemy_t.E_angle_delta], al loc_15497: mov cl, dl movzx eax, byte ptr es:[di+1] mov bl, [si+enemy_t.E_angle] mov bh, 0 add bx, bx movsx edx, _CosTable8[bx] imul eax, edx sar eax, 8 mov [si+enemy_t.pos.velocity.x], ax mov al, es:[di+3] cbw mov [si+enemy_t.pos.velocity.y], ax or cl, cl jnz short loc_154CF mov dx, [si+enemy_t.pos.velocity.x] mov ax, [si+enemy_t.pos.velocity.y] mov [si+enemy_t.pos.velocity.x], ax mov [si+enemy_t.pos.velocity.y], dx loc_154CF: call enemy_pos_update jb loc_15388 mov al, [si+enemy_t.E_angle_delta] add [si+enemy_t.E_angle], al mov ah, es:[di+4] mov al, 5 jmp loc_15748 ; --------------------------------------------------------------------------- loc_154E5: mov ax, es:[di+1] mov [si+enemy_t.E_angle], al mov [si+enemy_t.E_speed], ah call sub_15330 mov al, 3 jmp loc_15740 ; --------------------------------------------------------------------------- loc_154F7: add [si+enemy_t.E_angle], ah jmp short loc_154FF ; --------------------------------------------------------------------------- loc_154FC: add [si+enemy_t.E_speed], ah loc_154FF: call enemy_velocity_set mov al, 2 jmp loc_15740 ; --------------------------------------------------------------------------- loc_15507: call randring2_next16 mov [si+enemy_t.E_angle], al mov al, 1 jmp loc_15740 ; --------------------------------------------------------------------------- loc_15512: mov dl, 2 jmp short loc_15518 ; --------------------------------------------------------------------------- loc_15516: inc dl loc_15518: mov word_23F60, dx call sub_15345 mov ax, [si+enemy_t.pos.cur.x] add _bullet_template.BT_origin.x, ax mov ax, [si+enemy_t.pos.cur.y] add _bullet_template.BT_origin.y, ax push es call _bullet_template_tune mov bx, word_23F60 add bx, bx call off_2129C[bx] pop es mov al, 1 jmp loc_15740 ; --------------------------------------------------------------------------- loc_15542: mov [si+enemy_t.E_autofire], 0 mov [si+enemy_t.E_bullet_template.spawn_type], ah mov ax, es:[di+2] mov [si+enemy_t.E_bullet_template.pattern], al mov [si+enemy_t.E_bullet_template.BT_angle], ah mov ax, es:[di+4] mov [si+enemy_t.E_bullet_template.speed], al mov [si+enemy_t.E_bullet_template.patnum], ah mov al, 6 jmp loc_15740 ; --------------------------------------------------------------------------- loc_15562: mov [si+enemy_t.E_bullet_template.spawn_type], ah jmp short loc_1559C ; --------------------------------------------------------------------------- loc_15567: mov eax, es:[di+1] mov dword ptr [si+enemy_t.E_bullet_template.BT_origin], eax mov al, 5 jmp loc_15740 ; --------------------------------------------------------------------------- loc_15575: mov [si+enemy_t.E_bullet_template.BT_angle], ah jmp short loc_1559C ; --------------------------------------------------------------------------- loc_1557A: add [si+enemy_t.E_bullet_template.BT_angle], ah jmp short loc_1559C ; --------------------------------------------------------------------------- loc_1557F: call randring2_next16 mov [si+enemy_t.E_bullet_template.BT_angle], al mov al, 1 jmp loc_15740 ; --------------------------------------------------------------------------- loc_1558A: mov [si+enemy_t.E_bullet_template.patnum], ah jmp short loc_1559C ; --------------------------------------------------------------------------- loc_1558F: mov [si+enemy_t.E_bullet_template.speed], ah jmp short loc_1559C ; --------------------------------------------------------------------------- loc_15594: add [si+enemy_t.E_bullet_template.speed], ah jmp short loc_1559C ; --------------------------------------------------------------------------- loc_15599: mov [si+enemy_t.E_bullet_template.pattern], ah loc_1559C: mov al, 2 jmp loc_15740 ; --------------------------------------------------------------------------- loc_155A1: mov al, ah xor ah, ah mov dl, _playperf cmp dl, 32 jbe short loc_155C7 sub dl, 32 mul dl shr ax, 6 xor dh, dh mov dl, es:[di+1] sub dx, ax cmp dl, 10h jnb short loc_155E0 mov dl, 10h jmp short loc_155E0 ; --------------------------------------------------------------------------- loc_155C7: mov cl, 32 sub cl, dl mul cl shr ax, 6 xor dh, dh mov dl, es:[di+1] add dx, ax cmp dx, 256 jb short loc_155E0 mov dl, 255 loc_155E0: cmp _rank, RANK_EASY jnz short loc_155E9 mov dl, 255 loc_155E9: mov [si+enemy_t.E_autofire_interval], dl jmp short loc_1559C ; --------------------------------------------------------------------------- loc_155EE: inc dl loc_155F0: mov [si+enemy_t.E_autofire], dl jmp loc_15740 ; --------------------------------------------------------------------------- loc_155F6: mov [si+enemy_t.E_bullet_template.spread], ah mov al, es:[di+2] mov [si+enemy_t.E_bullet_template.spread_angle_delta], al loc_15600: mov al, 3 jmp loc_15740 ; --------------------------------------------------------------------------- loc_15605: mov [si+enemy_t.E_bullet_template.BT_stack], ah mov al, es:[di+2] loc_1560C: mov [si+enemy_t.E_bullet_template.stack_speed_delta], al loc_1560F: jmp short loc_15600 ; --------------------------------------------------------------------------- loc_15611: mov [si+enemy_t.E_bullet_template.BT_special_motion], ah jmp short loc_1559C ; --------------------------------------------------------------------------- loc_15616: push es mov ax, [si+enemy_t.pos.cur.x] add ax, [si+enemy_t.E_bullet_template.BT_origin.x] push ax mov ax, [si+enemy_t.pos.cur.y] add ax, [si+enemy_t.E_bullet_template.BT_origin.y] push ax push word ptr es:[di+1] call player_angle_from mov [si+enemy_t.E_bullet_template.BT_angle], al pop es loc_15630: jmp loc_1559C ; --------------------------------------------------------------------------- loc_15633: inc dl mov [si+enemy_t.flag], dl mov [si+enemy_t.E_patnum_base], ah mov ax, es:[di+2] mov [si+enemy_t.E_hp], ax mov ax, es:[di+4] mov [si+enemy_t.E_score], ax mov [si+enemy_t.E_can_be_damaged], dl mov [si+enemy_t.E_kills_player_on_collision], dl mov al, 6 jmp loc_15740 ; --------------------------------------------------------------------------- loc_15653: mov [si+enemy_t.E_clip], (ENEMY_CLIP_X or ENEMY_CLIP_Y) jmp loc_15740 ; --------------------------------------------------------------------------- loc_1565A: or [si+enemy_t.E_clip], ENEMY_CLIP_X jmp loc_15740 ; --------------------------------------------------------------------------- loc_15661: or [si+enemy_t.E_clip], ENEMY_CLIP_Y jmp loc_15740 ; --------------------------------------------------------------------------- loc_15668: mov [si+enemy_t.E_anim_cels], ah mov al, es:[di+2] mov [si+enemy_t.E_anim_frames_per_cel], al mov al, 3 jmp loc_15740 ; --------------------------------------------------------------------------- loc_15677: mov al, ah mov ah, 0 call snd_se_play pascal, ax loc_15681: mov al, 2 jmp loc_15740 ; --------------------------------------------------------------------------- loc_15686: mov [si+enemy_t.E_patnum_base], ah jmp short loc_15681 ; --------------------------------------------------------------------------- loc_1568B: mov [si+enemy_t.E_can_be_damaged], dl loc_1568E: mov [si+enemy_t.E_autofire], dl jmp loc_15740 ; --------------------------------------------------------------------------- loc_15694: mov [si+enemy_t.E_can_be_damaged], 1 cmp _rank, RANK_LUNATIC jnz short loc_1568E inc dl jmp short loc_1568E ; --------------------------------------------------------------------------- loc_156A3: inc dl loc_156A5: mov [si+enemy_t.E_kills_player_on_collision], dl jmp loc_15740 ; --------------------------------------------------------------------------- loc_156AB: mov eax, dword ptr [si+enemy_t.pos.cur] mov dword ptr [si+enemy_t.pos.prev], eax mov eax, es:[di+1] mov dword ptr [si+enemy_t.pos.cur], eax jmp short loc_156D4 ; --------------------------------------------------------------------------- loc_156BE: mov eax, dword ptr [si+enemy_t.pos.cur] mov dword ptr [si+enemy_t.pos.prev], eax mov ax, es:[di+1] add [si+enemy_t.pos.cur.x], ax mov ax, es:[di+3] add [si+enemy_t.pos.cur.y], ax loc_156D4: mov ah, 0 mov al, 5 jmp short loc_15748 ; --------------------------------------------------------------------------- loc_156DA: add [si+enemy_t.E_patnum_base], ah mov al, 2 jmp short loc_15740 ; --------------------------------------------------------------------------- loc_156E1: mov [si+enemy_t.E_angle], ah mov al, es:[di+2] mov [si+enemy_t.E_speed], al loc_156EB: call enemy_velocity_set mov al, 3 jmp short loc_15740 ; --------------------------------------------------------------------------- loc_156F2: mov [si+enemy_t.E_angle], ah mov al, es:[di+2] mov [si+enemy_t.E_speed], al cmp [si+enemy_t.E_spawned_in_left_half], 0 jnz short loc_156EB mov al, 80h sub al, ah mov [si+enemy_t.E_angle], al jmp short loc_156EB ; --------------------------------------------------------------------------- loc_1570B: mov [si+enemy_t.E_speed], ah call enemy_velocity_set mov al, 2 jmp short loc_15740 ; --------------------------------------------------------------------------- loc_15715: mov al, [si+enemy_t.E_loop_i] cmp al, es:[di+2] jb short loc_15726 mov [si+enemy_t.E_loop_i], 0 mov al, 3 jmp short loc_15740 ; --------------------------------------------------------------------------- loc_15726: inc [si+enemy_t.E_loop_i] loc_15729: mov al, ah mov ah, 0 loc_1572D: sub [si+enemy_t.E_script_ip], ax jmp loc_15364 ; --------------------------------------------------------------------------- loc_15733: mov al, 3 cmp ah, [si+enemy_t.E_subtype] jz short loc_15740 add al, es:[di+2] jz short $+2 loc_15740: mov ah, 0 add [si+enemy_t.E_script_ip], ax jmp loc_15364 ; --------------------------------------------------------------------------- loc_15748: cmp ah, [si+enemy_t.E_cur_instr_frame] ja short loc_15757 mov ah, 0 mov [si+enemy_t.E_cur_instr_frame], ah add [si+enemy_t.E_script_ip], ax jmp short loc_1575A ; --------------------------------------------------------------------------- loc_15757: inc [si+enemy_t.E_cur_instr_frame] loc_1575A: xor ax, ax loc_1575C: pop di pop si retn sub_1535A endp ; --------------------------------------------------------------------------- off_1575F dw offset loc_15388 dw offset loc_15633 dw offset loc_15390 dw offset loc_153AF dw offset loc_153C4 dw offset loc_153E2 dw offset loc_153E0 dw offset loc_15422 dw offset loc_15420 dw offset loc_15459 dw offset loc_15467 dw offset loc_15486 dw offset loc_15488 dw offset loc_154E5 dw offset loc_154F7 dw offset loc_154FC dw offset loc_15507 dw offset loc_15518 dw offset loc_15542 dw offset loc_15562 dw offset loc_15567 dw offset loc_15575 dw offset loc_1557A dw offset loc_1557F dw offset loc_1558A dw offset loc_1558F dw offset loc_15594 dw offset loc_15599 dw offset loc_155A1 dw offset loc_155EE dw offset loc_155F0 dw offset loc_1557A dw offset loc_155F6 dw offset loc_15605 dw offset loc_1565A dw offset loc_15661 dw offset loc_15653 dw offset loc_15668 dw offset loc_15677 dw offset loc_15686 dw offset loc_1568B dw offset loc_15694 dw offset loc_156A5 dw offset loc_156A3 dw offset loc_156AB dw offset loc_156BE dw offset loc_156DA dw offset loc_156E1 dw offset loc_156F2 dw offset loc_1570B dw offset loc_15715 dw offset loc_15715 dw offset loc_15733 dw offset loc_15729 dw offset loc_153B6 dw offset loc_15512 dw offset loc_15611 dw offset loc_15516 dw offset loc_15616 ; --------------------------------------------------------------------------- nop RANDRING_NEXT_DEF 2 db 0 include th04/main/gather_point_render.asm include th04/main/pointnum/add.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_158CC proc far push bp mov bp, sp call sparks_add_circle pascal, _player_pos.cur.x, _player_pos.cur.y, large (((12 shl 4) shl 16) or 24) pop bp retf sub_158CC endp include th04/math/vector2_near.asm nop include th04/main/sparks_add.asm include th05/main/bullet/patnum_for_angle.asm GRCG_SETCOLOR_DIRECT_DEF 3 GRCG_SETMODE_RMW_DEF 3 include th05/main/player/angle.asm include th05/main/playperf_adjust_speed.asm ; =============== S U B R O U T I N E ======================================= sub_15A5C proc near cmp _bullet_clear_trigger, 0 jnz short locret_15A6E push word ptr _bullet_template.BT_angle call loc_15C94 pop word ptr _bullet_template.BT_angle locret_15A6E: retn sub_15A5C endp ; --------------------------------------------------------------------------- nop ; =============== S U B R O U T I N E ======================================= sub_15A70 proc near cmp _bullet_clear_trigger, 0 jnz short locret_15A8C mov byte_221C0, 1 push word ptr _bullet_template.BT_angle call loc_15C94 pop word ptr _bullet_template.BT_angle mov byte_221C0, 0 locret_15A8C: retn sub_15A70 endp ; --------------------------------------------------------------------------- nop ; =============== S U B R O U T I N E ======================================= sub_15A8E proc near mov byte_25346, 1 call sub_15A5C mov byte_25346, 0 retn sub_15A8E endp ; =============== S U B R O U T I N E ======================================= sub_15A9C proc near mov byte_25346, 1 call sub_15A70 mov byte_25346, 0 retn sub_15A9C endp ; =============== S U B R O U T I N E ======================================= sub_15AAA proc near push si push di xor si, si mov ch, byte_25348 mov cl, _bullet_template.speed loc_15AB6: mov bl, _bullet_template.pattern xor bh, bh cmp bx, BP_FORCESINGLE_AIMED mov di, 1 ja @@static xor di, di add bx, bx mov ax, cs:off_15C16[bx] mov bl, _bullet_template.spread mov bh, _bullet_template.BT_stack or bl, bl jnz short loc_15ADD inc bl loc_15ADD: jmp ax ; --------------------------------------------------------------------------- @@single_aimed: inc di jmp @@aim ; --------------------------------------------------------------------------- @@single: inc di jmp @@static ; --------------------------------------------------------------------------- @@spread_or_ring_stack: xor ah, ah mov al, ch div bl mov dl, _bullet_template.stack_speed_delta mul dl add cl, al mov al, bl mul bh dec al cmp al, ch ja short loc_15B00 inc di loc_15B00: xor ah, ah mov al, ch div bl mov ch, ah cmp _bullet_template.pattern, BP_RING_STACK jz short loc_15B83 cmp _bullet_template.pattern, BP_RING_STACK_AIMED jz short loc_15B83 jmp short loc_15B21 ; --------------------------------------------------------------------------- @@spread: mov al, bl dec al cmp al, ch ja short loc_15B21 inc di loc_15B21: xor ah, ah test bl, 1 jz short loc_15B4F or ch, ch jnz short loc_15B33 mov angle_25347, 0 jmp short loc_15B66 ; --------------------------------------------------------------------------- loc_15B33: test ch, 1 jz short loc_15B46 loc_15B38: mov al, _bullet_template.spread_angle_delta add angle_25347, al mov al, angle_25347 mov si, ax jmp short loc_15B66 ; --------------------------------------------------------------------------- loc_15B46: mov al, angle_25347 neg al mov si, ax jmp short loc_15B66 ; --------------------------------------------------------------------------- loc_15B4F: or ch, ch jnz short loc_15B5F mov al, _bullet_template.spread_angle_delta shr al, 1 mov angle_25347, al mov si, ax jmp short loc_15B66 ; --------------------------------------------------------------------------- loc_15B5F: test ch, 1 jnz short loc_15B46 jmp short loc_15B38 ; --------------------------------------------------------------------------- loc_15B66: cmp _bullet_template.pattern, BP_SPREAD jz @@static cmp _bullet_template.pattern, BP_SPREAD_STACK jz @@static jmp short @@aim ; --------------------------------------------------------------------------- @@ring: mov al, bl dec al cmp al, ch ja short loc_15B83 inc di loc_15B83: xor al, al mov ah, ch div bl xor ah, ah mov si, ax cmp _bullet_template.pattern, BP_RING jz short @@static cmp _bullet_template.pattern, BP_RING_STACK jz short @@static jmp short @@aim ; --------------------------------------------------------------------------- @@random_angle_and_speed: mov si, _randring_p mov al, _randring[si] inc byte ptr _randring_p and al, 1Fh add cl, al @@random_angle: inc ch cmp ch, bl jb short loc_15BB4 inc di loc_15BB4: mov si, _randring_p mov si, word ptr _randring[si] and si, 255 inc byte ptr _randring_p jmp short @@static ; --------------------------------------------------------------------------- @@stack: 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, (10 shl 4) jb short loc_15BDB loc_15BDA: inc di loc_15BDB: cmp _bullet_template.pattern, BP_STACK jz short @@static @@aim: mov byte_2534A, cl call player_angle_from pascal, _bullet_template.BT_origin.x, _bullet_template.BT_origin.y, si mov cl, byte_2534A mov si, ax @@static: push offset point_2534B mov ax, si add al, _bullet_template.BT_angle push ax mov angle_25349, al mov byte_2534A, cl mov al, cl mov ah, 0 push ax call vector2_near mov ax, di pop di pop si retn ; --------------------------------------------------------------------------- off_15C16 dw offset @@single dw offset @@single_aimed dw offset @@spread dw offset @@spread dw offset @@ring dw offset @@ring dw offset @@stack dw offset @@stack dw offset @@spread_or_ring_stack dw offset @@spread_or_ring_stack dw offset @@spread_or_ring_stack dw offset @@spread_or_ring_stack dw offset @@random_angle dw offset @@random_angle_and_speed dw offset @@single dw offset @@single_aimed sub_15AAA endp ; =============== S U B R O U T I N E ======================================= sub_15C36 proc near cmp _bullet_clear_time, 0 jz short loc_15C47 cmp _bullet_clear_time, 17 jnb short loc_15C47 loc_15C44: mov al, 1 retn ; --------------------------------------------------------------------------- loc_15C47: 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) jge short loc_15C44 cmp dx, (-8 shl 4) jle short loc_15C44 cmp dx, ((PLAYFIELD_H + 8) shl 4) jge short loc_15C44 sub ax, _player_pos.cur.x add ax, 4 * 16 cmp ax, 8 * 16 ja short loc_15C81 sub dx, _player_pos.cur.y add dx, 4 * 16 cmp dx, 8 * 16 ja short loc_15C81 mov _player_is_hit, 1 loc_15C81: cmp byte_25346, 0 jnz short loc_15C91 mov al, _bullet_template.speed call @playperf_adjust_speed mov _bullet_template.speed, al loc_15C91: mov al, 0 retn sub_15C36 endp ; --------------------------------------------------------------------------- loc_15C94 proc near cmp _bullet_template.spawn_type, BST_GATHER_PELLET or BST_SLOWDOWN jz short loc_15CA2 cmp _bullet_template.spawn_type, BST_GATHER_PELLET jnz short loc_15CE5 loc_15CA2: mov eax, _bullet_template.BT_origin mov _gather_template.GT_center, eax mov _gather_template.GT_velocity, 0 mov _gather_template.GT_radius, (64 shl 4) mov _gather_template.GT_angle_delta, 2 mov _gather_template.GT_col, 9 mov _gather_template.GT_ring_points, 8 push word ptr _bullet_template.spawn_type dec _bullet_template.spawn_type cmp byte_221C0, 0 jz short loc_15CDD mov _bullet_template.spawn_type, BST_GATHER_NORMAL_SPECIAL_MOVE loc_15CDD: call _gather_add_bullets pop word ptr _bullet_template.spawn_type locret_15CE4: retn ; --------------------------------------------------------------------------- loc_15CE5: call sub_15C36 or al, al jnz short locret_15CE4 push si push di cmp _bullet_template.patnum, 0 jnz short loc_15CFD mov si, offset _pellets[(PELLET_COUNT - 1) * size bullet_t] mov di, PELLET_COUNT jmp short loc_15D03 ; --------------------------------------------------------------------------- loc_15CFD: mov si, offset _bullets16[(BULLET16_COUNT - 1) * size bullet_t] mov di, BULLET16_COUNT loc_15D03: mov dl, BSS_GRAZEABLE mov al, _bullet_template.spawn_type and al, (BST_SLOWDOWN - 1) cmp al, BST_CLOUD_BACKWARDS jz short loc_15D16 cmp al, BST_CLOUD_FORWARDS jnz short loc_15D18 mov dl, BSS_CLOUD_FORWARDS jmp short loc_15D18 ; --------------------------------------------------------------------------- loc_15D16: mov dl, BSS_CLOUD_BACKWARDS loc_15D18: cmp byte_221C0, 0 jnz short loc_15D38 mov al, BMS_NORMAL cmp _bullet_template.speed, (4 shl 4) jb short loc_15D2F cmp _bullet_clear_time, 0 jz short loc_15D38 loc_15D2F: test _bullet_template.spawn_type, BST_SLOWDOWN jnz short loc_15D38 xor al, al loc_15D38: mov cs:@@spawn_state, dl mov cs:@@move_state, al mov byte_25348, 0 jmp short $+2 loc_15D48: cmp [si+bullet_t.flag], 0 jnz loc_15DD7 mov [si+bullet_t.flag], 1 @@spawn_state = byte ptr $+3 mov [si+bullet_t.spawn_state], 123 mov eax, _bullet_template.BT_origin mov dword ptr [si+bullet_t.pos.cur], eax cmp byte_221C0, 0 jnz short loc_15D78 @@move_state = byte ptr $+3 mov [si+bullet_t.move_state], 123 mov [si+bullet_t.slowdown_time], BMS_SLOWDOWN_FRAMES mov al, BMS_SLOWDOWN_BASE_SPEED sub al, _bullet_template.speed mov [si+bullet_t.slowdown_speed_delta], al jmp short loc_15D95 ; --------------------------------------------------------------------------- loc_15D78: mov dword ptr [si+bullet_t.BULLET_origin], eax mov [si+bullet_t.move_state], BMS_SPECIAL mov [si+bullet_t.distance], 0 mov [si+bullet_t.turn_count], 0 mov al, byte_2C977 mov [si+bullet_t.turn_angle], al mov al, _bullet_template.BT_special_motion mov [si+bullet_t.special_motion], al loc_15D95: mov [si+bullet_t.age], 0 mov al, _bullet_template.pattern mov [si+bullet_t.from_pattern], al call sub_15AAA mov cl, al mov al, _bullet_template.patnum mov ah, 0 cmp al, PAT_BULLET16_D jb short loc_15DB5 call bullet_patnum_for_angle pascal, ax, word ptr angle_25349 loc_15DB5: mov [si+bullet_t.BULLET_patnum], ax mov eax, point_2534B mov dword ptr [si+bullet_t.pos.velocity], eax mov al, angle_25349 mov [si+bullet_t.BULLET_angle], al mov al, byte_2534A mov [si+bullet_t.speed_final], al mov [si+bullet_t.speed_cur], al or cl, cl jnz short loc_15DDF inc byte_25348 loc_15DD7: sub si, size bullet_t dec di jnz loc_15D48 loc_15DDF: pop di pop si retn loc_15C94 endp ; =============== S U B R O U T I N E ======================================= sub_15DE2 proc far call sub_15A5C retf sub_15DE2 endp main_031_TEXT ends main_032_TEXT segment byte public 'CODE' use16 BULLET_TEMPLATE_TUNE_EASY procdesc near BULLET_TEMPLATE_TUNE_NORMAL procdesc near BULLET_TEMPLATE_TUNE_HARD procdesc near BULLET_TEMPLATE_TUNE_LUNATIC procdesc near ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public ENEMIES_ADD enemies_add proc near @@center_y = word ptr -4 @@i = word ptr -2 enter 4, 0 push si push di les bx, _std_ip mov di, es:[bx+1] mov ax, es:[bx+3] mov [bp+@@center_y], ax mov si, offset _enemies mov [bp+@@i], 0 jmp @@more? ; --------------------------------------------------------------------------- @@loop: cmp [si+enemy_t.flag], EF_FREE jnz @@next mov [si+enemy_t.flag], EF_ALIVE_FIRST_FRAME mov [si+enemy_t.age], 0 mov [si+enemy_t.E_cur_instr_frame], 0 mov [si+enemy_t.E_loop_i], 0 mov [si+enemy_t.E_script_ip], 0 les bx, _std_ip mov al, es:[bx] mov ah, 0 add ax, ax mov bx, ax mov ax, _enemy_script_ptrs[bx] mov [si+enemy_t.E_script], ax cmp di, ENEMY_POS_RANDOM jnz short loc_15F6D call randring2_next16_mod pascal, (PLAYFIELD_W shl 4) mov di, ax loc_15F6D: mov [si+enemy_t.cur.pos.x], di cmp di, ((PLAYFIELD_W / 2) shl 4) jge short @@spawned_in_right_half mov al, 1 jmp short loc_15F7C ; --------------------------------------------------------------------------- @@spawned_in_right_half: mov al, 0 loc_15F7C: mov [si+enemy_t.E_spawned_in_left_half], al cmp [bp+@@center_y], ENEMY_POS_RANDOM jnz short loc_15F8F call randring2_next16_mod pascal, ((PLAYFIELD_H) shl 4) mov [bp+@@center_y], ax loc_15F8F: mov ax, [bp+@@center_y] mov [si+enemy_t.cur.pos.y], ax les bx, _std_ip mov al, es:[bx+5] mov [si+enemy_t.E_item], al mov al, es:[bx+6] mov [si+enemy_t.E_subtype], al mov [si+enemy_t.E_damaged_this_frame], 0 cmp _rank, RANK_LUNATIC jnz short loc_15FB7 mov ax, 1 jmp short loc_15FB9 ; --------------------------------------------------------------------------- loc_15FB7: xor ax, ax loc_15FB9: mov [si+enemy_t.E_autofire], al mov [si+enemy_t.E_clip], 0 mov [si+enemy_t.E_anim_cels], 1 mov [si+enemy_t.E_anim_frames_per_cel], 4 mov [si+enemy_t.E_anim_cur_cel], 0 mov [si+enemy_t.E_can_be_damaged], 0 mov [si+enemy_t.E_kills_player_on_collision], 0 call randring2_next16 mov [si+enemy_t.E_autofire_cur_frame], al mov [si+enemy_t.E_autofire_interval], 128 mov [si+enemy_t.E_bullet_template.pattern], BP_FORCESINGLE_AIMED mov [si+enemy_t.E_bullet_template.spawn_type], BST_NORMAL mov [si+enemy_t.E_bullet_template.speed], (2 shl 4) + 10 mov [si+enemy_t.E_bullet_template.BT_origin.x], 0 mov [si+enemy_t.E_bullet_template.BT_origin.y], 0 mov [si+enemy_t.E_bullet_template.patnum], 0 jmp short @@ret ; --------------------------------------------------------------------------- @@next: inc [bp+@@i] add si, size enemy_t @@more?: cmp [bp+@@i], ENEMY_COUNT jl @@loop @@ret: pop di pop si leave retn enemies_add endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame std_run proc far var_1 = byte ptr -1 enter 2, 0 nop push cs call near ptr sub_17322 les bx, _std_ip mov ax, es:[bx] cmp ax, _stage_frame jnz short locret_16063 add word ptr _std_ip, 2 les bx, _std_ip mov al, es:[bx] mov [bp+var_1], al inc word ptr _std_ip loc_16035: cmp _midboss_active, 0 jnz short loc_1603F call enemies_add loc_1603F: add word ptr _std_ip, 8 dec [bp+var_1] cmp [bp+var_1], 0 ja short loc_16035 les bx, _std_ip cmp word ptr es:[bx], 0 jnz short locret_16063 setfarfp _stage_vm, nullfunc_far locret_16063: leave retf std_run endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public ENEMY_BULLET_TEMPLATE_PUSH enemy_bullet_template_push proc near @@template = word ptr 4 push bp mov bp, sp push si push di mov cx, size _bullet_template / 2 mov si, [bp+@@template] mov di, offset _bullet_template push ds pop es assume es:_DATA rep movsw pop di pop si pop bp retn 2 enemy_bullet_template_push endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public ENEMIES_UPDATE enemies_update proc far var_2 = byte ptr -2 var_1 = byte ptr -1 enter 2, 0 push si push di mov _homing_target.x, SUBPIXEL_NONE mov _homing_target.y, SUBPIXEL_NONE mov _shot_hitbox_radius.x, (16 shl 4) mov _shot_hitbox_radius.y, (12 shl 4) mov [bp+var_2], 0 mov si, offset _enemies xor di, di jmp @@more? ; --------------------------------------------------------------------------- @@loop: cmp [si+enemy_t.flag], EF_FREE jz @@next cmp [si+enemy_t.flag], EF_KILLED jnz short @@alive mov [si+enemy_t.flag], EF_FREE jmp @@next ; --------------------------------------------------------------------------- @@alive: mov _enemy_cur, si cmp [si+enemy_t.flag], EF_KILL_ANIM jnb loc_16221 call sub_1535A cmp [si+enemy_t.E_kills_player_on_collision], 0 jz short loc_160F2 mov ax, [si+enemy_t.pos.cur.x] sub ax, _player_pos.cur.x add ax, (12 shl 4) cmp ax, (24 shl 4) jnb short loc_160F2 mov ax, [si+enemy_t.pos.cur.y] sub ax, _player_pos.cur.y add ax, (12 shl 4) cmp ax, (24 shl 4) jnb short loc_160F2 mov _player_is_hit, 1 jmp short loc_16161 ; --------------------------------------------------------------------------- loc_160F2: cmp [si+enemy_t.E_can_be_damaged], 0 jz @@autofire? cmp [si+enemy_t.E_hp], -1 jz @@autofire? mov ax, [si+enemy_t.pos.cur.x] add ax, ((ENEMY_W / 2) shl 4) cmp ax, (PLAYFIELD_RIGHT shl 4) jnb @@autofire? mov ax, [si+enemy_t.pos.cur.y] add ax, ((ENEMY_H / 2) shl 4) cmp ax, (PLAYFIELD_BOTTOM shl 4) jnb @@autofire? inc [bp+var_2] mov ax, [si+enemy_t.pos.cur.y] cmp ax, _homing_target.y jle short loc_16134 mov ax, [si+enemy_t.pos.cur.x] mov _homing_target.x, ax mov ax, [si+enemy_t.pos.cur.y] mov _homing_target.y, ax loc_16134: mov eax, dword ptr [si+enemy_t.pos.cur] mov dword ptr _shot_hitbox_center, eax call sub_126B3 mov [bp+var_1], al cmp [bp+var_1], 0 jz short @@autofire? cmp [si+enemy_t.E_hp], -2 jz short loc_161BF mov ah, 0 cmp ax, [si+enemy_t.E_hp] jge short loc_16161 mov al, [bp+var_1] mov ah, 0 sub [si+enemy_t.E_hp], ax jmp short loc_161B9 ; --------------------------------------------------------------------------- loc_16161: mov [si+enemy_t.flag], EF_KILL_ANIM mov [si+enemy_t.E_anim_cels], 1 mov [si+enemy_t.E_can_be_damaged], 0 mov [si+enemy_t.E_kills_player_on_collision], 0 mov [si+enemy_t.pos.velocity.x], 0 mov [si+enemy_t.pos.velocity.y], 0 cmp [si+enemy_t.E_item], IT_NONE jz short loc_1618C call items_add pascal, [si+enemy_t.pos.cur.x], [si+enemy_t.pos.cur.y], word ptr [si+enemy_t.E_item] loc_1618C: call snd_se_play pascal, 3 movzx eax, word ptr [si+enemy_t.E_score] add _score_delta, eax push [si+enemy_t.pos.cur.x] push [si+enemy_t.pos.cur.y] push large (((4 shl 4) shl 16) or 7) nopcall sparks_add_random inc _enemies_gone inc _enemies_killed jmp @@next ; --------------------------------------------------------------------------- loc_161B9: mov [si+enemy_t.E_damaged_this_frame], 1 jmp short @@autofire? ; --------------------------------------------------------------------------- loc_161BF: call snd_se_play pascal, 10 @@autofire?: cmp [si+enemy_t.E_autofire], 0 jz short @@no_autofire inc [si+enemy_t.E_autofire_cur_frame] mov al, [si+enemy_t.E_autofire_cur_frame] cmp al, [si+enemy_t.E_autofire_interval] jb short @@no_autofire cmp [si+enemy_t.pos.cur.y], (304 shl 4) jge short @@no_autofire mov ax, [si+enemy_t.pos.cur.x] sub ax, _player_pos.cur.x add ax, (48 shl 4) cmp ax, (96 shl 4) jnb short @@fire mov ax, [si+enemy_t.pos.cur.y] sub ax, _player_pos.cur.y add ax, (48 shl 4) cmp ax, (96 shl 4) jb short @@no_autofire @@fire: mov [si+enemy_t.E_autofire_cur_frame], 0 lea ax, [si+enemy_t.E_bullet_template] call enemy_bullet_template_push pascal, ax mov ax, [si+enemy_t.pos.cur.x] add _bullet_template.BT_origin.x, ax mov ax, [si+enemy_t.pos.cur.y] add _bullet_template.BT_origin.y, ax call _bullet_template_tune call sub_15A5C @@no_autofire: inc [si+enemy_t.age] jmp short @@next ; --------------------------------------------------------------------------- loc_16221: lea ax, [si+enemy_t.pos] call _motion_update_2 pascal, ax mov al, [si+enemy_t.flag] inc al mov [si+enemy_t.flag], al mov [bp+var_1], al mov ah, 0 add ax, -EF_KILL_ANIM mov bx, 4 cwd idiv bx add al, PAT_ENEMY_KILL mov [bp+var_1], al mov [si+enemy_t.E_patnum_base], al cmp [bp+var_1], (PAT_ENEMY_KILL + ENEMY_KILL_CELS) jb short @@next mov [si+enemy_t.flag], EF_KILLED @@next: inc di add si, size enemy_t @@more?: cmp di, ENEMY_COUNT jl @@loop cmp _homing_target.x, SUBPIXEL_NONE jz short loc_162B9 cmp [bp+var_2], 8 jb short loc_1626C mov [bp+var_2], 50h ; 'P' jmp short loc_16279 ; --------------------------------------------------------------------------- loc_1626C: mov al, [bp+var_2] shl al, 3 mov dl, 90h sub dl, al mov [bp+var_2], dl loc_16279: mov al, _stage_id shl al, 4 mov dl, [bp+var_2] sub dl, al mov [bp+var_2], dl cmp [bp+var_2], 90h ja short loc_16293 cmp [bp+var_2], 4 jnb short loc_16297 loc_16293: mov [bp+var_2], 4 loc_16297: mov al, [bp+var_2] mov ah, 0 push ax mov ax, _stage_frame xor dx, dx pop bx div bx or dx, dx jnz short loc_162B9 cmp _dream, 128 jnb short loc_162B9 inc _dream call hud_dream_put loc_162B9: pop di pop si leave retf enemies_update endp include th04/main/boss/explosions_reset.asm include th04/main/boss/explode_small.asm include th05/main/boss/2_explode_small.asm include th05/main/boss/explode_big.asm include th05/main/boss/2_explode_big.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_163DF proc near var_2 = word ptr -2 arg_0 = dword ptr 4 arg_4 = word ptr 8 arg_6 = word ptr 0Ah arg_8 = word ptr 0Ch enter 2, 0 push si mov si, [bp+arg_4] movsx eax, si les bx, [bp+arg_0] assume es:nothing imul eax, es:[bx] mov es:[bx], eax mov eax, es:[bx] mov ebx, 0Ah xor edx, edx div ebx mov bx, word ptr [bp+arg_0] mov es:[bx], eax cmp si, 0Ah jge short loc_16418 mov ax, TX_RED jmp short loc_1641B ; --------------------------------------------------------------------------- loc_16418: mov ax, TX_GREEN loc_1641B: mov [bp+var_2], ax push 6 push [bp+arg_8] push ds mov bx, [bp+arg_6] add bx, bx push _STAGE_CLEAR_BONUS_DESC[bx] push ax call text_putsa pop si leave retn 0Ah sub_163DF endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_16438 proc near arg_0 = dword ptr 4 push bp mov bp, sp cmp _boss_mode_change, 0 jnz short loc_1644D push 140000h push 0 jmp loc_164FD ; --------------------------------------------------------------------------- loc_1644D: les bx, _resident mov al, es:[bx+resident_t.credit_lives] mov ah, 0 cmp ax, 4 jz short loc_1647C cmp ax, 5 jz short loc_16472 cmp ax, 6 jz short loc_16468 jmp short loc_1648B ; --------------------------------------------------------------------------- loc_16468: push 120001h push 3 jmp short loc_16484 ; --------------------------------------------------------------------------- loc_16472: push 120002h push 5 jmp short loc_16484 ; --------------------------------------------------------------------------- loc_1647C: push 120003h push 7 loc_16484: pushd [bp+arg_0] call sub_163DF loc_1648B: mov al, _continues_used mov ah, 0 cmp ax, 1 jz short loc_164A1 cmp ax, 2 jz short loc_164AB cmp ax, 3 jz short loc_164B5 jmp short loc_164C4 ; --------------------------------------------------------------------------- loc_164A1: push 130004h push 8 jmp short loc_164BD ; --------------------------------------------------------------------------- loc_164AB: push 130005h push 6 jmp short loc_164BD ; --------------------------------------------------------------------------- loc_164B5: push 130006h push 4 loc_164BD: pushd [bp+arg_0] call sub_163DF loc_164C4: mov al, _rank mov ah, 0 mov bx, ax cmp bx, 3 ja short loc_16504 add bx, bx jmp cs:off_16508[bx] loc_164D7: push 140007h push 5 jmp short loc_164FD ; --------------------------------------------------------------------------- loc_164E1: push 140008h push 0Ah jmp short loc_164FD ; --------------------------------------------------------------------------- loc_164EB: push 140009h push 0Ch jmp short loc_164FD ; --------------------------------------------------------------------------- loc_164F5: push 14000Ah push 0Eh loc_164FD: pushd [bp+arg_0] call sub_163DF loc_16504: pop bp retn 4 sub_16438 endp ; --------------------------------------------------------------------------- off_16508 dw offset loc_164D7 dw offset loc_164E1 dw offset loc_164EB dw offset loc_164F5 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_16510 proc near var_6 = byte ptr -6 var_5 = byte ptr -5 var_4 = dword ptr -4 enter 6, 0 push si les bx, _resident mov al, es:[bx+resident_t.miss_count] cmp al, byte_22274 jnz short loc_16528 mov ax, 1 jmp short loc_1652A ; --------------------------------------------------------------------------- loc_16528: xor ax, ax loc_1652A: mov [bp+var_5], al les bx, _resident mov al, es:[bx+resident_t.miss_count] mov byte_22274, al mov al, es:[bx+resident_t.bombs_used] cmp al, byte_22275 jnz short loc_1654D cmp [bp+var_5], 0 jz short loc_1654D mov ax, 1 jmp short loc_1654F ; --------------------------------------------------------------------------- loc_1654D: xor ax, ax loc_1654F: mov [bp+var_6], al les bx, _resident mov al, es:[bx+resident_t.bombs_used] mov byte_22275, al mov PaletteTone, 60 call far ptr palette_show call gaiji_putsa pascal, (20 shl 16) + 4, ds, offset gpCLEAR_BONUS, TX_WHITE call text_putsa pascal, (6 shl 16) + 8, ds, BONUS_STAGE, TX_WHITE call text_putsa pascal, (6 shl 16) + 10, ds, BONUS_DREAM, TX_WHITE call text_putsa pascal, (6 shl 16) + 12, ds, GRAZEX50, TX_WHITE call text_putsa pascal, (6 shl 16) + 14, ds, POINT_ITEMS, TX_WHITE cmp [bp+var_5], 0 jz short loc_165DF call text_putsa pascal, (6 shl 16) + 16, ds, BONUS_NOMISS, TX_CYAN loc_165DF: cmp [bp+var_6], 0 jz short loc_165F8 call text_putsa pascal, (6 shl 16) + 17, ds, BONUS_NOBOMB, TX_CYAN loc_165F8: call text_putsa pascal, (6 shl 16) + 21, ds, BONUS_TOTAL, TX_WHITE mov al, _stage_id mov ah, 0 imul ax, 64h add ax, 64h ; 'd' mov si, ax movzx eax, si mov [bp+var_4], eax push (34 shl 16) + 8 push eax nopcall hud_points_put mov al, _dream mov ah, 0 imul ax, 0Ah mov si, ax movzx eax, si add [bp+var_4], eax push (34 shl 16) + 10 push eax nopcall hud_points_put mov ax, _stage_graze imul ax, 5 mov si, ax movzx eax, si add [bp+var_4], eax push (34 shl 16) + 12 push eax nopcall hud_points_put mov si, _stage_point_items_collected movzx eax, si imul eax, [bp+var_4] mov [bp+var_4], eax push (40 shl 16) + 14 push si push TX_WHITE nopcall hud_int_put mov al, _stage_id mov ah, 0 imul ax, 5000 add ax, 10000 mov si, ax cmp [bp+var_5], 0 jz short loc_166B2 movzx eax, si add [bp+var_4], eax push (34 shl 16) + 16 push eax nopcall hud_points_put loc_166B2: cmp [bp+var_6], 0 jz short loc_166CD movzx eax, si add [bp+var_4], eax push (34 shl 16) + 17 push eax nopcall hud_points_put loc_166CD: cmp [bp+var_4], 124F80h jb short loc_166DB push 4 jmp short loc_166F5 ; --------------------------------------------------------------------------- loc_166DB: cmp [bp+var_4], 0C3500h jb short loc_166E9 push 2 jmp short loc_166F5 ; --------------------------------------------------------------------------- loc_166E9: cmp [bp+var_4], 7A120h jb short loc_166FC push 1 loc_166F5: call playperf_raise jmp short loc_1671B ; --------------------------------------------------------------------------- loc_166FC: cmp [bp+var_4], 186A0h ja short loc_1670A push 2 jmp short loc_16716 ; --------------------------------------------------------------------------- loc_1670A: cmp [bp+var_4], 30D40h ja short loc_1671B push 1 loc_16716: call playperf_lower loc_1671B: push ss lea ax, [bp+var_4] push ax call sub_16438 push (34 shl 16) + 21 pushd [bp+var_4] nopcall hud_points_put mov eax, [bp+var_4] add _score_delta, eax pop si leave retn sub_16510 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1673E proc near var_A = byte ptr -0Ah var_9 = byte ptr -9 var_8 = dword ptr -8 var_4 = dword ptr -4 enter 0Ah, 0 push si les bx, _resident mov al, es:[bx+resident_t.miss_count] cmp al, byte_22274 jnz short loc_16756 mov ax, 1 jmp short loc_16758 ; --------------------------------------------------------------------------- loc_16756: xor ax, ax loc_16758: mov [bp+var_9], al les bx, _resident mov al, es:[bx+resident_t.miss_count] mov byte_22274, al mov al, es:[bx+resident_t.bombs_used] cmp al, byte_22275 jnz short loc_1677B cmp [bp+var_9], 0 jz short loc_1677B mov ax, 1 jmp short loc_1677D ; --------------------------------------------------------------------------- loc_1677B: xor ax, ax loc_1677D: mov [bp+var_A], al les bx, _resident mov al, es:[bx+resident_t.bombs_used] mov byte_22275, al mov PaletteTone, 60 call far ptr palette_show mov _extends_gained, 10 call gaiji_putsa pascal, (19 shl 16) + 4, ds, offset gpCONGRATULATION, TX_WHITE call text_putsa pascal, (6 shl 16) + 6, ds, ALL_CLEAR, TX_WHITE call text_putsa pascal, (6 shl 16) + 8, ds, BONUS_DREAM, TX_WHITE call text_putsa pascal, (6 shl 16) + 10, ds, GRAZEX50, TX_WHITE call text_putsa pascal, (6 shl 16) + 12, ds, PLAYER_REM, TX_WHITE call text_putsa pascal, (6 shl 16) + 14, ds, POINT_ITEMS, TX_WHITE cmp [bp+var_9], 0 jz short loc_16825 call text_putsa pascal, (6 shl 16) + 16, ds, BONUS_NOMISS, TX_CYAN loc_16825: cmp [bp+var_A], 0 jz short loc_1683E call text_putsa pascal, (6 shl 16) + 17, ds, BONUS_NOBOMB, TX_CYAN loc_1683E: call text_putsa pascal, (6 shl 16) + 18, ds, POINT_TOTAL, TX_CYAN call text_putsa pascal, (6 shl 16) + 21, ds, BONUS_TOTAL, TX_WHITE mov si, 3E8h movzx eax, si mov [bp+var_4], eax push (34 shl 16) + 6 push eax nopcall hud_points_put mov al, _dream mov ah, 0 imul ax, 0Ah mov si, ax movzx eax, si add [bp+var_4], eax push (34 shl 16) + 8 push eax nopcall hud_points_put mov ax, _stage_graze imul ax, 5 mov si, ax movzx eax, si add [bp+var_4], eax push (34 shl 16) + 10 push eax nopcall hud_points_put mov al, _lives mov ah, 0 imul ax, 1000 add ax, -1000 mov si, ax movzx eax, si add [bp+var_4], eax push (34 shl 16) + 12 push eax nopcall hud_points_put mov si, _stage_point_items_collected movzx eax, si imul eax, [bp+var_4] mov [bp+var_4], eax push (40 shl 16) + 14 push si push TX_WHITE nopcall hud_int_put mov [bp+var_8], 50000 cmp [bp+var_9], 0 jz short loc_1691E mov eax, [bp+var_8] add [bp+var_4], eax push (34 shl 16) + 16 push eax nopcall hud_points_put loc_1691E: cmp [bp+var_A], 0 jz short loc_16939 mov eax, [bp+var_8] add [bp+var_4], eax push (34 shl 16) + 17 push eax nopcall hud_points_put loc_16939: movzx eax, _extend_point_items_collected imul eax, 250 mov [bp+var_8], eax add [bp+var_4], eax push (34 shl 16) + 18 push eax nopcall hud_points_put push ss lea ax, [bp+var_4] push ax call sub_16438 push (34 shl 16) + 21 pushd [bp+var_4] nopcall hud_points_put mov eax, [bp+var_4] add _score_delta, eax pop si leave retn sub_1673E endp include th04/main/gather_add.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public GATHER_BULLET_TEMPLATE_PUSH gather_bullet_template_push proc near @@gather = word ptr 4 push bp mov bp, sp push si push di mov cx, size _bullet_template / 2 push ds pop es mov di, offset _bullet_template mov si, [bp+@@gather] add si, gather_t.G_bullet_template rep movsw pop di pop si pop bp retn 2 gather_bullet_template_push endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public GATHER_UPDATE gather_update proc far push bp mov bp, sp push si push di mov si, offset _gather_circles xor di, di jmp short @@more? ; --------------------------------------------------------------------------- @@loop: cmp [si+gather_t.G_flag], 0 jz short @@next cmp [si+gather_t.G_flag], 2 jb short @@alive mov [si+gather_t.G_flag], 0 jmp short @@next ; --------------------------------------------------------------------------- @@alive: lea ax, [si+gather_t.G_center] call _motion_update_2 pascal, ax mov ax, [si+gather_t.G_radius_cur] mov [si+gather_t.G_radius_prev], ax mov ax, [si+gather_t.G_radius_delta] sub [si+gather_t.G_radius_cur], ax mov al, [si+gather_t.G_angle_delta] add [si+gather_t.G_angle_cur], al cmp [si+gather_t.G_radius_cur], GATHER_RADIUS_END jge short @@next mov [si+gather_t.G_flag], 2 cmp [si+gather_t.G_bullet_template.spawn_type], BST_GATHER_ONLY jz short @@next push si call gather_bullet_template_push mov ax, [si+gather_t.G_center.x] mov _bullet_template.BT_origin.x, ax mov ax, [si+gather_t.G_center.y] mov _bullet_template.BT_origin.y, ax cmp _bullet_template.spawn_type, BST_GATHER_NORMAL_SPECIAL_MOVE jnb short loc_16B0F call sub_15A5C jmp short @@next ; --------------------------------------------------------------------------- loc_16B0F: mov _bullet_template.spawn_type, BST_NORMAL call sub_15A70 @@next: inc di add si, size gather_t @@more?: cmp di, GATHER_CAP jl short @@loop pop di pop si pop bp retf gather_update endp include th04/main/gather_render.asm main_032_TEXT ends main_033_TEXT segment byte public 'CODE' use16 BOSS_FLYSTEP_RANDOM procdesc pascal near \ frame:word BOSS_FLYSTEP_TOWARDS procdesc pascal near \ target_x:word, target_y:word ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_16D67 proc far push bp mov bp, sp call IRand and al, 0Fh mov byte_2C98A, al call item_splashes_init mov _items_pull_to_player, 0 mov word_2C986, 0 pop bp retf sub_16D67 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public ITEMS_ADD items_add proc near @@type = byte ptr 4 @@y = word ptr 6 @@x = word ptr 8 push bp mov bp, sp push si push di cmp _items_pull_to_player, 0 jz short loc_16DA0 cmp [bp+@@type], IT_BIGPOWER jb short loc_16D9C cmp [bp+@@type], -1 jnz short loc_16DA0 loc_16D9C: mov [bp+@@type], IT_POWER loc_16DA0: cmp [bp+@@type], -1 jnz short loc_16DCA inc byte_2C98A test byte_2C98A, 1 jnz short loc_16E23 mov al, byte_2C98A mov ah, 0 cwd sub ax, dx sar ax, 1 mov bx, 40h cwd idiv bx mov bx, dx mov al, ENEMY_DROPS[bx] mov [bp+@@type], al loc_16DCA: mov si, offset _items xor di, di jmp short loc_16E1E ; --------------------------------------------------------------------------- loc_16DD1: cmp byte ptr [si], 0 jnz short loc_16E1A mov byte ptr [si], 1 mov byte ptr [si+0Fh], 0 mov ax, [bp+@@x] mov [si+2], ax mov ax, [bp+@@y] mov [si+4], ax mov [si+item_t.pos.velocity.x], 0 mov [si+item_t.pos.velocity.y], (-3 shl 4) mov al, [bp+@@type] mov [si+item_t.ITEM_type], al mov ah, 0 add ax, ax mov bx, ax mov ax, _ITEM_TYPE_PATNUM[bx] mov [si+item_t.ITEM_patnum], ax call item_splashes_add pascal, [bp+@@x], [bp+@@y] mov word ptr [si+12h], 0 inc _items_spawned jmp short loc_16E23 ; --------------------------------------------------------------------------- loc_16E1A: inc di add si, size item_t loc_16E1E: cmp di, ITEM_COUNT jl short loc_16DD1 loc_16E23: pop di pop si pop bp retn 6 items_add endp include th04/main/item/miss_add.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_16F05 proc near push bp mov bp, sp mov al, _extends_gained mov ah, 0 imul ax, 100 add ax, 100 cmp ax, _extend_point_items_collected ja short loc_16F52 call playperf_raise pascal, 4 inc _extends_gained cmp _lives, 99 jnb short loc_16F52 inc _lives cmp _bullet_clear_time, 20 jnb short loc_16F3B mov _bullet_clear_time, 20 loc_16F3B: call sub_10407 mov _popup_id_new, POPUP_ID_EXTEND mov _popup, offset popup_update_and_render call snd_se_play pascal, 7 loc_16F52: pop bp retn sub_16F05 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_16F54 proc near @@yellow = byte ptr -3 var_2 = word ptr -2 arg_0 = word ptr 4 enter 4, 0 push si push di mov di, [bp+arg_0] mov [bp+@@yellow], 0 mov al, [di+0Eh] mov ah, 0 mov bx, ax cmp bx, 6 ja loc_17174 add bx, bx jmp cs:off_171BA[bx] loc_16F76: cmp _power, 128 jnb short loc_16FAA cmp _power, 127 jnz short loc_16F9B mov _popup_id_new, POPUP_ID_FULL_POWERUP mov _popup, offset popup_update_and_render cmp _bullet_clear_time, 20 jnb short loc_16F9B mov _bullet_clear_time, 20 loc_16F9B: inc _power call sub_E4FC mov si, 1 jmp loc_17174 ; --------------------------------------------------------------------------- loc_16FAA: inc _power_overflow_level cmp _power_overflow_level, 42 jb short loc_16FD1 mov _power_overflow_level, 42 mov [bp+@@yellow], 1 cmp _items_pull_to_player, 0 jnz short loc_16FD1 cmp _dream, 128 jnb short loc_16FD1 inc _dream loc_16FD1: mov bx, _power_overflow_level add bx, bx mov si, POWER_OVERFLOW_BONUS[bx] call hud_dream_put jmp loc_17174 ; --------------------------------------------------------------------------- loc_16FE3: cmp _dream, 128 jnb short loc_17003 mov al, _dream mov ah, 0 imul ax, 18h mov dx, [di+4] sub dx, ax add dx, 0FC80h mov [bp+var_2], dx mov si, 5120 jmp short loc_1700C ; --------------------------------------------------------------------------- loc_17003: mov [bp+var_2], 0 mov si, word_2C988 loc_1700C: cmp [bp+var_2], 0 jg short loc_1704D inc _item_playperf_raise cmp _items_pull_to_player, 0 jnz short loc_17043 mov ax, [di+4] mov bx, 400h cwd idiv bx mov dl, 6 sub dl, al add dl, _dream mov _dream, dl cmp _dream, 128 jbe short loc_1703E mov _dream, 128 loc_1703E: call hud_dream_put loc_17043: inc _total_max_valued_point_items_collected mov [bp+@@yellow], 1 jmp short loc_1705C ; --------------------------------------------------------------------------- loc_1704D: mov ax, [bp+var_2] cwd sub ax, dx sar ax, 1 mov dx, 2800 sub dx, ax mov si, dx loc_1705C: inc _item_playperf_raise inc _extend_point_items_collected inc _total_point_items_collected cmp _stage_point_items_collected, POINT_ITEMS_MAX jnb short loc_17074 inc _stage_point_items_collected loc_17074: call sub_16F05 call hud_point_items_put jmp loc_17174 ; --------------------------------------------------------------------------- loc_1707F: cmp _dream, 128 jb short loc_1708F mov si, 12800 mov [bp+@@yellow], 1 jmp short loc_17097 ; --------------------------------------------------------------------------- loc_1708F: mov si, 1 mov _dream, 128 loc_17097: call hud_dream_put mov al, _item_playperf_raise add al, 2 mov _item_playperf_raise, al cmp _items_pull_to_player, 0 jz loc_17174 add al, 2 mov _item_playperf_raise, al jmp loc_17174 ; --------------------------------------------------------------------------- loc_170B5: cmp _power, 128 jnb short loc_170F2 mov al, _power add al, 10 mov _power, al cmp _power, 128 jb short loc_170E7 mov _power, 128 mov _popup_id_new, POPUP_ID_FULL_POWERUP mov _popup, offset popup_update_and_render cmp _bullet_clear_time, 20 jnb short loc_170E7 mov _bullet_clear_time, 20 loc_170E7: call sub_E4FC mov si, 1 jmp loc_17174 ; --------------------------------------------------------------------------- loc_170F2: add _power_overflow_level, 5 mov bx, _power_overflow_level add bx, bx mov si, POWER_OVERFLOW_BONUS[bx] cmp _power_overflow_level, 42 jbe short loc_1710E mov _power_overflow_level, 42 loc_1710E: cmp _power_overflow_level, 42 jnz short loc_17174 mov si, 2560 mov [bp+@@yellow], 1 jmp short loc_17174 ; --------------------------------------------------------------------------- loc_1711E: inc _bombs mov si, 100 call sub_104BB jmp short loc_17174 ; --------------------------------------------------------------------------- loc_1712C: push 3 call playperf_raise inc _lives call sub_10407 call snd_se_play pascal, 7 mov _popup_id_new, POPUP_ID_EXTEND mov _popup, offset popup_update_and_render jmp short loc_17171 ; --------------------------------------------------------------------------- loc_17150: cmp _bullet_clear_time, 20 jnb short loc_1715C mov _bullet_clear_time, 20 loc_1715C: mov _popup_id_new, POPUP_ID_FULL_POWERUP mov _popup, offset popup_update_and_render mov _power, 128 call sub_E4FC loc_17171: mov si, 100 loc_17174: movzx eax, si add _score_delta, eax cmp [bp+@@yellow], 0 jnz short loc_1718F call pointnums_add_white pascal, word ptr [di+2], word ptr [di+4], si jmp short loc_17199 ; --------------------------------------------------------------------------- loc_1718F: call pointnums_add_yellow pascal, word ptr [di+2], word ptr [di+4], si loc_17199: cmp _item_playperf_raise, 32 jb short loc_171AF mov al, _item_playperf_raise add al, -32 mov _item_playperf_raise, al call playperf_raise pascal, 1 loc_171AF: inc _items_collected pop di pop si leave retn 2 sub_16F54 endp ; --------------------------------------------------------------------------- db 0 off_171BA dw offset loc_16F76 dw offset loc_16FE3 dw offset loc_1707F dw offset loc_170B5 dw offset loc_1711E dw offset loc_1712C dw offset loc_17150 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_171C8 proc near arg_0 = word ptr 4 push bp mov bp, sp push si mov si, [bp+arg_0] mov al, [si+0Eh] mov ah, 0 cmp ax, 1 jz short loc_171E5 cmp ax, 4 jz short loc_171F9 cmp ax, 5 jz short loc_171FD jmp short loc_17204 ; --------------------------------------------------------------------------- loc_171E5: cmp _dream, 1 jbe short loc_17204 cmp _dream, 128 jnb short loc_17204 dec _dream jmp short loc_17204 ; --------------------------------------------------------------------------- loc_171F9: push 2 jmp short loc_171FF ; --------------------------------------------------------------------------- loc_171FD: push 4 loc_171FF: call playperf_lower loc_17204: call hud_dream_put pop si pop bp retn 2 sub_171C8 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public ITEMS_UPDATE items_update proc far @@angle = byte ptr -1 enter 2, 0 push si push di mov si, offset _items xor di, di jmp loc_172EC ; --------------------------------------------------------------------------- loc_1721C: cmp byte ptr [si], 0 jz loc_172E8 cmp byte ptr [si], 2 jnz short loc_1722E mov byte ptr [si], 0 jmp loc_172E8 ; --------------------------------------------------------------------------- loc_1722E: cmp _items_pull_to_player, 0 jz short loc_17264 mov byte_21762, 1 mov [si+item_t.pulled_to_player], 1 mov ax, _player_pos.cur.y sub ax, [si+item_t.pos.cur.y] push ax mov ax, _player_pos.cur.x sub ax, [si+item_t.pos.cur.x] push ax call iatan2 mov [bp+var_1], al lea ax, [si+item_t.pos.velocity] call vector2_near pascal, ax, word ptr [bp+@@angle], (ITEM_PULL_SPEED shl 4) jmp short loc_17279 ; --------------------------------------------------------------------------- loc_17264: cmp [si+item_t.pulled_to_player], 0 jz short loc_17279 mov [si+item_t.pos.velocity.x], 0 mov [si+item_t.pos.velocity.y], 0 mov [si+item_t.pulled_to_player], 0 loc_17279: lea ax, [si+item_t.pos] push ax call _motion_update_2 cmp ax, (-(ITEM_W / 2) shl 4) jle short loc_17290 cmp ax, ((PLAYFIELD_W + (ITEM_W / 2)) shl 4) jge short loc_17290 cmp dx, ((PLAYFIELD_H + (ITEM_H / 2)) shl 4) jl short loc_17299 loc_17290: mov byte ptr [si], 2 push si call sub_171C8 jmp short loc_172E8 ; --------------------------------------------------------------------------- loc_17299: cmp dx, (-(ITEM_H / 2) shl 4) jge short loc_172A3 mov [si+item_t.pos.cur.y], (-(ITEM_H / 2) shl 4) loc_172A3: cmp word ptr [si+0Ch], 0 jl short @@hittest mov word ptr [si+0Ah], 0 @@hittest: cmp _miss_time, 0 jnz short loc_172E5 mov bx, _player_pos.cur.x add bx, (24 shl 4) sub bx, ax cmp bx, (48 shl 4) ja short loc_172E5 mov bx, _player_pos.cur.y add bx, (24 shl 4) sub bx, dx cmp bx, (38 shl 4) ja short loc_172E5 push si call sub_16F54 call snd_se_play pascal, 11 mov byte ptr [si], 2 jmp short loc_172E8 ; --------------------------------------------------------------------------- loc_172E5: inc [si+item_t.pos.velocity.y] loc_172E8: inc di add si, size item_t loc_172EC: cmp di, ITEM_COUNT jl loc_1721C call item_splashes_update mov byte_21762, 0 pop di pop si leave retf items_update endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_172FF proc far push bp mov bp, sp mov _midboss_invalidate?, offset nullfunc_near mov _midboss_render, offset nullfunc_near setfarfp _midboss_update, nullfunc_far mov _midboss_hp, 0 pop bp retf sub_172FF endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_17322 proc far push bp mov bp, sp mov ax, _midboss_frames_until cmp ax, _stage_frame jnz short loc_17352 mov _midboss_invalidate?, offset sub_D032 mov ax, _midboss_render_func mov _midboss_render, ax mov eax, _midboss_update_func mov _midboss_update, eax mov _midboss_phase, 0 mov _midboss_phase_frame, 0 mov _midboss_active, 1 loc_17352: pop bp retf sub_17322 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_17354 proc near arg_0 = word ptr 4 arg_2 = word ptr 6 push bp mov bp, sp push si push di mov di, [bp+arg_2] or di, di jg short loc_17364 xor si, si jmp short loc_17389 ; --------------------------------------------------------------------------- loc_17364: cmp di, [bp+arg_0] jl short loc_1736E mov si, 80h jmp short loc_17389 ; --------------------------------------------------------------------------- loc_1736E: movsx eax, di shl eax, 7 movsx ebx, [bp+arg_0] cdq idiv ebx mov si, ax cmp si, 80h jge short loc_17389 inc si loc_17389: cmp word_2268C, si jge short loc_17393 inc word_2268C loc_17393: cmp word_2268C, si jle short loc_1739D mov word_2268C, si loc_1739D: push word_2268C call sub_1065B pop di pop si pop bp retn 4 sub_17354 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_173AC proc near @@y = word ptr -4 @@x = word ptr -2 arg_0 = word ptr 4 enter 4, 0 push si push di mov ax, [bp+arg_0] imul ax, 1280 movzx eax, ax add _score_delta, eax mov byte_21762, 0 mov ax, _midboss_pos.cur.x add ax, (-64 shl 4) mov [bp+@@x], ax mov ax, _midboss_pos.cur.y add ax, (-64 shl 4) mov [bp+@@y], ax xor di, di jmp short loc_1740B ; --------------------------------------------------------------------------- loc_173DD: call randring2_next16_mod pascal, (128 shl 4) add ax, [bp+@@x] mov si, ax or si, si jge short loc_173F0 xor si, si jmp short loc_173F9 ; --------------------------------------------------------------------------- loc_173F0: cmp si, (PLAYFIELD_W shl 4) jle short loc_173F9 mov si, (PLAYFIELD_W shl 4) loc_173F9: push si call randring2_next16_mod pascal, (128 shl 4) add ax, [bp+@@y] push ax push 1280 call pointnums_add_yellow inc di loc_1740B: cmp di, [bp+arg_0] jb short loc_173DD pop di pop si leave retn 2 sub_173AC endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_17416 proc near @@y = word ptr -4 @@x = word ptr -2 arg_0 = word ptr 4 enter 4, 0 push si push di movzx eax, [bp+arg_0] imul eax, 1000 add _score_delta, eax mov byte_21762, 0 mov ax, _boss_pos.cur.x add ax, (-64 shl 4) mov [bp+@@x], ax mov ax, _boss_pos.cur.y add ax, (-64 shl 4) mov [bp+@@y], ax xor di, di jmp short loc_17476 ; --------------------------------------------------------------------------- loc_17448: call randring2_next16_mod pascal, (128 shl 4) add ax, [bp+@@x] mov si, ax or si, si jge short loc_1745B xor si, si jmp short loc_17464 ; --------------------------------------------------------------------------- loc_1745B: cmp si, (PLAYFIELD_W shl 4) jle short loc_17464 mov si, (PLAYFIELD_W shl 4) loc_17464: push si call randring2_next16_mod pascal, (128 shl 4) add ax, [bp+@@y] push ax push 1000 call pointnums_add_yellow inc di loc_17476: cmp di, [bp+arg_0] jb short loc_17448 mov _boss_phase_timed_out, 0 pop di pop si leave retn 2 sub_17416 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_17486 proc near push bp mov bp, sp cmp _midboss_phase, PHASE_EXPLODE_BIG jnz short loc_174C1 cmp _midboss_phase_frame, 1 jnz short loc_174A2 mov word_2CE06, 0Ah mov _midboss_active, 0 loc_174A2: mov ax, _midboss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_174C5 inc _midboss_sprite cmp _midboss_sprite, 12 jb short loc_174C5 mov _midboss_phase, PHASE_NONE pop bp retn ; --------------------------------------------------------------------------- loc_174C1: call sub_172FF loc_174C5: pop bp retn sub_17486 endp include th05/main/lasers_control.asm include th05/main/bullet/curvebullets_add.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public CURVEBULLETS_UPDATE curvebullets_update proc near var_6 = byte ptr -6 var_5 = byte ptr -5 @@node_i = word ptr -4 @@bullet_i = word ptr -2 push bp mov bp, sp sub sp, 6 push si push di mov si, offset curvebullet_heads mov di, offset _curvebullet_trails mov [bp+@@bullet_i], 1 jmp @@bullets_more? ; --------------------------------------------------------------------------- loc_1773C: cmp [di+curvebullet_trail_t.flag], 0 jz @@bullets_next inc [si+curvebullet_head_t.CBH_age] mov [bp+@@node_i], (CURVEBULLET_TRAIL_NODE_COUNT - 1) jmp short @@nodes_more? ; --------------------------------------------------------------------------- @@node_loop: mov bx, [bp+@@node_i] shl bx, 2 mov eax, dword ptr [di+curvebullet_trail_t.node_pos+(bx - size Point)] mov bx, [bp+@@node_i] shl bx, 2 mov dword ptr [di+curvebullet_trail_t.node_pos+bx], eax mov bx, [bp+@@node_i] shl bx, 2 mov ax, [bx+di+curvebullet_trail_t.node_pos.x] sub ax, _player_pos.cur.x add ax, 6 * 16 cmp ax, 12 * 16 ja short @@node_next mov bx, [bp+@@node_i] shl bx, 2 mov ax, [bx+di+curvebullet_trail_t.node_pos.y] sub ax, _player_pos.cur.y add ax, 6 * 16 cmp ax, 12 * 16 ja short @@node_next mov _player_is_hit, 1 @@node_next: mov bx, [bp+@@node_i] mov al, [di+curvebullet_trail_t.node_sprite+(bx - byte)] mov [di+curvebullet_trail_t.node_sprite+bx], al dec [bp+@@node_i] @@nodes_more?: cmp [bp+@@node_i], 0 jg short @@node_loop mov eax, dword ptr [si+curvebullet_head_t.pos.cur] mov dword ptr [di+curvebullet_trail_t.node_pos][0], eax mov al, byte ptr [si+curvebullet_head_t.CBH_sprite] mov [di+curvebullet_trail_t.node_sprite][0], al cmp [di+curvebullet_trail_t.node_pos][(CURVEBULLET_TRAIL_NODE_COUNT - 1) * size Point].x, (-(CURVEBULLET_W / 2) shl 4) jle short loc_177CC cmp [di+curvebullet_trail_t.node_pos][(CURVEBULLET_TRAIL_NODE_COUNT - 1) * size Point].x, ((PLAYFIELD_W + (CURVEBULLET_W / 2)) shl 4) jge short loc_177CC cmp [di+curvebullet_trail_t.node_pos][(CURVEBULLET_TRAIL_NODE_COUNT - 1) * size Point].y, (-(CURVEBULLET_H / 2) shl 4) jle short loc_177CC cmp [di+curvebullet_trail_t.node_pos][(CURVEBULLET_TRAIL_NODE_COUNT - 1) * size Point].y, ((PLAYFIELD_H + (CURVEBULLET_H / 2)) shl 4) jl short loc_177D5 loc_177CC: mov [di+curvebullet_trail_t.flag], 0 mov [si+curvebullet_head_t.flag], 0 jmp @@bullets_next ; --------------------------------------------------------------------------- loc_177D5: lea ax, [si+curvebullet_head_t.pos] call _motion_update_2 pascal, ax sub ax, _player_pos.cur.x sub dx, _player_pos.cur.y add ax, 8 * 16 cmp ax, 16 * 16 ja short loc_177FB add dx, 8 * 16 cmp dx, 16 * 16 ja short loc_177FB mov _player_is_hit, 1 loc_177FB: cmp [di+curvebullet_trail_t.flag], 1 jnz short loc_17811 dec [si+curvebullet_head_t.CBH_speed] cmp [si+curvebullet_head_t.CBH_speed], 4 ja short loc_1780B inc [di+curvebullet_trail_t.flag] loc_1780B: mov [bp+var_6], 10h jmp short loc_17825 ; --------------------------------------------------------------------------- loc_17811: mov al, [si++curvebullet_head_t.CBH_speed] add al, _stage_frame_mod2 inc al mov [si++curvebullet_head_t.CBH_speed], al mov al, [si++curvebullet_head_t.CBH_speed] add al, 20h ; ' ' mov [bp+var_6], al loc_17825: call player_angle_from pascal, [si+curvebullet_head_t.pos.cur.x], [si+curvebullet_head_t.pos.cur.y], 0 mov dl, [si+curvebullet_head_t.CBH_angle] sub dl, al mov [bp+var_5], dl cmp [bp+var_5], 80h jb short loc_1786E cmp [bp+var_5], -2 jnb short loc_17874 mov al, [bp+var_5] mov ah, 0 push ax mov ax, 256 pop dx sub ax, dx mov dl, [bp+var_6] mov dh, 0 push dx cwd pop bx idiv bx mov [bp+var_5], al cmp al, [bp+var_6] jnb short loc_17866 mov [bp+var_5], 1 loc_17866: mov al, [bp+var_5] add [si+curvebullet_head_t.CBH_angle], al jmp short loc_178A5 ; --------------------------------------------------------------------------- loc_1786E: cmp [bp+var_5], 2 ja short loc_17884 loc_17874: call player_angle_from pascal, [si+curvebullet_head_t.pos.cur.x], [si+curvebullet_head_t.pos.cur.y], 0 mov [si+curvebullet_head_t.CBH_angle], al jmp short loc_178A5 ; --------------------------------------------------------------------------- loc_17884: mov al, [bp+var_5] mov ah, 0 mov dl, [bp+var_6] mov dh, 0 push dx cwd pop bx idiv bx mov [bp+var_5], al cmp al, [bp+var_6] jnb short loc_1789F mov [bp+var_5], 1 loc_1789F: mov al, [bp+var_5] sub [si+curvebullet_head_t.CBH_angle], al loc_178A5: lea ax, [si+curvebullet_head_t.pos.velocity] push ax push word ptr [si+curvebullet_head_t.CBH_angle] mov al, [si+curvebullet_head_t.CBH_speed] mov ah, 0 push ax call vector2_near call bullet_patnum_for_angle pascal, 0, word ptr [si+curvebullet_head_t.CBH_angle] mov ah, 0 mov [si+curvebullet_head_t.CBH_sprite], ax @@bullets_next: inc [bp+@@bullet_i] add si, size curvebullet_head_t add di, size curvebullet_trail_t @@bullets_more?: cmp [bp+@@bullet_i], 1 + CURVEBULLET_COUNT jl loc_1773C pop di pop si leave retn curvebullets_update endp include th04/main/item/splashes_update.asm include th05/main/bullet/update_patnum.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public BULLET_TURN_X bullet_turn_x proc near @@bullet = word ptr 4 push bp mov bp, sp push si mov si, [bp+@@bullet] inc [si+bullet_t.turn_count] mov al, 80h sub al, [si+bullet_t.BULLET_angle] mov [si+bullet_t.BULLET_angle], al mov al, [si+bullet_t.turn_count] cmp al, byte_2C976 jb short loc_179E0 mov [si+bullet_t.move_state], BMS_NORMAL loc_179E0: lea ax, [si+bullet_t.pos.velocity] push ax push word ptr [si+bullet_t.BULLET_angle] mov al, [si+bullet_t.speed_cur] mov ah, 0 push ax call vector2_near call bullet_update_patnum pascal, si pop si pop bp retn 2 bullet_turn_x endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public BULLET_TURN_Y bullet_turn_y proc near @@bullet = word ptr 4 push bp mov bp, sp push si mov si, [bp+@@bullet] inc [si+bullet_t.turn_count] mov al, [si+bullet_t.BULLET_angle] neg al mov [si+bullet_t.BULLET_angle], al mov al, [si+bullet_t.turn_count] cmp al, byte_2C976 jb short loc_17A18 mov [si+bullet_t.move_state], BMS_NORMAL loc_17A18: lea ax, [si+bullet_t.pos.velocity] push ax push word ptr [si+bullet_t.BULLET_angle] mov al, [si+bullet_t.speed_cur] mov ah, 0 push ax call vector2_near call bullet_update_patnum pascal, si pop si pop bp retn 2 bullet_turn_y endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public BULLET_UPDATE_SPECIAL bullet_update_special proc near @@bullet = word ptr 4 push bp mov bp, sp push si mov si, [bp+@@bullet] mov al, [si+bullet_t.special_motion] mov ah, 0 dec ax mov bx, ax cmp bx, 9 ja loc_17BEB add bx, bx jmp cs:off_17BF0[bx] loc_17A4E: cmp [si+bullet_t.speed_cur], 0 jz short loc_17A56 jmp short loc_17A8D ; --------------------------------------------------------------------------- loc_17A56: inc [si+bullet_t.turn_count] mov ax, _player_pos.cur.y sub ax, [si+4] push ax mov ax, _player_pos.cur.x sub ax, [si+2] push ax call iatan2 mov [si+bullet_t.BULLET_angle], al call bullet_update_patnum pascal, si mov al, [si+bullet_t.speed_final] mov [si+bullet_t.speed_cur], al mov al, [si+bullet_t.turn_count] cmp al, byte_2C976 jb loc_17B32 jmp loc_17B2E ; --------------------------------------------------------------------------- loc_17A87: cmp [si+bullet_t.speed_cur], 0 jz short loc_17AA3 loc_17A8D: lea ax, [si+bullet_t.pos.velocity] push ax push word ptr [si+bullet_t.BULLET_angle] mov al, [si+bullet_t.speed_cur] mov ah, 0 push ax call vector2_near dec [si+bullet_t.speed_cur] jmp loc_17BEB ; --------------------------------------------------------------------------- loc_17AA3: inc [si+bullet_t.turn_count] mov al, [si+bullet_t.turn_angle] add [si+bullet_t.BULLET_angle], al call bullet_update_patnum pascal, si mov al, [si+bullet_t.speed_final] mov [si+bullet_t.speed_cur], al mov al, [si+bullet_t.turn_count] cmp al, byte_2C976 jb short loc_17B32 jmp short loc_17B2E ; --------------------------------------------------------------------------- loc_17AC1: lea ax, [si+bullet_t.pos.velocity] push ax push word ptr [si+bullet_t.BULLET_angle] mov al, [si+bullet_t.speed_cur] mov ah, 0 push ax call vector2_near mov al, byte_2C976 add [si+bullet_t.speed_cur], al jmp loc_17BEB ; --------------------------------------------------------------------------- loc_17ADA: cmp [si+bullet_t.speed_cur], 0 jz short loc_17B22 lea ax, [si+bullet_t.pos.velocity] push ax push word ptr [si+bullet_t.BULLET_angle] mov al, [si+bullet_t.speed_cur] mov ah, 0 push ax call vector2_near cmp [si+bullet_t.speed_cur], 1 jbe short loc_17B00 mov al, [si+bullet_t.speed_cur] add al, -2 mov [si+bullet_t.speed_cur], al jmp short loc_17B04 ; --------------------------------------------------------------------------- loc_17B00: mov [si+bullet_t.speed_cur], 0 loc_17B04: cmp [si+bullet_t.speed_cur], (2 shl 4) jnb loc_17BEB mov al, [si+bullet_t.turn_angle] sub al, [si+bullet_t.BULLET_angle] cbw mov bx, 4 cwd idiv bx add al, [si+bullet_t.BULLET_angle] mov [si+bullet_t.BULLET_angle], al jmp loc_17BEB ; --------------------------------------------------------------------------- loc_17B22: mov al, [si+bullet_t.turn_angle] mov [si+bullet_t.BULLET_angle], al mov al, [si+bullet_t.speed_final] mov [si+bullet_t.speed_cur], al loc_17B2E: mov [si+bullet_t.move_state], BMS_NORMAL loc_17B32: lea ax, [si+bullet_t.pos.velocity] push ax push word ptr [si+bullet_t.BULLET_angle] mov al, [si+bullet_t.speed_cur] mov ah, 0 push ax call vector2_near jmp loc_17BEB ; --------------------------------------------------------------------------- loc_17B45: cmp [si+bullet_t.pos.cur.x], 0 jle short loc_17B54 cmp [si+bullet_t.pos.cur.x], (PLAYFIELD_W shl 4) jl loc_17BEB loc_17B54: call bullet_turn_x pascal, si jmp loc_17BEB ; --------------------------------------------------------------------------- loc_17B5B: cmp [si+bullet_t.pos.cur.y], 0 jle short loc_17BA3 cmp [si+bullet_t.pos.cur.y], (PLAYFIELD_H shl 4) jl loc_17BEB jmp short loc_17BA3 ; --------------------------------------------------------------------------- loc_17B6C: cmp [si+bullet_t.pos.cur.x], 0 jle short loc_17B79 cmp [si+bullet_t.pos.cur.x], (PLAYFIELD_W shl 4) jl short loc_17B7D loc_17B79: call bullet_turn_x pascal, si loc_17B7D: cmp [si+bullet_t.pos.cur.y], 0 jle short loc_17BA3 cmp [si+bullet_t.pos.cur.y], (PLAYFIELD_H shl 4) jl short loc_17BEB jmp short loc_17BA3 ; --------------------------------------------------------------------------- loc_17B8C: cmp [si+bullet_t.pos.cur.x], 0 jle short loc_17B99 cmp [si+bullet_t.pos.cur.x], (PLAYFIELD_W shl 4) jl short loc_17B9D loc_17B99: call bullet_turn_x pascal, si loc_17B9D: cmp [si+bullet_t.pos.cur.y], 0 jg short loc_17BEB loc_17BA3: call bullet_turn_y pascal, si jmp short loc_17BEB ; --------------------------------------------------------------------------- loc_17BA9: cmp _stage_frame_mod2, 0 jz short loc_17BEB mov al, byte_2C976 mov ah, 0 add [si+bullet_t.pos.velocity.y], ax jmp short loc_17BEB ; --------------------------------------------------------------------------- loc_17BBA: mov al, [si+bullet_t.speed_cur] mov ah, 0 add [si+bullet_t.distance], ax push offset _drawpoint push [si+bullet_t.BULLET_origin.x] push [si+bullet_t.BULLET_origin.y] push [si+bullet_t.distance] mov al, [si+bullet_t.BULLET_angle] mov ah, 0 push ax call vector2_at mov ax, _drawpoint.x sub ax, [si+bullet_t.pos.cur.x] mov [si+bullet_t.pos.velocity.x], ax mov ax, _drawpoint.y sub ax, [si+bullet_t.pos.cur.y] mov [si+bullet_t.pos.velocity.y], ax loc_17BEB: pop si pop bp retn 2 ; --------------------------------------------------------------------------- off_17BF0 dw offset loc_17A4E dw offset loc_17A87 dw offset loc_17AC1 dw offset loc_17ADA dw offset loc_17B45 dw offset loc_17B5B dw offset loc_17B6C dw offset loc_17B8C dw offset loc_17BA9 dw offset loc_17BBA bullet_update_special endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_17C04 proc far @@patnum = byte ptr -9 var_8 = word ptr -8 var_6 = word ptr -6 @@points = word ptr -4 var_2 = word ptr -2 push bp mov bp, sp sub sp, 0Ah push si push di mov [bp+var_2], 0 mov _pellet_clouds_render_count, 0 mov _pellets_render_count, 0 mov si, offset _bullets[(BULLET_COUNT - 1) * size bullet_t] cmp _bullet_clear_trigger, 0 jnz loc_17EC3 xor di, di jmp loc_17E78 ; --------------------------------------------------------------------------- loc_17C2E: cmp [si+bullet_t.flag], 0 jz loc_17E74 cmp [si+bullet_t.flag], 2 jnz short loc_17C40 mov [si+bullet_t.flag], 0 jmp loc_17E74 ; --------------------------------------------------------------------------- loc_17C40: inc [bp+var_2] cmp _bullet_clear_time, 0 jz short loc_17CA3 cmp [si+bullet_t.move_state], BMS_DECAY jnb short loc_17C7B mov [si+bullet_t.move_state], BMS_DECAY cmp di, BULLET16_COUNT jge short loc_17C5F mov ax, PAT_DECAY_BULLET16 jmp short loc_17C62 ; --------------------------------------------------------------------------- loc_17C5F: mov ax, PAT_DECAY_PELLET loc_17C62: mov [si+bullet_t.BULLET_patnum], ax cmp [si+bullet_t.age], 0 jz short loc_17C73 add _score_delta, 100 jmp short loc_17CA3 ; --------------------------------------------------------------------------- loc_17C73: add _score_delta, 10 jmp short loc_17CA3 ; --------------------------------------------------------------------------- loc_17C7B: inc [si+bullet_t.move_state] cmp [si+bullet_t.move_state], BMS_DECAY_END jb short loc_17C91 lea ax, [si+bullet_t.pos] call _motion_update_2 pascal, ax mov [si+bullet_t.flag], 2 jmp loc_17E74 ; --------------------------------------------------------------------------- loc_17C91: mov al, [si+bullet_t.move_state] mov ah, 0 mov bx, (BMS_DECAY_FRAMES / BULLET_DECAY_CELS) cwd idiv bx or dx, dx jnz short loc_17CA3 inc [si+bullet_t.BULLET_patnum] loc_17CA3: inc [si+bullet_t.age] cmp [si+bullet_t.spawn_state], BSS_ACTIVE jb loc_17D56 cmp [si+bullet_t.spawn_state], BSS_ACTIVE jnz short loc_17CBB mov [si+bullet_t.spawn_state], BSS_GRAZEABLE jmp loc_17D56 ; --------------------------------------------------------------------------- loc_17CBB: cmp [si+bullet_t.spawn_state], BSS_CLOUD_BACKWARDS jnz short loc_17CE1 mov eax, dword ptr [si+bullet_t.pos.cur] mov dword ptr [si+bullet_t.pos.prev], eax mov ax, [si+bullet_t.pos.velocity.x] shl ax, 3 sub [si+bullet_t.pos.cur.x], ax mov ax, [si+bullet_t.pos.velocity.y] shl ax, 3 sub [si+bullet_t.pos.cur.y], ax mov [si+bullet_t.spawn_state], BSS_CLOUD_FORWARDS jmp short loc_17D0D ; --------------------------------------------------------------------------- loc_17CE1: cmp [si+bullet_t.spawn_state], BSS_CLOUD_FORWARDS jnz short loc_17CF0 lea ax, [si+bullet_t.pos] call _motion_update_2 pascal, ax jmp short loc_17D0D ; --------------------------------------------------------------------------- loc_17CF0: mov eax, dword ptr [si+bullet_t.pos.cur] mov dword ptr [si+bullet_t.pos.prev], eax mov ax, [si+bullet_t.pos.velocity.x] mov bx, 3 cwd idiv bx add [si+bullet_t.pos.cur.x], ax mov ax, [si+bullet_t.pos.velocity.y] cwd idiv bx add [si+bullet_t.pos.cur.y], ax loc_17D0D: inc [si+bullet_t.spawn_state] cmp [si+bullet_t.spawn_state], BSS_CLOUD_END jb short loc_17D3D cmp [si+bullet_t.pos.cur.y], (-8 shl 4) jl short loc_17D30 cmp [si+bullet_t.pos.cur.y], ((PLAYFIELD_H + 8) shl 4) jge short loc_17D30 cmp [si+bullet_t.pos.cur.x], (-8 shl 4) jl short loc_17D30 cmp [si+bullet_t.pos.cur.x], ((PLAYFIELD_W + 8) shl 4) jl short loc_17D36 loc_17D30: mov [si+bullet_t.flag], 2 jmp loc_17E74 ; --------------------------------------------------------------------------- loc_17D36: mov [si+bullet_t.spawn_state], BSS_ACTIVE jmp loc_17E74 ; --------------------------------------------------------------------------- loc_17D3D: cmp di, BULLET16_COUNT jl loc_17E74 mov bx, _pellet_clouds_render_count add bx, bx mov _pellet_clouds_render[bx], si inc _pellet_clouds_render_count jmp loc_17E74 ; --------------------------------------------------------------------------- loc_17D56: cmp [si+bullet_t.move_state], BMS_SPECIAL jnz short loc_17D62 call bullet_update_special pascal, si jmp short loc_17DA3 ; --------------------------------------------------------------------------- loc_17D62: cmp [si+bullet_t.move_state], BMS_SLOWDOWN jnz short loc_17DA3 dec [si+bullet_t.slowdown_time] mov al, [si+bullet_t.slowdown_time] mov ah, 0 mov dl, [si+bullet_t.slowdown_speed_delta] mov dh, 0 imul dx mov bx, BMS_SLOWDOWN_FRAMES cwd idiv bx add al, [si+bullet_t.speed_final] mov [si+bullet_t.speed_cur], al cmp [si+bullet_t.slowdown_time], 0 jnz short loc_17D93 mov al, [si+bullet_t.speed_final] mov [si+bullet_t.speed_cur], al mov [si+bullet_t.move_state], BMS_NORMAL loc_17D93: lea ax, [si+bullet_t.pos.velocity] push ax push word ptr [si+bullet_t.BULLET_angle] mov al, [si+bullet_t.speed_cur] mov ah, 0 push ax call vector2_near loc_17DA3: lea ax, [si+bullet_t.pos] call _motion_update_2 pascal, ax cmp ax, (-8 shl 4) jle short loc_17DBF cmp ax, ((PLAYFIELD_W + 8) shl 4) jge short loc_17DBF cmp dx, (-8 shl 4) jle short loc_17DBF cmp dx, ((PLAYFIELD_H + 8) shl 4) jl short loc_17DC5 loc_17DBF: mov [si+bullet_t.flag], 2 jmp loc_17E74 ; --------------------------------------------------------------------------- loc_17DC5: cmp _bullet_clear_time, 0 jnz loc_17E74 sub ax, _player_pos.cur.x sub dx, _player_pos.cur.y cmp _player_invincibility_time, 0 jnz short loc_17E41 cmp [si+bullet_t.spawn_state], BSS_GRAZEABLE jz short loc_17DFE add ax, (4 shl 4) cmp ax, (8 shl 4) ja short loc_17E41 add dx, (4 shl 4) cmp dx, (8 shl 4) ja short loc_17E41 mov [si+bullet_t.flag], 2 mov _player_is_hit, 1 jmp short loc_17E74 ; --------------------------------------------------------------------------- loc_17DFE: add ax, (16 shl 4) cmp ax, (36 shl 4) ja short loc_17E41 add dx, (22 shl 4) cmp dx, (44 shl 4) ja short loc_17E41 push [si+bullet_t.pos.cur.x] push [si+bullet_t.pos.cur.y] push large (((2 shl 4) shl 16) or 2) nopcall sparks_add_random mov [si+bullet_t.spawn_state], BSS_GRAZED cmp _stage_graze, GRAZE_MAX jnb short loc_17E41 inc _stage_graze call hud_graze_put movzx eax, score_2C97C add _score_delta, eax loc_17E41: cmp di, BULLET16_COUNT jl short loc_17E74 mov ax, [si+bullet_t.pos.cur.x] sar ax, 4 add ax, (PLAYFIELD_LEFT - (PELLET_W / 2)) mov bx, _pellets_render_count shl bx, 2 mov _pellets_render[bx].PRT_left, ax mov ax, [si+bullet_t.pos.cur.y] add ax, ((PLAYFIELD_TOP - (PELLET_H / 2)) shl 4) call scroll_subpixel_y_to_vram_seg3 pascal, ax mov bx, _pellets_render_count shl bx, 2 mov _pellets_render[bx].PRT_top, ax inc _pellets_render_count loc_17E74: inc di sub si, size bullet_t loc_17E78: cmp di, BULLET_COUNT jl loc_17C2E cmp _turbo_mode, 0 jnz loc_17FB7 mov byte_25FF8, 0 mov di, 2Ah ; '*' mov al, _rank mov ah, 0 shl ax, 3 add di, ax cmp [bp+var_2], di jl short loc_17EAB cmp _stage_frame_mod2, 0 jnz loc_17FB7 jmp short loc_17EB5 ; --------------------------------------------------------------------------- loc_17EAB: lea ax, [di+20h] cmp ax, [bp+var_2] jg loc_17FB7 loc_17EB5: mov word_25FE6, 2 mov byte_25FF8, 1 jmp loc_17FB7 ; --------------------------------------------------------------------------- loc_17EC3: mov al, _bullet_clear_trigger mov ah, 0 mov bx, BULLET_DECAY_CELS cwd idiv bx add al, PAT_BULLET_KILL mov [bp+@@patnum], al mov [bp+@@points], 1 mov [bp+var_6], 1 cmp _rank, RANK_EXTRA jnz short loc_17EE9 mov ax, 1600 jmp short loc_17EFA ; --------------------------------------------------------------------------- loc_17EE9: push ( 960 shl 16) or 1280 push (1280 shl 16) or 1280 call select_for_rank loc_17EFA: mov [bp+var_8], ax mov _popup_bonus, 0 xor di, di jmp loc_17F8D ; --------------------------------------------------------------------------- loc_17F0B: cmp [si+bullet_t.flag], 1 jnz short loc_17F89 mov [si+bullet_t.pos.velocity.x], 0 mov [si+bullet_t.pos.velocity.y], 0 lea ax, [si+bullet_t.pos] call _motion_update_2 pascal, ax cmp [bp+@@patnum], 76 ; TH04 leftover; PAT_BULLET16_D in that game, unused here jnb short loc_17F31 mov al, [bp+@@patnum] mov ah, 0 mov [si+bullet_t.BULLET_patnum], ax jmp short loc_17F86 ; --------------------------------------------------------------------------- loc_17F31: movzx eax, [bp+@@points] add _popup_bonus, eax add _score_delta, eax call pointnums_add_white pascal, [si+bullet_t.pos.cur.x], [si+bullet_t.pos.cur.y], [bp+@@points] mov ax, [bp+var_6] add [bp+@@points], ax add [bp+var_6], 3 mov ax, [bp+@@points] cmp ax, [bp+var_8] jbe short loc_17F64 mov ax, [bp+var_8] mov [bp+@@points], ax loc_17F64: mov [si+bullet_t.flag], 2 cmp _bullet_clear_drop_point_items, 0 jz short loc_17F86 mov ax, [bp+var_2] mov bx, 4 cwd idiv bx or dx, dx jnz short loc_17F86 call items_add pascal, [si+bullet_t.pos.cur.x], [si+bullet_t.pos.cur.y], IT_POINT loc_17F86: inc [bp+var_2] loc_17F89: inc di sub si, size bullet_t loc_17F8D: cmp di, BULLET_COUNT jl loc_17F0B cmp _popup_bonus, 0 jz short loc_17FA8 mov _popup_id_new, POPUP_ID_BONUS mov _popup, offset popup_update_and_render loc_17FA8: inc _bullet_clear_trigger cmp [bp+@@patnum], 76 ; TH04 leftover; PAT_BULLET16_D in that game, unused here jb short loc_17FB7 mov _bullet_clear_trigger, 0 loc_17FB7: cmp _bullet_clear_time, 0 jz short loc_17FC2 dec _bullet_clear_time loc_17FC2: pop di pop si leave retf sub_17C04 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_17FC6 proc near push bp mov bp, sp mov ax, _midboss_pos.cur.x mov _midboss_pos.prev.x, ax mov ax, _midboss_pos.cur.y mov _midboss_pos.prev.y, ax push (192 shl 4) push _midboss_pos.velocity.x mov al, _midboss_angle mov ah, 0 add ax, ax mov bx, ax push _CosTable8[bx] call vector1_at mov _midboss_pos.cur.x, ax push (96 shl 4) push _midboss_pos.velocity.x mov al, _midboss_angle mov ah, 0 add ax, ax mov bx, ax push _SinTable8[bx] call vector1_at mov _midboss_pos.cur.y, ax mov al, _midboss_angle add al, -2 mov _midboss_angle, al pop bp retn sub_17FC6 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_18017 proc near push bp mov bp, sp push si mov si, 10h cmp _midboss_hp, 200 jg short loc_18029 mov si, 0Ch loc_18029: mov ax, _midboss_phase_frame cwd idiv si or dx, dx jnz loc_180BC mov _bullet_template.spawn_type, BST_NORMAL mov _bullet_template.patnum, 0 mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_SPREAD mov _bullet_template.BT_special_motion, 0Ah mov word ptr _bullet_template.spread, (2 shl 8) or 4 mov al, _boss_angle mov _bullet_template.BT_angle, al add al, 14h mov _boss_angle, al call _bullet_template_tune call sub_15A70 mov _bullet_template.pattern, BP_SINGLE mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS mov _bullet_template.speed, (1 shl 4) + 8 mov _bullet_template.patnum, PAT_BULLET16_N_BLUE call _bullet_template_tune call randring2_next16 mov _bullet_template.BT_angle, al push _midboss_pos.cur.x push (32 shl 4) mov ah, 0 add ax, ax mov bx, ax push _CosTable8[bx] call vector1_at mov _bullet_template.BT_origin.x, ax push _midboss_pos.cur.y push (32 shl 4) mov al, _bullet_template.BT_angle mov ah, 0 add ax, ax mov bx, ax push _SinTable8[bx] call vector1_at mov _bullet_template.BT_origin.y, ax call sub_15A5C loc_180BC: pop si pop bp retn sub_18017 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MIDBOSS1_UPDATE midboss1_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur mov _bullet_template.BT_origin, eax inc _midboss_phase_frame mov al, _midboss_phase mov ah, 0 mov bx, ax cmp bx, 3 ja loc_181B5 add bx, bx jmp cs:off_181DD[bx] loc_180E3: cmp _midboss_phase_frame, 256 jl loc_181C4 inc _midboss_phase mov _midboss_phase_frame, 0 mov _midboss_sprite, 204 jmp loc_181C4 ; --------------------------------------------------------------------------- loc_180FF: call sub_1FA9D pascal, (12 shl 4) or ((12 shl 4) shl 16), 10 cmp _midboss_phase_frame, 64 jl loc_181C4 inc _midboss_phase mov _midboss_phase_frame, 0 mov _midboss_pos.velocity.x, 0 mov _boss_angle, 224 jmp loc_181C4 ; --------------------------------------------------------------------------- loc_1812B: call sub_18017 call sub_1FA9D pascal, (24 shl 4) or ((24 shl 4) shl 16), 4 mov _midboss_damage_this_frame, al mov ah, 0 sub _midboss_hp, ax mov ax, 1000 sub ax, _midboss_hp cwde shl eax, 6 shl eax, 4 mov ebx, 3E8h xor edx, edx div ebx mov _midboss_pos.velocity.x, ax call sub_17FC6 cmp _midboss_phase_frame, 1500 jge short loc_1818B cmp _midboss_hp, 0 jg short loc_181C4 mov _bullet_clear_trigger, 1 push 5 call sub_173AC call items_add pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, IT_BIGPOWER loc_1818B: mov _midboss_phase, PHASE_EXPLODE_BIG mov _midboss_sprite, 4 mov _midboss_phase_frame, 0 call sparks_add_circle pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, large (((8 shl 4) shl 16) or 48) call snd_se_play pascal, 12 jmp short loc_181C4 ; --------------------------------------------------------------------------- loc_181B5: call sub_17486 push _midboss_hp push 1000 call sub_17354 pop bp retf ; --------------------------------------------------------------------------- loc_181C4: push _midboss_hp push 1000 call sub_17354 mov ax, _midboss_pos.cur.x mov _homing_target.x, ax mov ax, _midboss_pos.cur.y mov _homing_target.y, ax pop bp retf midboss1_update endp ; --------------------------------------------------------------------------- db 0 off_181DD dw offset loc_180E3 dw offset loc_180FF dw offset loc_180FF dw offset loc_1812B ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_181E5 proc near push bp mov bp, sp cmp _boss_phase_frame, 16 jge short loc_1821C mov ax, _boss_phase_frame dec ax call gather_add_only_3stack pascal, ax, large (9 shl 16) or 8 cmp _boss_phase_frame, 1 jnz short loc_18239 call snd_se_play pascal, 8 mov angle_2D085, 80h mov angle_2D084, 0 mov byte_2D083, 8 pop bp retn ; --------------------------------------------------------------------------- loc_1821C: mov ax, _boss_phase_frame add ax, -16 call boss_flystep_random pascal, ax or al, al jz short loc_18235 mov _boss_phase_frame, 0 mov _boss_mode, 0 loc_18235: call fp_2CE24 loc_18239: pop bp retn sub_181E5 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1823B proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz short loc_18274 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_SINGLE mov al, angle_2D085 mov _bullet_template.BT_angle, al mov _bullet_template.speed, (1 shl 4) + 8 call _bullet_template_tune call sub_15A5C mov al, angle_2D085 add al, -0Ah mov angle_2D085, al loc_18274: pop bp retn sub_1823B endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_18276 proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz short loc_182AF mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_SINGLE mov al, angle_2D084 mov _bullet_template.BT_angle, al mov _bullet_template.speed, (1 shl 4) + 8 call _bullet_template_tune call sub_15A5C mov al, angle_2D084 add al, 0Ah mov angle_2D084, al loc_182AF: pop bp retn sub_18276 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_182B1 proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_182EB mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_N_RED mov _bullet_template.pattern, BP_SPREAD_STACK_AIMED 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 _bullet_template_tune call sub_15A5C call snd_se_play pascal, 15 loc_182EB: pop bp retn sub_182B1 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_182ED proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_18339 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN 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 _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 _bullet_template_tune call sub_15A5C mov al, byte_2D083 add al, 0F8h mov byte_2D083, al call snd_se_play pascal, 15 loc_18339: pop bp retn sub_182ED endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1833B proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jge short loc_1837B mov ax, _boss_phase_frame add ax, -16 call gather_add_only_3stack pascal, ax, large (9 shl 16) or 8 cmp _boss_phase_frame, 16 jnz loc_183F3 call snd_se_play pascal, 8 mov _boss_sprite, 188 mov angle_2D085, 38h mov angle_2D084, 48h mov byte_2D083, 18h pop bp retn ; --------------------------------------------------------------------------- loc_1837B: cmp _boss_phase_frame, 64 jl short loc_183C4 cmp _boss_phase_frame, 96 jge short loc_18398 mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz short loc_183C8 jmp short loc_183C4 ; --------------------------------------------------------------------------- loc_18398: cmp _boss_phase_frame, 128 jge short loc_183AF mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_183C8 jmp short loc_183C4 ; --------------------------------------------------------------------------- loc_183AF: cmp _boss_phase_frame, 160 jge short loc_183C8 mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_183C8 loc_183C4: inc _boss_sprite loc_183C8: cmp _boss_sprite, 192 jb short loc_183D4 mov _boss_sprite, 188 loc_183D4: call fp_2CE24 mov al, byte_2D07F mov ah, 0 cmp ax, _boss_phase_frame jg short loc_183F3 mov _boss_phase_frame, 0 mov _boss_mode, 0 mov _boss_sprite, 180 loc_183F3: pop bp retn sub_1833B endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_183F5 proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1847B mov _bullet_template.spawn_type, BST_SLOWDOWN 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, 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 _bullet_template_tune call sub_15A70 mov _bullet_template.spawn_type, BST_CLOUD_BACKWARDS 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, 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 _bullet_template_tune call sub_15A5C call snd_se_play pascal, 3 loc_1847B: pop bp retn sub_183F5 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1847D proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_184BA mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS mov _bullet_template.patnum, PAT_BULLET16_N_RED mov _bullet_template.pattern, BP_RING call randring2_next16 mov _bullet_template.BT_angle, al mov _bullet_template.speed, (2 shl 4) mov _bullet_template.spread, 12 call _bullet_template_tune call sub_15A5C call snd_se_play pascal, 3 loc_184BA: pop bp retn sub_1847D endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_184BC proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_18524 mov _bullet_template.spawn_type, BST_NORMAL mov _bullet_template.pattern, BP_RING mov _bullet_template.spread, 3 mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov al, angle_2D085 mov _bullet_template.BT_angle, al mov al, byte_2D083 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, _bullet_template.speed mov ah, 0 cwd sub ax, dx sar ax, 1 mov _bullet_template.speed, al loc_18506: call _bullet_template_tune call sub_15A5C call snd_se_play pascal, 3 mov al, angle_2D085 add al, 6 mov angle_2D085, al mov al, byte_2D083 add al, 4 mov byte_2D083, al loc_18524: pop bp retn sub_184BC endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_18526 proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1858E mov _bullet_template.spawn_type, BST_NORMAL mov _bullet_template.pattern, BP_RING mov _bullet_template.spread, 3 mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov al, angle_2D084 mov _bullet_template.BT_angle, al mov al, byte_2D083 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, _bullet_template.speed mov ah, 0 cwd sub ax, dx sar ax, 1 mov _bullet_template.speed, al loc_18570: call _bullet_template_tune call sub_15A5C call snd_se_play pascal, 3 mov al, angle_2D084 add al, -6 mov angle_2D084, al mov al, byte_2D083 add al, 4 mov byte_2D083, al loc_1858E: pop bp retn sub_18526 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_18590 proc near push bp mov bp, sp cmp _boss_phase_frame, 1 jnz short loc_1859F mov _boss_sprite, 188 loc_1859F: cmp _boss_phase_frame, 32 jnz short loc_185DD mov eax, _boss_pos.cur mov _laser_template.coords.origin, eax mov _laser_template.coords.angle, -32 mov _laser_template.LASER_color, 8 mov _laser_template.coords.LASER_width, 8 call lasers_new_fixed_and_manual_in_slot pascal, 0 mov _laser_template.coords.angle, -96 call lasers_new_fixed_and_manual_in_slot pascal, 1 mov angle_2D085, 0 mov angle_2D084, 1 mov byte_2D083, 1 pop bp retn ; --------------------------------------------------------------------------- loc_185DD: cmp _boss_phase_frame, 32 jle loc_186B4 cmp _boss_phase_frame, 64 jnz short loc_185F7 call lasers_grow_manual_in_slot pascal, 0 call lasers_grow_manual_in_slot pascal, 1 loc_185F7: mov al, byte_2D083 mov ah, 0 push ax mov ax, _boss_phase_frame cwd pop bx idiv bx or dx, dx jnz short loc_1863F cmp _lasers[1 * size laser_t].coords.angle, 74 jbe short loc_1863F mov al, _lasers[0 * size laser_t].coords.angle inc al mov _lasers[0 * size laser_t].coords.angle, al mov al, _lasers[1 * size laser_t].coords.angle add al, -1 mov _lasers[1 * size laser_t].coords.angle, al cmp _lasers[1 * size laser_t].coords.angle, 128 jz short loc_1863B cmp _lasers[1 * size laser_t].coords.angle, 96 jz short loc_1863B cmp _lasers[1 * size laser_t].coords.angle, 88 jz short loc_1863B cmp _lasers[1 * size laser_t].coords.angle, 80 jnz short loc_1863F loc_1863B: inc byte_2D083 loc_1863F: cmp _stage_frame_mod16, 0 jnz short loc_1869C mov _bullet_template.spawn_type, BST_SLOWDOWN mov al, angle_2D085 mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_SPREAD 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 _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 _bullet_template.speed, (1 shl 4) mov al, angle_2D084 mov _bullet_template.spread, al mov _bullet_template.patnum, PAT_BULLET16_N_BLUE call sub_15A5C mov al, angle_2D085 add al, 0Eh mov angle_2D085, al loc_1869C: mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx or dx, dx jnz short loc_186B4 cmp angle_2D084, 8 jnb short loc_186B4 inc angle_2D084 loc_186B4: pop bp retn sub_18590 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public SARA_UPDATE sara_update proc far push bp mov bp, sp mov ax, _boss_pos.cur.x mov _homing_target.x, ax mov ax, _boss_pos.cur.y mov _homing_target.y, ax inc _boss_phase_frame mov _bullet_template.spawn_type, BST_NORMAL mov eax, _boss_pos.cur mov _bullet_template.BT_origin, eax mov _gather_template.GT_center, eax mov al, _boss_phase mov ah, 0 mov bx, ax cmp bx, 4 ja loc_188E9 add bx, bx jmp cs:off_188FB[bx] loc_186EF: cmp _boss_phase_frame, 1 jnz short loc_18702 mov _boss_hp, 4650 mov _boss_phase_end_hp, 2550 loc_18702: call sub_1FB07 cmp _boss_phase_frame, 224 jl short loc_1874E cmp _boss_phase_frame, 224 jnz short loc_18737 mov ax, _boss_pos.cur.x mov _gather_template.GT_center.x, ax mov ax, _boss_pos.cur.y mov _gather_template.GT_center.y, ax mov _gather_template.GT_radius, (320 shl 4) mov _gather_template.GT_ring_points, 32 mov _gather_template.GT_angle_delta, 3 mov _gather_template.GT_col, 9 loc_18737: test byte ptr _boss_phase_frame, 7 jnz short loc_18741 call _gather_add_only loc_18741: cmp _boss_phase_frame, 224 jnz short loc_1874E mov _gather_template.GT_col, 8 loc_1874E: cmp _boss_phase_frame, 256 jl loc_188EE mov _gather_template.GT_radius, (64 shl 4) mov _gather_template.GT_angle_delta, 2 mov _gather_template.GT_ring_points, 8 inc _boss_phase mov _boss_phase_frame, 0 call snd_se_play pascal, 13 loc_1877A: mov fp_23F5A, offset sara_bg_render jmp loc_188EE ; --------------------------------------------------------------------------- loc_18783: call sub_1FB07 cmp _boss_phase_frame, 32 jl loc_188EE inc _boss_phase mov _boss_phase_frame, 0 mov _boss_mode, 0 mov _boss_mode_change, 0 mov byte_2D080, 0FFh mov byte_2D07F, 40h jmp short loc_1877A ; --------------------------------------------------------------------------- loc_187AF: mov al, _boss_mode mov ah, 0 or ax, ax jz short loc_187BA jmp short loc_18800 ; --------------------------------------------------------------------------- loc_187BA: mov al, byte_2D07F mov ah, 0 mov dx, _boss_phase_frame sub dx, ax call boss_flystep_random pascal, dx or al, al jz short loc_18819 mov _boss_phase_frame, 0 inc _boss_mode_change cmp _boss_mode_change, 32 jnb short loc_18827 loc_187DE: push 4 call randring2_next16_mod inc al mov _boss_mode, al cmp al, byte_2D080 jz short loc_187DE mov byte_2D080, al mov ah, 0 add ax, ax mov bx, ax mov ax, off_22758[bx-2] mov fp_2CE24, ax jmp short loc_18819 ; --------------------------------------------------------------------------- loc_18800: call sub_181E5 cmp _boss_phase_frame, 0 jnz short loc_18819 cmp byte_2D07F, 0Ch jbe short loc_18819 mov al, byte_2D07F add al, 0F4h mov byte_2D07F, al loc_18819: call sub_1FADD or al, al jz loc_188EE push 5 call sub_17416 loc_18827: call boss_phase_end pascal, (ET_NW_SE shl 16) or 450 mov byte_2D07F, 50h ; 'P' jmp loc_188EE ; --------------------------------------------------------------------------- loc_18838: mov al, _boss_mode mov ah, 0 or ax, ax jz short loc_18843 jmp short loc_18884 ; --------------------------------------------------------------------------- loc_18843: mov ax, _boss_phase_frame add ax, -16 call boss_flystep_random pascal, ax or al, al jz short loc_1889D mov _boss_phase_frame, 0 inc _boss_mode_change cmp _boss_mode_change, 24 jnb short loc_188A9 loc_18862: push 4 call randring2_next16_mod inc al mov _boss_mode, al cmp al, byte_2D080 jz short loc_18862 mov byte_2D080, al mov ah, 0 add ax, ax mov bx, ax mov ax, off_2275E[bx] mov fp_2CE24, ax jmp short loc_1889D ; --------------------------------------------------------------------------- loc_18884: call sub_1833B cmp _boss_phase_frame, 0 jnz short loc_1889D cmp byte_2D07F, 0B4h jnb short loc_1889D mov al, byte_2D07F add al, 18h mov byte_2D07F, al loc_1889D: call sub_1FADD or al, al jz short loc_188EE push 5 call sub_17416 loc_188A9: call boss_phase_end pascal, (ET_SW_NE shl 16) or 0 jmp short loc_188EE ; --------------------------------------------------------------------------- loc_188B4: call sub_18590 cmp _boss_phase_frame, 1300 jl short loc_188C6 mov _boss_mode_change, 0 jmp short loc_188D2 ; --------------------------------------------------------------------------- loc_188C6: call sub_1FADD or al, al jz short loc_188EE mov _boss_mode_change, 1 loc_188D2: call lasers_stop_in_slot pascal, 0 call lasers_stop_in_slot pascal, 1 mov _boss_phase_frame, 0 mov _boss_phase, PHASE_BOSS_EXPLODE_SMALL jmp short loc_188EE ; --------------------------------------------------------------------------- loc_188E9: push 0Ah call boss_death_sequence_function loc_188EE: push _boss_hp push 122Ah call sub_17354 pop bp retf sara_update endp ; --------------------------------------------------------------------------- db 0 off_188FB dw offset loc_186EF dw offset loc_18783 dw offset loc_187AF dw offset loc_18838 dw offset loc_188B4 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_18905 proc near push bp mov bp, sp mov eax, _midboss_pos.cur mov _midboss_pos.prev, eax push offset _midboss_pos.cur push sppoint_2CE26.x push sppoint_2CE26.y push _midboss_pos.velocity.x mov al, _midboss_angle mov ah, 0 push ax call vector2_at mov al, angle_2D084 cbw add sppoint_2CE26.x, ax cmp sppoint_2CE26.x, (128 shl 4) jge short loc_18941 mov al, angle_2D084 add al, 2 jmp short loc_1894E ; --------------------------------------------------------------------------- loc_18941: cmp sppoint_2CE26.x, (256 shl 4) jle short loc_18951 mov al, angle_2D084 add al, -2 loc_1894E: mov angle_2D084, al loc_18951: cmp angle_2D085, 0 jnz short loc_1896C add _midboss_pos.velocity.x, (1 shl 4) cmp _midboss_pos.velocity.x, (64 shl 4) jle short loc_1897D mov angle_2D085, 1 jmp short loc_1897D ; --------------------------------------------------------------------------- loc_1896C: sub _midboss_pos.velocity.x, (1 shl 4) cmp _midboss_pos.velocity.x, (1 shl 4) jg short loc_1897D mov angle_2D085, 0 loc_1897D: mov al, _midboss_angle add al, -2 mov _midboss_angle, al pop bp retn sub_18905 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_18987 proc near push bp mov bp, sp cmp _stage_frame_mod16, 0 jnz short loc_189FA mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_N_RED mov _bullet_template.pattern, BP_STACK mov word ptr _bullet_template.BT_stack, (8 shl 8) or 3 mov _bullet_template.speed, (1 shl 4) + 8 call randring2_next16 mov _bullet_template.BT_angle, al call _bullet_template_tune call sub_15A5C mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, 0 mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED mov _bullet_template.spread, 3 cmp _midboss_hp, 600 jg short loc_189DB mov _bullet_template.spread, 6 jmp short loc_189E8 ; --------------------------------------------------------------------------- loc_189DB: cmp _midboss_hp, 800 jg short loc_189E8 mov _bullet_template.spread, 4 loc_189E8: mov _bullet_template.speed, (1 shl 4) + 8 call randring2_next16 mov _bullet_template.BT_angle, al call _bullet_template_tune call sub_15A5C loc_189FA: pop bp retn sub_18987 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_189FC proc near push bp mov bp, sp cmp _stage_frame_mod4, 0 jnz short loc_18A2D mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_STACK mov word ptr _bullet_template.BT_stack, (15 shl 8) or 3 mov _bullet_template.speed, (1 shl 4) + 8 call randring2_next16 mov _bullet_template.BT_angle, al call _bullet_template_tune call sub_15A5C loc_18A2D: pop bp retn sub_189FC endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MIDBOSS2_UPDATE midboss2_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur mov _bullet_template.BT_origin, eax inc _midboss_phase_frame mov al, _midboss_phase mov ah, 0 or ax, ax jz short loc_18A56 cmp ax, 1 jz short loc_18A9F cmp ax, 2 jz loc_18B24 jmp loc_18B91 ; --------------------------------------------------------------------------- loc_18A56: push offset _midboss_pos call _motion_update_2 call sub_1FA9D pascal, (24 shl 4) or ((24 shl 4) shl 16), 10 cmp _midboss_phase_frame, 256 jl loc_18BA0 inc _midboss_phase mov _midboss_phase_frame, 0 mov _midboss_angle, 0 mov angle_2D085, 0 mov angle_2D084, 20h mov _midboss_pos.velocity.x, 0 mov sppoint_2CE26.x, 0C00h mov ax, _midboss_pos.cur.y mov sppoint_2CE26.x.y, ax jmp loc_18BA0 ; --------------------------------------------------------------------------- loc_18A9F: call sub_18987 call sub_18905 call sub_1FA9D pascal, (24 shl 4) or ((24 shl 4) shl 16), 4 mov _midboss_damage_this_frame, al mov ah, 0 sub _midboss_hp, ax cmp _midboss_phase_frame, 1000 jge short loc_18ADC cmp _midboss_hp, 400 jg loc_18BA0 push 5 call sub_173AC cmp _bullet_clear_time, 20 jnb short loc_18ADC mov _bullet_clear_time, 20 loc_18ADC: inc _midboss_phase mov _midboss_sprite, 206 mov _midboss_phase_frame, 0 call sparks_add_circle pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, large (((4 shl 4) shl 16) or 32) call snd_se_play pascal, 15 call vector2_between_plus pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, ((192 shl 4) shl 16) or (64 shl 4), 0, ds, offset _midboss_pos.velocity.x, ds, offset _midboss_pos.velocity.y, 1 jmp short loc_18BA0 ; --------------------------------------------------------------------------- loc_18B24: call sub_189FC push offset _midboss_pos call _motion_update_2 call sub_1FA9D pascal, (24 shl 4) or ((24 shl 4) shl 16), 4 mov _midboss_damage_this_frame, al mov ah, 0 sub _midboss_hp, ax cmp _midboss_phase_frame, 800 jge short loc_18B67 cmp _midboss_hp, 0 jg short loc_18BA0 mov _bullet_clear_trigger, 1 push 0Fh call sub_173AC call items_add pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, IT_BOMB loc_18B67: mov _midboss_phase, PHASE_EXPLODE_BIG mov _midboss_sprite, 4 mov _midboss_phase_frame, 0 call sparks_add_circle pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, large (((8 shl 4) shl 16) or 48) call snd_se_play pascal, 12 jmp short loc_18BA0 ; --------------------------------------------------------------------------- loc_18B91: call sub_17486 push _midboss_hp push 1400 call sub_17354 pop bp retf ; --------------------------------------------------------------------------- loc_18BA0: push _midboss_hp push 1400 call sub_17354 mov ax, _midboss_pos.cur.x mov _homing_target.x, ax mov ax, _midboss_pos.cur.y mov _homing_target.y, ax pop bp retf midboss2_update endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_18BB8 proc near @@angle = byte ptr -1 arg_0 = word ptr 4 @@length = word ptr 6 enter 2, 0 cmp _boss_phase_frame, 1 jnz short loc_18BDC call randring2_next16 mov [bp+@@angle], al call vector2 pascal, ds, offset _boss_pos.velocity.x, ds, offset _boss_pos.velocity.y, word ptr [bp+@@angle], [bp+@@length] loc_18BDC: mov ax, _boss_pos.velocity.x add _boss_pos.cur.x, ax mov ax, _boss_pos.velocity.y add _boss_pos.cur.y, ax cmp _boss_pos.cur.x, (48 shl 4) jle short loc_18BFA cmp _boss_pos.cur.x, (336 shl 4) jl short loc_18C04 loc_18BFA: mov ax, -1 imul _boss_pos.velocity.x mov _boss_pos.velocity.x, ax loc_18C04: cmp _boss_pos.cur.y, (48 shl 4) jle short loc_18C14 cmp _boss_pos.cur.y, (96 shl 4) jl short loc_18C1E loc_18C14: mov ax, -1 imul _boss_pos.velocity.y mov _boss_pos.velocity.y, ax loc_18C1E: mov ax, _boss_phase_frame cmp ax, [bp+arg_0] jl short loc_18C2C mov al, 1 leave retn 4 ; --------------------------------------------------------------------------- loc_18C2C: mov al, 0 leave retn 4 sub_18BB8 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_18C32 proc near arg_0 = word ptr 4 push bp mov bp, sp cmp _boss_phase_frame, 16 jl short loc_18C8E cmp _boss_phase_frame, 32 jge short loc_18C68 mov _boss_sprite, 184 mov ax, _boss_phase_frame add ax, -16 call gather_add_only_3stack pascal, ax, large (9 shl 16) or 8 cmp _boss_phase_frame, 16 jnz short loc_18C8E call snd_se_play pascal, 8 jmp short loc_18C8E ; --------------------------------------------------------------------------- loc_18C68: cmp _boss_phase_frame, 32 jnz short loc_18C7A mov _boss_sprite, 188 mov al, 1 pop bp retn 2 ; --------------------------------------------------------------------------- loc_18C7A: mov ax, _boss_phase_frame cmp ax, [bp+arg_0] jge short loc_18C88 mov al, 2 pop bp retn 2 ; --------------------------------------------------------------------------- loc_18C88: mov al, 3 pop bp retn 2 ; --------------------------------------------------------------------------- loc_18C8E: mov al, 0 pop bp retn 2 sub_18C32 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_18C94 proc near push bp mov bp, sp push 40h call sub_18C32 mov ah, 0 cmp ax, 1 jz short loc_18CB1 cmp ax, 2 jz short loc_18D07 cmp ax, 3 jz loc_18D42 pop bp retn ; --------------------------------------------------------------------------- loc_18CB1: mov _bullet_template.spawn_type, BST_NORMAL mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_SPREAD mov al, byte_2D080 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, angle_2D085 mov angle_2D085, al cmp angle_2D085, 0 jz short loc_18CE8 mov _bullet_template.BT_angle, 20h jmp short loc_18CED ; --------------------------------------------------------------------------- loc_18CE8: mov _bullet_template.BT_angle, 60h loc_18CED: call _bullet_template_tune call snd_se_play pascal, 15 cmp byte_2D080, 24h ; '$' jnb short loc_18D07 mov al, byte_2D080 add al, 4 mov byte_2D080, al loc_18D07: mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz short loc_18D52 call sub_15A5C mov al, _bullet_template.BT_angle add al, 80h mov _bullet_template.BT_angle, al call sub_15A5C cmp angle_2D085, 0 jz short loc_18D30 mov al, _bullet_template.BT_angle add al, 87h jmp short loc_18D35 ; --------------------------------------------------------------------------- loc_18D30: mov al, _bullet_template.BT_angle add al, 79h loc_18D35: mov _bullet_template.BT_angle, al mov al, _bullet_template.speed add al, 4 mov _bullet_template.speed, al pop bp retn ; --------------------------------------------------------------------------- loc_18D42: mov _boss_mode, 0 mov _boss_phase_frame, 0 mov _boss_sprite, 180 loc_18D52: pop bp retn sub_18C94 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_18D54 proc near push bp mov bp, sp push 60h call sub_18C32 mov ah, 0 cmp ax, 1 jz short loc_18D6F cmp ax, 2 jz short loc_18D9E cmp ax, 3 jz short loc_18DCD pop bp retn ; --------------------------------------------------------------------------- loc_18D6F: mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_V_RED mov _bullet_template.pattern, BP_STACK 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 _bullet_template.BT_stack, ax mov _bullet_template.BT_angle, -40h pop bp retn ; --------------------------------------------------------------------------- loc_18D9E: mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz short loc_18DDD call sub_15A5C cmp angle_2D085, 0 jz short loc_18DBC mov al, _bullet_template.BT_angle add al, -8 jmp short loc_18DC1 ; --------------------------------------------------------------------------- loc_18DBC: mov al, _bullet_template.BT_angle add al, 8 loc_18DC1: mov _bullet_template.BT_angle, al call snd_se_play pascal, 15 pop bp retn ; --------------------------------------------------------------------------- loc_18DCD: mov _boss_mode, 0 mov _boss_phase_frame, 0 mov _boss_sprite, 180 loc_18DDD: pop bp retn sub_18D54 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_18DDF proc near var_1 = byte ptr -1 enter 2, 0 push si mov ax, _boss_phase_frame mov bx, 32 cwd idiv bx or dx, dx jnz loc_18EBA mov _bullet_template.spawn_type, BST_CLOUD_BACKWARDS mov _bullet_template.pattern, BP_SINGLE mov _bullet_template.patnum, 0 call _bullet_template_tune 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 _bullet_template.BT_angle, 24h xor si, si jmp short loc_18E63 ; --------------------------------------------------------------------------- loc_18E21: mov al, _bullet_template.BT_angle mov [bp+var_1], al call sub_15A5C mov al, _bullet_template.BT_angle add al, 80h mov _bullet_template.BT_angle, al call sub_15A5C mov al, 40h sub al, _bullet_template.BT_angle mov _bullet_template.BT_angle, al call sub_15A5C mov al, _bullet_template.BT_angle add al, 80h mov _bullet_template.BT_angle, al call sub_15A5C mov al, [bp+var_1] 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 _bullet_template.BT_angle, al inc si loc_18E63: cmp si, 8 jl short loc_18E21 jmp short loc_18EBA ; --------------------------------------------------------------------------- loc_18E6A: mov _bullet_template.BT_angle, 64h xor si, si jmp short loc_18EB5 ; --------------------------------------------------------------------------- loc_18E73: mov al, _bullet_template.BT_angle mov [bp+var_1], al call sub_15A5C mov al, _bullet_template.BT_angle add al, 80h mov _bullet_template.BT_angle, al call sub_15A5C mov al, -40h sub al, _bullet_template.BT_angle mov _bullet_template.BT_angle, al call sub_15A5C mov al, _bullet_template.BT_angle add al, 80h mov _bullet_template.BT_angle, al call sub_15A5C mov al, [bp+var_1] 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 _bullet_template.BT_angle, al inc si loc_18EB5: cmp si, 8 jl short loc_18E73 loc_18EBA: pop si leave retn sub_18DDF endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_18EBD proc near push bp mov bp, sp push 80h call sub_18C32 mov ah, 0 cmp ax, 1 jz short loc_18ED9 cmp ax, 2 jz short loc_18F04 cmp ax, 3 jz short loc_18F4A pop bp retn ; --------------------------------------------------------------------------- loc_18ED9: mov eax, _boss_pos.cur mov _laser_template.coords.origin, eax mov _laser_template.coords.LASER_width, 6 mov _laser_template.LASER_color, 8 mov _laser_template.coords.angle, -16 mov _laser_template.grow_at_age, 30 mov _laser_template.shootout_speed, 104 call randring2_next16_and pascal, 1 mov angle_2D085, al loc_18F04: cmp _laser_template.coords.angle, -16 jnb short loc_18F12 cmp _laser_template.coords.angle, 128 ja short loc_18F5A loc_18F12: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_18F5A cmp angle_2D085, 0 jz short loc_18F2B call lasers_add_shoutout jmp short loc_18F40 ; --------------------------------------------------------------------------- loc_18F2B: mov al, 128 sub al, _laser_template.coords.angle mov _laser_template.coords.angle, al call lasers_add_shoutout mov al, 128 sub al, _laser_template.coords.angle mov _laser_template.coords.angle, al loc_18F40: mov al, _laser_template.coords.angle add al, 10 mov _laser_template.coords.angle, al pop bp retn ; --------------------------------------------------------------------------- loc_18F4A: mov _boss_mode, 0 mov _boss_phase_frame, 0 mov _boss_sprite, 180 loc_18F5A: pop bp retn sub_18EBD endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_18F5C proc near push bp mov bp, sp push 40h call sub_18C32 mov ah, 0 cmp ax, 1 jz short loc_18F72 cmp ax, 3 jz short loc_18FD0 pop bp retn ; --------------------------------------------------------------------------- loc_18F72: mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_V_RED mov _bullet_template.pattern, BP_RING_STACK_AIMED mov al, byte_2D080 mov _bullet_template.speed, al cmp byte_2D080, 20h ; ' ' jnb short loc_18F93 add al, 4 mov byte_2D080, al loc_18F93: 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 or ax, ax jz short loc_18FBB mov byte_2C977, 20h ; ' ' jmp short loc_18FC0 ; --------------------------------------------------------------------------- loc_18FBB: mov byte_2C977, 0E0h loc_18FC0: call _bullet_template_tune call snd_se_play pascal, 15 call sub_15A70 pop bp retn ; --------------------------------------------------------------------------- loc_18FD0: mov _boss_mode, 0 mov _boss_phase_frame, 0 mov _boss_sprite, 180 pop bp retn sub_18F5C endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_18FE2 proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 32 cwd idiv bx or dx, dx jnz short loc_19038 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD_AIMED 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 _bullet_template_tune mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx or dx, dx jnz short loc_19029 mov _bullet_template.BT_angle, 1Fh jmp short loc_1902E ; --------------------------------------------------------------------------- loc_19029: mov _bullet_template.BT_angle, -1Fh loc_1902E: call sub_15A70 call snd_se_play pascal, 3 loc_19038: pop bp retn sub_18FE2 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public LOUISE_UPDATE louise_update proc far push bp mov bp, sp mov ax, _boss_pos.cur.x mov _homing_target.x, ax mov ax, _boss_pos.cur.y mov _homing_target.y, ax inc _boss_phase_frame mov _bullet_template.spawn_type, BST_NORMAL mov eax, _boss_pos.cur mov _bullet_template.BT_origin, eax mov _gather_template.GT_center, eax mov al, _boss_phase mov ah, 0 mov bx, ax cmp bx, 7 ja loc_1925E add bx, bx jmp cs:off_19270[bx] loc_19073: cmp _boss_phase_frame, 1 jnz short loc_19097 mov _boss_hp, 4400 mov _boss_phase_end_hp, 3000 mov _gather_template.GT_radius, (64 shl 4) mov _gather_template.GT_angle_delta, 2 mov _gather_template.GT_ring_points, 8 loc_19097: call sub_1FB07 cmp _boss_phase_frame, 128 jl loc_19263 inc _boss_phase mov _boss_phase_frame, 0 call snd_se_play pascal, 13 mov fp_23F5A, offset louise_bg_render jmp loc_19263 ; --------------------------------------------------------------------------- loc_190BE: call sub_1FB07 cmp _boss_phase_frame, 64 jl loc_19263 inc _boss_phase mov _boss_phase_frame, 0 mov _boss_mode, 1 mov _boss_mode_change, 0 mov byte_2D080, 18h mov angle_2D085, 0 jmp loc_19263 ; --------------------------------------------------------------------------- loc_190EB: mov al, _boss_mode mov ah, 0 or ax, ax jz short loc_19100 cmp ax, 1 jz short loc_1912A cmp ax, 2 jz short loc_1912F jmp short loc_19132 ; --------------------------------------------------------------------------- loc_19100: push 100060h call sub_18BB8 or al, al jz short loc_19132 mov _boss_phase_frame, 0 inc _boss_mode_change mov al, _boss_mode_change and al, 1 inc al mov _boss_mode, al cmp _boss_mode_change, 20 jb short loc_19132 jmp short loc_19140 ; --------------------------------------------------------------------------- loc_1912A: call sub_18C94 jmp short loc_19132 ; --------------------------------------------------------------------------- loc_1912F: call sub_18D54 loc_19132: call sub_1FADD or al, al jz loc_19263 push 0Ah call sub_17416 loc_19140: push (ET_NW_SE shl 16) or 1900 jmp loc_191FD ; --------------------------------------------------------------------------- loc_19149: call sub_1FADD cmp _boss_phase_frame, 64 jl loc_19263 jmp loc_1920C ; --------------------------------------------------------------------------- loc_19158: call sub_18DDF push 0E0080h call sub_18BB8 or al, al jz short loc_19179 mov _boss_phase_frame, 0 inc _boss_mode_change cmp _boss_mode_change, 20 jnb short loc_19187 loc_19179: call sub_1FADD or al, al jz loc_19263 push 0Ah call sub_17416 loc_19187: call boss_phase_end pascal, (ET_SW_NE shl 16) or 500 mov angle_2D084, 0 mov byte_2D080, 14h jmp loc_19263 ; --------------------------------------------------------------------------- loc_1919D: mov al, _boss_mode mov ah, 0 or ax, ax jz short loc_191B2 cmp ax, 1 jz short loc_191E3 cmp ax, 2 jz short loc_191E8 jmp short loc_191EB ; --------------------------------------------------------------------------- loc_191B2: push 300030h call sub_18BB8 or al, al jz short loc_191EB mov al, angle_2D084 inc al mov _boss_mode, al mov al, 1 sub al, angle_2D084 mov angle_2D084, al mov _boss_phase_frame, 0 inc _boss_mode_change cmp _boss_mode_change, 20 jb short loc_191EB jmp short loc_191F7 ; --------------------------------------------------------------------------- loc_191E3: call sub_18EBD jmp short loc_191EB ; --------------------------------------------------------------------------- loc_191E8: call sub_18F5C loc_191EB: call sub_1FADD or al, al jz short loc_19263 push 0Ah call sub_17416 loc_191F7: push (ET_NW_SE shl 16) or 0 loc_191FD: call boss_phase_end jmp short loc_19263 ; --------------------------------------------------------------------------- loc_19202: call sub_1FADD cmp _boss_phase_frame, 64 jl short loc_19263 loc_1920C: mov _boss_phase_frame, 0 inc _boss_phase mov _boss_sprite, 188 jmp short loc_19263 ; --------------------------------------------------------------------------- loc_1921D: call sub_18FE2 push 80080h call sub_18BB8 or al, al jz short loc_19245 mov _boss_phase_frame, 0 inc _boss_mode_change cmp _boss_mode_change, 10 jb short loc_19245 mov _boss_mode_change, 0 jmp short loc_19251 ; --------------------------------------------------------------------------- loc_19245: call sub_1FADD or al, al jz short loc_19263 mov _boss_mode_change, 1 loc_19251: mov _boss_phase_frame, 0 mov _boss_phase, PHASE_BOSS_EXPLODE_SMALL jmp short loc_19263 ; --------------------------------------------------------------------------- loc_1925E: push 0Ah call boss_death_sequence_function loc_19263: push _boss_hp push 1130h call sub_17354 pop bp retf louise_update endp ; --------------------------------------------------------------------------- db 0 off_19270 dw offset loc_19073 dw offset loc_190BE dw offset loc_190EB dw offset loc_19149 dw offset loc_19158 dw offset loc_1919D dw offset loc_19202 dw offset loc_1921D ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19280 proc near push bp mov bp, sp test byte ptr _midboss_phase_frame, 3 jnz short loc_192F1 cmp angle_2D085, 0 jnz short loc_192D1 inc _midboss_sprite cmp _midboss_sprite, 220 jb short loc_192F1 mov _midboss_sprite, 219 add _midboss_pos.cur.y, (12 shl 4) mov ax, _player_pos.cur.x mov _midboss_pos.cur.x, ax cmp _midboss_pos.cur.x, (64 shl 4) jge short loc_192BD mov _midboss_pos.cur.x, (64 shl 4) jmp short loc_192CB ; --------------------------------------------------------------------------- loc_192BD: cmp _midboss_pos.cur.x, (320 shl 4) jle short loc_192CB mov _midboss_pos.cur.x, (320 shl 4) loc_192CB: inc angle_2D085 pop bp retn ; --------------------------------------------------------------------------- loc_192D1: dec _midboss_sprite cmp _midboss_sprite, 212 jnb short loc_192F1 mov _midboss_sprite, 208 mov angle_2D085, 0 mov _midboss_phase_frame, 0 mov angle_2D084, 0 loc_192F1: pop bp retn sub_19280 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_192F3 proc near push bp mov bp, sp mov ax, _midboss_phase_frame dec ax call gather_add_only_3stack pascal, ax, large (11 shl 16) or 10 cmp _midboss_phase_frame, 1 jnz short loc_19319 call snd_se_play pascal, 8 mov _midboss_sprite, 210 pop bp retn ; --------------------------------------------------------------------------- loc_19319: cmp _midboss_phase_frame, 16 jnz short loc_19325 mov _midboss_sprite, 211 loc_19325: pop bp retn sub_192F3 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19327 proc near push bp mov bp, sp cmp _midboss_phase_frame, 32 jge short loc_19336 call sub_192F3 pop bp retn ; --------------------------------------------------------------------------- loc_19336: cmp _midboss_phase_frame, 32 jnz short loc_1937A mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS 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 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 _bullet_template_tune call sub_15A5C call snd_se_play pascal, 15 mov ax, _midboss_pos.cur.y mov _midboss_pos.prev.y, ax sub _midboss_pos.cur.y, (4 shl 4) pop bp retn ; --------------------------------------------------------------------------- loc_1937A: cmp _midboss_phase_frame, 48 jnz short loc_19396 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 _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 ; --------------------------------------------------------------------------- loc_193B2: cmp _midboss_phase_frame, 96 jl short loc_193BC call sub_19280 loc_193BC: pop bp retn sub_19327 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_193BE proc near push bp mov bp, sp cmp _midboss_phase_frame, 32 jge short loc_193CD call sub_192F3 pop bp retn ; --------------------------------------------------------------------------- loc_193CD: cmp _midboss_phase_frame, 32 jnz short loc_193F5 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN 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 _bullet_template.BT_stack, (8 shl 8) or 8 mov _bullet_template.BT_angle, 0 jmp short loc_19420 ; --------------------------------------------------------------------------- loc_193F5: cmp _midboss_phase_frame, 48 jnz short loc_19437 mov _bullet_template.pattern, BP_SPREAD_STACK_AIMED 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 _bullet_template.spread, ax mov word ptr _bullet_template.BT_stack, (8 shl 8) or 8 loc_19420: call sub_15A5C call snd_se_play pascal, 15 mov ax, _midboss_pos.cur.y mov _midboss_pos.prev.y, ax sub _midboss_pos.cur.y, (4 shl 4) pop bp retn ; --------------------------------------------------------------------------- loc_19437: cmp _midboss_phase_frame, 64 jnz short loc_19451 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 ; --------------------------------------------------------------------------- loc_19451: cmp _midboss_phase_frame, 96 jl short loc_1945B call sub_19280 loc_1945B: pop bp retn sub_193BE endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1945D proc near push bp mov bp, sp cmp _midboss_phase_frame, 32 jge short loc_1946C call sub_192F3 pop bp retn ; --------------------------------------------------------------------------- loc_1946C: cmp _midboss_phase_frame, 32 jnz short loc_194B1 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_D_BLUE mov _bullet_template.speed, (3 shl 4) mov _bullet_template.pattern, BP_SPREAD mov _bullet_template.spread, 16 mov _bullet_template.spread_angle_delta, 8 mov _bullet_template.BT_angle, 40h loc_19496: call _bullet_template_tune call sub_15A5C call snd_se_play pascal, 15 mov ax, _midboss_pos.cur.y mov _midboss_pos.prev.y, ax sub _midboss_pos.cur.y, (4 shl 4) pop bp retn ; --------------------------------------------------------------------------- loc_194B1: cmp _midboss_phase_frame, 48 jnz short loc_194C9 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 _bullet_template.spread, 16 mov _bullet_template.spread_angle_delta, 8 jmp short loc_19496 ; --------------------------------------------------------------------------- loc_194DC: cmp _midboss_phase_frame, 96 jl short loc_194E6 call sub_19280 loc_194E6: pop bp retn sub_1945D endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MIDBOSS3_UPDATE midboss3_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur mov _bullet_template.BT_origin, eax mov _gather_template.GT_center, eax inc _midboss_phase_frame mov al, _midboss_phase mov ah, 0 or ax, ax jz short loc_1950C cmp ax, 1 jz short loc_1954E jmp loc_19604 ; --------------------------------------------------------------------------- loc_1950C: push offset _midboss_pos call _motion_update_2 call sub_1FA9D pascal, (24 shl 4) or ((24 shl 4) shl 16), 10 cmp _midboss_phase_frame, 192 jl loc_19613 inc _midboss_phase mov _midboss_phase_frame, 0 mov _midboss_angle, 0 mov angle_2D085, 0 mov angle_2D084, 1 mov byte_2D083, 1 mov _midboss_pos.velocity.x, 0 jmp loc_19613 ; --------------------------------------------------------------------------- loc_1954E: mov eax, _midboss_pos.cur mov _midboss_pos.prev, eax mov al, angle_2D084 mov ah, 0 mov bx, ax cmp bx, 3 ja short loc_195A1 add bx, bx jmp cs:off_1962C[bx] loc_19569: cmp _midboss_phase_frame, 32 jl short loc_195A1 mov al, byte_2D083 mov ah, 0 mov bx, 3 cwd idiv bx inc dl mov angle_2D084, dl inc byte_2D083 mov _midboss_phase_frame, 0 cmp byte_2D083, 0Dh jb short loc_195A1 jmp short loc_195DA ; --------------------------------------------------------------------------- loc_19594: call sub_19327 jmp short loc_195A1 ; --------------------------------------------------------------------------- loc_19599: call sub_193BE jmp short loc_195A1 ; --------------------------------------------------------------------------- loc_1959E: call sub_1945D loc_195A1: cmp _midboss_sprite, 212 jnb short loc_195BC call sub_1FA9D pascal, (24 shl 4) or ((24 shl 4) shl 16), 4 mov _midboss_damage_this_frame, al mov ah, 0 sub _midboss_hp, ax loc_195BC: cmp _midboss_hp, 0 jg short loc_19613 mov _bullet_clear_trigger, 1 push 0Fh call sub_173AC call items_add pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, IT_1UP loc_195DA: mov _midboss_phase, PHASE_EXPLODE_BIG mov _midboss_sprite, 4 mov _midboss_phase_frame, 0 call sparks_add_circle pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, large (((8 shl 4) shl 16) or 48) call snd_se_play pascal, 12 jmp short loc_19613 ; --------------------------------------------------------------------------- loc_19604: call sub_17486 push _midboss_hp push 1400 call sub_17354 pop bp retf ; --------------------------------------------------------------------------- loc_19613: push _midboss_hp push 1400 call sub_17354 mov ax, _midboss_pos.cur.x mov _homing_target.x, ax mov ax, _midboss_pos.cur.y mov _homing_target.y, ax pop bp retf midboss3_update endp ; --------------------------------------------------------------------------- db 0 off_1962C dw offset loc_19569 dw offset loc_19594 dw offset loc_19599 dw offset loc_1959E ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19634 proc near push bp mov bp, sp push (96 shl 4) push puppet0.radius_motion mov al, puppet0.PUPPET_angle mov ah, 0 add ax, ax mov bx, ax push _CosTable8[bx] call vector1_at mov puppet0.pos.cur.x, ax push (96 shl 4) push puppet0.radius_motion mov al, puppet0.PUPPET_angle mov ah, 0 add ax, ax mov bx, ax push _SinTable8[bx] call vector1_at mov puppet0.pos.cur.y, ax mov al, puppet0.PUPPET_angle add al, -2 mov puppet0.PUPPET_angle, al sub puppet0.radius_motion, (2 shl 4) push (288 shl 4) push puppet1.radius_motion mov al, puppet1.PUPPET_angle mov ah, 0 add ax, ax mov bx, ax push _CosTable8[bx] call vector1_at mov puppet1.pos.cur.x, ax push (96 shl 4) push puppet1.radius_motion mov al, puppet1.PUPPET_angle mov ah, 0 add ax, ax mov bx, ax push _SinTable8[bx] call vector1_at mov puppet1.pos.cur.y, ax mov al, puppet1.PUPPET_angle add al, 2 mov puppet1.PUPPET_angle, al sub puppet1.radius_motion, (2 shl 4) mov eax, dword ptr puppet0.pos.cur mov dword ptr puppet0.pos.prev, eax mov eax, dword ptr puppet1.pos.cur mov dword ptr puppet1.pos.prev, eax pop bp retn sub_19634 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public PUPPETS_UPDATE puppets_update proc near @@i = word ptr -2 enter 2, 0 push si push di mov _shot_hitbox_radius.x, (20 shl 4) mov _shot_hitbox_radius.y, (20 shl 4) mov si, offset puppets mov [bp+@@i], 0 jmp @@more? ; --------------------------------------------------------------------------- @@loop: cmp [si+puppet_t.flag], 0 jz @@next cmp [si+puppet_t.flag], 1 jnz loc_19851 mov eax, dword ptr [si+puppet_t.pos.cur] cmp eax, dword ptr [si+puppet_t.pos.prev] jz short loc_19773 mov ax, [si+puppet_t.pos.prev.x] sub ax, [si+puppet_t.pos.cur.x] mov di, ax mov bx, (2 shl 4) cwd idiv bx or ax, ax jz short loc_1971E mov ax, di jmp short loc_1972C ; --------------------------------------------------------------------------- loc_1971E: mov ax, di mov bx, 4 cwd idiv bx or ax, ax jz short loc_19734 mov ax, di loc_1972C: cwd idiv bx add [si+puppet_t.pos.cur.x], ax jmp short loc_1973A ; --------------------------------------------------------------------------- loc_19734: mov ax, [si+puppet_t.pos.prev.x] mov [si+puppet_t.pos.cur.x], ax loc_1973A: mov ax, [si+puppet_t.pos.prev.y] sub ax, [si+puppet_t.pos.cur.y] mov di, ax mov bx, (2 shl 4) cwd idiv bx or ax, ax jz short loc_19750 mov ax, di jmp short loc_1975E ; --------------------------------------------------------------------------- loc_19750: mov ax, di mov bx, 4 cwd idiv bx or ax, ax jz short loc_19766 mov ax, di loc_1975E: cwd idiv bx add [si+puppet_t.pos.cur.y], ax jmp short loc_1976C ; --------------------------------------------------------------------------- loc_19766: mov ax, [si+puppet_t.pos.prev.y] mov [si+puppet_t.pos.cur.y], ax loc_1976C: mov [si+puppet_t.PUPPET_patnum], 192 jmp short loc_197DC ; --------------------------------------------------------------------------- loc_19773: mov [si+puppet_t.PUPPET_patnum], 190 cmp [bp+@@i], 0 jnz short loc_19785 push si call fp_2CE2A jmp short loc_1978A ; --------------------------------------------------------------------------- loc_19785: push si call fp_2CE2C loc_1978A: mov ah, 0 mov di, ax or di, di jz short loc_197D9 call randring2_next16_mod pascal, (320 shl 4) add ax, (32 shl 4) mov [si+puppet_t.pos.prev.x], ax call randring2_next16_mod pascal, (160 shl 4) add ax, (16 shl 4) mov [si+puppet_t.pos.prev.y], ax cmp [bp+@@i], 0 jnz short loc_197C2 push 3 call randring2_next16_and add ax, ax mov bx, ax mov ax, off_22768[bx] mov fp_2CE2A, ax jmp short loc_197D2 ; --------------------------------------------------------------------------- loc_197C2: push 3 call randring2_next16_and add ax, ax mov bx, ax mov ax, off_22768[bx] mov fp_2CE2C, ax loc_197D2: mov [si+puppet_t.phase_frame], 0 jmp short loc_197DC ; --------------------------------------------------------------------------- loc_197D9: inc [si+puppet_t.phase_frame] loc_197DC: mov ax, [si+puppet_t.pos.cur.x] sub ax, _player_pos.cur.x add ax, 12 * 16 cmp ax, 24 * 16 jnb short loc_197FF mov ax, [si+puppet_t.pos.cur.y] sub ax, _player_pos.cur.y add ax, 12 * 16 cmp ax, 24 * 16 jnb short loc_197FF mov _player_is_hit, 1 loc_197FF: cmp byte_2D07F, 3 jz short loc_1984A mov eax, dword ptr [si+puppet_t.pos.cur] mov dword ptr _shot_hitbox_center, eax call sub_126B3 mov [si+puppet_t.PUPPET_damage_this_frame], ax cmp [si+puppet_t.PUPPET_damage_this_frame], 0 jz short loc_19823 call snd_se_play pascal, 4 loc_19823: mov ax, [si+puppet_t.PUPPET_damage_this_frame] sub [si+puppet_t.PUPPET_hp_cur], ax cmp [si+puppet_t.PUPPET_hp_cur], 0 jge short @@next inc [si+puppet_t.flag] mov [si+puppet_t.PUPPET_patnum], 4 mov [si+puppet_t.PUPPET_damage_this_frame], 0 call snd_se_play pascal, 12 add _score_delta, 100 jmp short @@next ; --------------------------------------------------------------------------- loc_1984A: mov [si+puppet_t.PUPPET_damage_this_frame], 0 jmp short @@next ; --------------------------------------------------------------------------- loc_19851: mov al, [si+puppet_t.flag] mov ah, 0 mov bx, 4 cwd idiv bx or dx, dx jnz short loc_198A3 inc [si+puppet_t.PUPPET_patnum] cmp [si+puppet_t.PUPPET_patnum], 12 jl short loc_198A3 mov [si+puppet_t.flag], 0 mov [si+puppet_t.pos.cur.x], ((PLAYFIELD_W / 2) shl 4) mov [si+puppet_t.pos.cur.y], (-256 shl 4) mov [si+puppet_t.pos.prev.x], ((PLAYFIELD_W / 2) shl 4) mov [si+puppet_t.pos.prev.y], (-16 shl 4) mov [si+puppet_t.PUPPET_hp_cur], PUPPET_HP mov [si+puppet_t.PUPPET_patnum], 192 cmp [bp+@@i], 0 jnz short loc_19897 mov fp_2CE2A, offset sub_19AE3 jmp short loc_1989D ; --------------------------------------------------------------------------- loc_19897: mov fp_2CE2C, offset sub_19AE3 loc_1989D: sub _boss_hp, 300 loc_198A3: inc [si+puppet_t.flag] @@next: inc [bp+@@i] add si, size puppet_t @@more?: cmp [bp+@@i], PUPPET_COUNT jl @@loop pop di pop si leave retn puppets_update endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_198B7 proc near @@puppet = word ptr 4 push bp mov bp, sp push si mov si, [bp+@@puppet] cmp [si+puppet_t.phase_frame], 16 jnz short loc_198CF call circles_add_shrinking pascal, [si+puppet_t.pos.cur.x], [si+puppet_t.pos.cur.y] loc_198CF: cmp [si+puppet_t.phase_frame], 32 jb short loc_19921 cmp [si+puppet_t.phase_frame], 64 jnb short loc_19912 cmp _stage_frame_mod2, 0 jz short loc_19912 mov _bullet_template.patnum, 0 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_SINGLE mov eax, dword ptr [si+puppet_t.pos.cur] mov _bullet_template.BT_origin, eax call randring2_next16 mov _bullet_template.BT_angle, al call _bullet_template_tune call sub_15A5C mov [si+puppet_t.PUPPET_patnum], 194 jmp short loc_19921 ; --------------------------------------------------------------------------- loc_19912: cmp [si+puppet_t.phase_frame], 96 jb short loc_19921 mov [si+puppet_t.PUPPET_patnum], 190 mov al, 1 jmp short loc_19923 ; --------------------------------------------------------------------------- loc_19921: mov al, 0 loc_19923: pop si pop bp retn 2 sub_198B7 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19928 proc near @@puppet = word ptr 4 push bp mov bp, sp push si mov si, [bp+@@puppet] cmp [si+puppet_t.phase_frame], 16 jnz short loc_19940 call circles_add_shrinking pascal, [si+puppet_t.pos.cur.x], [si+puppet_t.pos.cur.y] loc_19940: cmp [si+puppet_t.phase_frame], 32 jb short loc_19993 mov [si+puppet_t.PUPPET_patnum], 194 cmp [si+puppet_t.phase_frame], 32 jnz short loc_19984 mov _bullet_template.patnum, 0 mov eax, dword ptr [si+puppet_t.pos.cur] mov _bullet_template.BT_origin, eax mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.speed, (1 shl 4) + 8 mov _bullet_template.pattern, BP_SPREAD_STACK_AIMED 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 _bullet_template_tune call sub_15A5C jmp short loc_19993 ; --------------------------------------------------------------------------- loc_19984: cmp [si+puppet_t.phase_frame], 96 jb short loc_19993 mov [si+puppet_t.PUPPET_patnum], 190 mov al, 1 jmp short loc_19995 ; --------------------------------------------------------------------------- loc_19993: mov al, 0 loc_19995: pop si pop bp retn 2 sub_19928 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1999A proc near @@puppet = word ptr 4 push bp mov bp, sp push si mov si, [bp+@@puppet] cmp [si+puppet_t.phase_frame], 16 jnz short loc_199B2 call circles_add_shrinking pascal, [si+puppet_t.pos.cur.x], [si+puppet_t.pos.cur.y] loc_199B2: cmp [si+puppet_t.phase_frame], 32 jb short loc_19A08 mov [si+puppet_t.PUPPET_patnum], 194 cmp [si+puppet_t.phase_frame], 64 jnb short loc_199F9 test byte ptr [si+puppet_t.phase_frame], 7 jnz short loc_199F9 mov _bullet_template.patnum, 0 mov eax, dword ptr [si+puppet_t.pos.cur] mov _bullet_template.BT_origin, eax mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_SPREAD_AIMED mov word ptr _bullet_template.spread, (16 shl 8) or 5 mov _bullet_template.BT_angle, 0 call _bullet_template_tune call sub_15A5C jmp short loc_19A08 ; --------------------------------------------------------------------------- loc_199F9: cmp [si+puppet_t.phase_frame], 96 jb short loc_19A08 mov [si+puppet_t.PUPPET_patnum], 190 mov al, 1 jmp short loc_19A0A ; --------------------------------------------------------------------------- loc_19A08: mov al, 0 loc_19A0A: pop si pop bp retn 2 sub_1999A endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19A0F proc near @@puppet = word ptr 4 push bp mov bp, sp push si mov si, [bp+@@puppet] cmp [si+puppet_t.phase_frame], 16 jnz short loc_19A27 call circles_add_shrinking pascal, [si+puppet_t.pos.cur.x], [si+puppet_t.pos.cur.y] loc_19A27: cmp [si+puppet_t.phase_frame], 32 jb short loc_19A7D mov [si+puppet_t.PUPPET_patnum], 194 cmp [si+puppet_t.phase_frame], 64 jnb short loc_19A6E test byte ptr [si+puppet_t.phase_frame], 7 jnz short loc_19A6E mov _bullet_template.patnum, 0 mov eax, dword ptr [si+puppet_t.pos.cur] mov _bullet_template.BT_origin, eax mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_RING_AIMED mov word ptr _bullet_template.spread, (8 shl 8) or 12 mov _bullet_template.BT_angle, 0 call _bullet_template_tune call sub_15A5C jmp short loc_19A7D ; --------------------------------------------------------------------------- loc_19A6E: cmp [si+puppet_t.phase_frame], 96 jb short loc_19A7D mov [si+puppet_t.PUPPET_patnum], 190 mov al, 1 jmp short loc_19A7F ; --------------------------------------------------------------------------- loc_19A7D: mov al, 0 loc_19A7F: pop si pop bp retn 2 sub_19A0F endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19A84 proc near @@puppet = word ptr 4 push bp mov bp, sp push si mov si, [bp+@@puppet] cmp [si+puppet_t.phase_frame], 16 jnz short loc_19A9C call circles_add_shrinking pascal, [si+puppet_t.pos.cur.x], [si+puppet_t.pos.cur.y] loc_19A9C: cmp [si+puppet_t.phase_frame], 32 jb short loc_19ADC mov [si+puppet_t.PUPPET_patnum], 194 test byte ptr _stage_frame, 1Fh jnz short loc_19ADC mov _bullet_template.patnum, 0 mov eax, dword ptr [si+puppet_t.pos.cur] mov _bullet_template.BT_origin, eax mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.speed, (1 shl 4) + 8 mov _bullet_template.pattern, BP_SPREAD_AIMED mov word ptr _bullet_template.spread, (12 shl 8) or 7 mov _bullet_template.BT_angle, 0 call _bullet_template_tune call sub_15A5C loc_19ADC: mov al, 0 pop si pop bp retn 2 sub_19A84 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19AE3 proc near @@puppet = word ptr 4 push bp mov bp, sp push si mov si, [bp+@@puppet] cmp [si+puppet_t.phase_frame], 96 jb short loc_19AF4 mov al, 1 jmp short loc_19AF6 ; --------------------------------------------------------------------------- loc_19AF4: mov al, 0 loc_19AF6: pop si pop bp retn 2 sub_19AE3 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19AFB proc near push bp mov bp, sp mov al, 0 pop bp retn 2 sub_19AFB endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19B04 proc near push bp mov bp, sp push si cmp _boss_phase_frame, 64 jge short loc_19B2F mov ax, _boss_phase_frame add ax, -40 call gather_add_only_3stack pascal, ax, large (9 shl 16) or 8 mov _boss_sprite, 184 cmp _boss_phase_frame, 40 jnz short loc_19B9B push 8 jmp short loc_19B96 ; --------------------------------------------------------------------------- loc_19B2F: cmp _boss_phase_frame, 64 jnz short loc_19B9B mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED mov _bullet_template.spread, 2 call _bullet_template_tune xor si, si jmp short loc_19B8A ; --------------------------------------------------------------------------- loc_19B4D: test si, 1 jz short loc_19B57 mov al, PAT_BULLET16_N_BLUE jmp short loc_19B59 ; --------------------------------------------------------------------------- loc_19B57: mov al, 0 loc_19B59: 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 _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 _bullet_template.BT_origin.y, ax call sub_15A5C inc si loc_19B8A: cmp si, 20h ; ' ' jl short loc_19B4D mov _boss_sprite, 182 push 15 loc_19B96: call snd_se_play loc_19B9B: pop si pop bp retn sub_19B04 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19B9E proc near push bp mov bp, sp call sub_19B04 cmp _boss_phase_frame, 96 jnz short loc_19BB6 mov _boss_phase_frame, 0 mov _boss_mode, 0 loc_19BB6: pop bp retn sub_19B9E endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19BB8 proc near push bp mov bp, sp cmp _boss_phase_frame, 64 jge short loc_19BE2 mov ax, _boss_phase_frame add ax, -40 call gather_add_only_3stack pascal, ax, large (9 shl 16) or 8 mov _boss_sprite, 184 cmp _boss_phase_frame, 40 jnz short loc_19C32 push 8 jmp short loc_19C19 ; --------------------------------------------------------------------------- loc_19BE2: cmp _boss_phase_frame, 64 jnz short loc_19C20 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_RING_STACK_AIMED 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 _bullet_template_tune call sub_15A5C mov _boss_sprite, 180 push 0Fh loc_19C19: call snd_se_play pop bp retn ; --------------------------------------------------------------------------- loc_19C20: cmp _boss_phase_frame, 96 jnz short loc_19C32 mov _boss_phase_frame, 0 mov _boss_mode, 0 loc_19C32: pop bp retn sub_19BB8 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19C34 proc near push bp mov bp, sp cmp _boss_phase_frame, 64 jge short loc_19C5E mov ax, _boss_phase_frame add ax, -40 call gather_add_only_3stack pascal, ax, large (9 shl 16) or 8 mov _boss_sprite, 184 cmp _boss_phase_frame, 40 jnz short loc_19CAE push 8 jmp short loc_19C95 ; --------------------------------------------------------------------------- loc_19C5E: cmp _boss_phase_frame, 64 jnz short loc_19C9C mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD_STACK_AIMED 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 _bullet_template_tune call sub_15A5C mov _boss_sprite, 180 push 15 loc_19C95: call snd_se_play pop bp retn ; --------------------------------------------------------------------------- loc_19C9C: cmp _boss_phase_frame, 96 jnz short loc_19CAE mov _boss_phase_frame, 0 mov _boss_mode, 0 loc_19CAE: pop bp retn sub_19C34 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19CB0 proc near var_2 = word ptr -2 enter 2, 0 mov eax, puppet0.pos.cur cmp eax, puppet0.pos.prev jnz locret_19E10 mov eax, puppet1.pos.cur cmp eax, puppet1.pos.prev jnz locret_19E10 inc word_2CE2E cmp word_2CE2E, 10h jb locret_19E10 cmp word_2CE2E, 10h jnz short loc_19CFC mov byte_2D07F, 1 mov ax, 64 mov puppet1.radius_gather, ax mov puppet0.radius_gather, ax mov byte_2D07E, 0C4h add word_2CE30, 20h ; ' ' leave retn ; --------------------------------------------------------------------------- loc_19CFC: cmp word_2CE2E, 20h ; ' ' jb locret_19E10 cmp word_2CE2E, 40h jnb short loc_19D22 mov byte_2D07F, 2 mov ax, 64 sub ax, word_2CE2E add ax, ax mov puppet1.radius_gather, ax mov puppet0.radius_gather, ax leave retn ; --------------------------------------------------------------------------- loc_19D22: cmp word_2CE2E, 50h ; 'P' jnb short loc_19D56 cmp word_2CE2E, 40h jnz short loc_19D37 call snd_se_play pascal, 8 loc_19D37: mov byte_2D07F, 3 cmp word_2CE2E, 47h ; 'G' jz short loc_19D4C cmp word_2CE2E, 4Fh ; 'O' jnz locret_19E10 loc_19D4C: mov al, byte_2D07E add al, 2 mov byte_2D07E, al leave retn ; --------------------------------------------------------------------------- loc_19D56: mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, 0 mov _bullet_template.speed, (1 shl 4) + 8 mov _bullet_template.pattern, BP_SINGLE call _bullet_template_tune mov _shot_hitbox_radius.x, (56 shl 4) mov _shot_hitbox_radius.y, (8 shl 4) mov eax, puppet0.pos.cur mov _shot_hitbox_center, eax add _shot_hitbox_center.x, (64 shl 4) call sub_12842 mov [bp+var_2], ax cmp [bp+var_2], 0 jz short loc_19D9D call snd_se_play pascal, 9 loc_19D9D: mov ax, _player_pos.cur.x sub ax, puppet0.pos.cur.x cmp ax, (128 shl 4) jnb short loc_19DBD mov ax, puppet0.pos.cur.y sub ax, _player_pos.cur.y add ax, (4 shl 4) cmp ax, (8 shl 4) jnb short loc_19DBD mov _player_is_hit, 1 loc_19DBD: mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short locret_19E10 mov ax, _boss_phase_frame mov bx, 256 cwd idiv bx cmp dx, word_2CE30 jnb short locret_19E10 mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_STACK_AIMED mov _bullet_template.BT_angle, 0 mov ax, _boss_pos.cur.x mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) 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 _bullet_template_tune call sub_15A5C call snd_se_play pascal, 3 locret_19E10: leave retn sub_19CB0 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19E12 proc near push bp mov bp, sp cmp _boss_phase_frame, 64 jge short loc_19E43 mov ax, _boss_phase_frame add ax, -40 call gather_add_only_3stack pascal, ax, large (9 shl 16) or 8 mov _boss_sprite, 184 cmp _boss_phase_frame, 40 jnz loc_19ED8 call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- loc_19E43: cmp _boss_phase_frame, 64 jnz short loc_19EC6 mov _laser_template.LASER_color, 6 mov _laser_template.coords.LASER_width, 8 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) mov ax, _player_pos.cur.y sub ax, _laser_template.coords.origin.y push ax mov ax, _player_pos.cur.x sub ax, _laser_template.coords.origin.x push ax call iatan2 mov _laser_template.coords.angle, al call lasers_add_shoutout mov al, _laser_template.coords.angle add al, 16 mov _laser_template.coords.angle, al call lasers_add_shoutout mov al, _laser_template.coords.angle add al, -32 mov _laser_template.coords.angle, al call lasers_add_shoutout mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED 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 _bullet_template_tune call sub_15A5C mov _boss_sprite, 180 pop bp retn ; --------------------------------------------------------------------------- loc_19EC6: cmp _boss_phase_frame, 96 jnz short loc_19ED8 mov _boss_phase_frame, 0 mov _boss_mode, 0 loc_19ED8: pop bp retn sub_19E12 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19EDA proc near push bp mov bp, sp cmp _boss_phase_frame, 64 jge short loc_19F0E mov ax, _boss_phase_frame add ax, -40 call gather_add_only_3stack pascal, ax, large (9 shl 16) or 8 mov _boss_sprite, 184 mov angle_2D085, 8 cmp _boss_phase_frame, 40 jnz short loc_19F73 call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- loc_19F0E: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_19F61 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_STACK_AIMED 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 _bullet_template_tune mov al, angle_2D085 mov _bullet_template.BT_angle, al call sub_15A5C mov al, _bullet_template.BT_angle neg al mov _bullet_template.BT_angle, al call sub_15A5C mov al, angle_2D085 add al, 5 mov angle_2D085, al mov _boss_sprite, 180 call snd_se_play pascal, 15 loc_19F61: cmp _boss_phase_frame, 96 jnz short loc_19F73 mov _boss_phase_frame, 0 mov _boss_mode, 0 loc_19F73: pop bp retn sub_19EDA endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_19F75 proc near push bp mov bp, sp cmp _boss_phase_frame, 64 jge short loc_19FA9 mov ax, _boss_phase_frame add ax, -40 call gather_add_only_3stack pascal, ax, large (9 shl 16) or 8 mov _boss_sprite, 184 mov angle_2D085, 0 cmp _boss_phase_frame, 40 jnz short loc_1A003 call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- loc_19FA9: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_19FF1 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_RING 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 _bullet_template_tune mov al, angle_2D085 mov _bullet_template.BT_angle, al call sub_15A5C mov al, angle_2D085 add al, 2 mov angle_2D085, al mov _boss_sprite, 180 call snd_se_play pascal, 3 loc_19FF1: cmp _boss_phase_frame, 96 jnz short loc_1A003 mov _boss_phase_frame, 0 mov _boss_mode, 0 loc_1A003: pop bp retn sub_19F75 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1A005 proc near push bp mov bp, sp mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD 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 _bullet_template.speed, (2 shl 4) mov word ptr _bullet_template.spread, (10 shl 8) or 13 call _bullet_template_tune call sub_15A5C call snd_se_play pascal, 3 loc_1A042: pop bp retn sub_1A005 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public ALICE_UPDATE alice_update proc far push bp mov bp, sp push si mov ax, _boss_pos.cur.x mov _homing_target.x, ax mov ax, _boss_pos.cur.y mov _homing_target.y, ax inc _boss_phase_frame mov _bullet_template.spawn_type, BST_NORMAL mov ax, _boss_pos.cur.x mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) mov _bullet_template.BT_origin.y, ax mov eax, _bullet_template.BT_origin mov _gather_template.GT_center, eax mov al, _boss_phase mov ah, 0 mov bx, ax cmp bx, 0Eh ja loc_1A3AD add bx, bx jmp cs:off_1A3D1[bx] loc_1A089: cmp _boss_phase_frame, 1 jnz short loc_1A0AD mov _boss_hp, 9600 mov _boss_phase_end_hp, 7400 mov _gather_template.GT_radius, (64 shl 4) mov _gather_template.GT_angle_delta, 2 mov _gather_template.GT_ring_points, 8 loc_1A0AD: call sub_1FB07 cmp _boss_phase_frame, 128 jl loc_1A3B2 inc _boss_phase mov _boss_phase_frame, 0 call snd_se_play pascal, 13 mov fp_23F5A, offset alice_bg_render jmp loc_1A3B2 ; --------------------------------------------------------------------------- loc_1A0D4: call sub_1FB07 cmp _boss_phase_frame, 64 jl loc_1A3B2 inc _boss_phase mov _boss_phase_frame, 0 mov _boss_mode, 1 mov _boss_mode_change, 0 mov byte_2D080, 18h mov byte_2D07F, 0 jmp loc_1A3B2 ; --------------------------------------------------------------------------- loc_1A101: call sub_19B04 call sub_1FADD cmp _boss_phase_frame, 128 jnz short loc_1A15A mov si, offset puppets mov [si+puppet_t.flag], 1 mov [si+puppet_t.PUPPET_patnum], 190 mov [si+puppet_t.radius_motion], (256 shl 4) mov [si+puppet_t.PUPPET_angle], 60h mov [si+puppet_t.PUPPET_hp_cur], PUPPET_HP mov [si+puppet_t.pos.cur.x], SUBPIXEL_NONE add si, size puppet_t mov [si+puppet_t.flag], 1 mov [si+puppet_t.PUPPET_patnum], 190 mov [si+puppet_t.radius_motion], (256 shl 4) mov [si+puppet_t.PUPPET_angle], 20h mov [si+puppet_t.PUPPET_hp_cur], PUPPET_HP mov [si+puppet_t.pos.cur.x], SUBPIXEL_NONE mov fp_2CE2A, offset sub_198B7 mov fp_2CE2C, offset sub_198B7 jmp loc_1A3B2 ; --------------------------------------------------------------------------- loc_1A15A: cmp _boss_phase_frame, 128 jle loc_1A3B2 call sub_19634 cmp puppet0.radius_motion, 0 jnz loc_1A3B2 inc _boss_phase mov _boss_mode, 0 mov _boss_phase_frame, 0 mov _boss_mode_change, 0 mov byte_2D07D, 0 mov word_2CE30, 0A0h jmp loc_1A3B2 ; --------------------------------------------------------------------------- loc_1A192: mov al, _boss_mode mov ah, 0 or ax, ax jz short loc_1A1A2 cmp ax, 1 jz short loc_1A1E3 jmp short loc_1A1E7 ; --------------------------------------------------------------------------- loc_1A1A2: mov ax, _boss_phase_frame add ax, -8 call boss_flystep_random pascal, ax or al, al jz short loc_1A1E7 mov _boss_mode, 1 mov _boss_phase_frame, 0 inc _boss_mode_change cmp _boss_mode_change, 24 jnb short loc_1A1F8 push 3 call randring2_next16_mod add ax, ax mov dl, byte_2D07D mov dh, 0 imul dx, 6 add ax, dx mov bx, ax mov ax, off_22770[bx] mov fp_2CE32, ax jmp short loc_1A1E7 ; --------------------------------------------------------------------------- loc_1A1E3: call fp_2CE32 loc_1A1E7: call sub_1FADD or al, al jz loc_1A3B2 push 7 call sub_17416 call _boss_items_drop loc_1A1F8: inc byte_2D07D cmp _bullet_clear_time, 20 jnb short loc_1A208 mov _bullet_clear_time, 20 loc_1A208: call boss_explode_small pascal, ET_NW_SE inc _boss_phase mov _boss_phase_frame, 0 mov _boss_mode_change, 0 mov _boss_mode, 0 mov ax, _boss_phase_end_hp mov _boss_hp, ax cmp _boss_phase, 0Ch jnb short loc_1A236 sub _boss_phase_end_hp, 2200 jmp short loc_1A23C ; --------------------------------------------------------------------------- loc_1A236: mov _boss_phase_end_hp, 0 loc_1A23C: mov word_2CE2E, 0 jmp loc_1A3B2 ; --------------------------------------------------------------------------- loc_1A245: mov puppet0.pos.prev.x, (128 shl 4) mov puppet0.pos.prev.y, (128 shl 4) mov puppet1.pos.prev.x, (256 shl 4) mov puppet1.pos.prev.y, (128 shl 4) mov puppet0.PUPPET_hp_cur, PUPPET_HP mov puppet1.PUPPET_hp_cur, PUPPET_HP mov ax, offset sub_19AFB mov fp_2CE2C, ax mov fp_2CE2A, ax push (((PLAYFIELD_W / 2) shl 4) shl 16) or (64 shl 4) call boss_flystep_towards or al, al jz loc_1A359 jmp loc_1A34F ; --------------------------------------------------------------------------- loc_1A284: mov puppet0.pos.prev.x, (128 shl 4) mov puppet0.pos.prev.y, (128 shl 4) mov puppet1.pos.prev.x, (256 shl 4) mov puppet1.pos.prev.y, (128 shl 4) mov puppet0.PUPPET_hp_cur, PUPPET_HP mov puppet1.PUPPET_hp_cur, PUPPET_HP mov ax, offset sub_19AFB mov fp_2CE2C, ax mov fp_2CE2A, ax call sub_19CB0 call sub_1FADD cmp _boss_phase_frame, 600 jl loc_1A3B2 push 5 call sub_17416 call boss_explode_small pascal, ET_NW_SE cmp _bullet_clear_time, 20 jnb short loc_1A2D7 mov _bullet_clear_time, 20 loc_1A2D7: inc _boss_phase mov _boss_phase_frame, 0 mov byte_2D07F, 0 mov puppet0.pos.prev.x, (320 shl 4) mov puppet0.pos.prev.y, (96 shl 4) mov puppet1.pos.prev.x, (64 shl 4) mov puppet1.pos.prev.y, (96 shl 4) xor ax, ax mov puppet1.phase_frame, ax mov puppet0.phase_frame, ax mov fp_2CE2A, offset sub_19928 mov fp_2CE2C, offset sub_19928 jmp loc_1A3B2 ; --------------------------------------------------------------------------- loc_1A315: mov puppet0.pos.prev.x, (64 shl 4) mov puppet0.pos.prev.y, (128 shl 4) mov puppet1.pos.prev.x, (320 shl 4) mov puppet1.pos.prev.y, (128 shl 4) mov puppet0.PUPPET_hp_cur, PUPPET_HP mov puppet1.PUPPET_hp_cur, PUPPET_HP mov ax, offset sub_19A84 mov fp_2CE2C, ax mov fp_2CE2A, ax push (((PLAYFIELD_W / 2) shl 4) shl 16) or (64 shl 4) call boss_flystep_towards or al, al jz short loc_1A359 loc_1A34F: mov _boss_phase_frame, 0 inc _boss_phase loc_1A359: call sub_1FADD jmp short loc_1A3B2 ; --------------------------------------------------------------------------- loc_1A35E: mov puppet0.pos.prev.x, (64 shl 4) mov puppet0.pos.prev.y, (128 shl 4) mov puppet1.pos.prev.x, (320 shl 4) mov puppet1.pos.prev.y, (128 shl 4) mov ax, offset sub_19A84 mov fp_2CE2C, ax mov fp_2CE2A, ax call sub_1A005 cmp _boss_phase_frame, 1000 jge short loc_1A396 call sub_1FADD or al, al jz short loc_1A3B2 mov _boss_mode_change, 1 loc_1A396: mov _boss_phase_frame, 0 mov _boss_phase, PHASE_BOSS_EXPLODE_SMALL mov puppet0.flag, 2 mov puppet1.flag, 2 jmp short loc_1A3B2 ; --------------------------------------------------------------------------- loc_1A3AD: push 0Ah call boss_death_sequence_function loc_1A3B2: push _boss_hp push 2580h call sub_17354 cmp _boss_phase, 3 jb short loc_1A3CD cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnb short loc_1A3CD call puppets_update loc_1A3CD: pop si pop bp retf alice_update endp ; --------------------------------------------------------------------------- db 0 off_1A3D1 dw offset loc_1A089 dw offset loc_1A0D4 dw offset loc_1A101 dw offset loc_1A192 dw offset loc_1A245 dw offset loc_1A284 dw offset loc_1A192 dw offset loc_1A245 dw offset loc_1A284 dw offset loc_1A192 dw offset loc_1A245 dw offset loc_1A284 dw offset loc_1A192 dw offset loc_1A315 dw offset loc_1A35E ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame mai_yuki_1A3EF proc near @@se = word ptr 4 @@radius_y = word ptr 6 @@radius_x = word ptr 8 push bp mov bp, sp push si mov byte_2297E, 1 mov ax, [bp+@@radius_x] mov _shot_hitbox_radius.x, ax mov ax, [bp+@@radius_y] mov _shot_hitbox_radius.y, ax mov eax, _yuki_pos.cur mov _shot_hitbox_center, eax call sub_126B3 mov si, ax or si, si jz short loc_1A41F call snd_se_play pascal, [bp+@@se] loc_1A41F: mov byte_2297E, 0 mov ax, si pop si pop bp retn 6 mai_yuki_1A3EF endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame mai_yuki_1A42B proc near push bp mov bp, sp call sub_1FADD or al, al jz short loc_1A439 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1A439: call mai_yuki_1A3EF pascal, (24 shl 4) or ((24 shl 4) shl 16), 4 mov _yuki_damage_this_frame, al mov ah, 0 sub _yuki_hp, ax mov ax, _yuki_hp cmp ax, _yuki_phase_end_hp jg short loc_1A45A mov al, 2 pop bp retn ; --------------------------------------------------------------------------- loc_1A45A: mov al, 0 pop bp retn mai_yuki_1A42B endp main_033_TEXT ends main_034_TEXT segment byte public 'CODE' use16 MAI_YUKI_FLYSTEP_RANDOM procdesc pascal near \ frame:word ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame mai_yuki_1A556 proc near push bp mov bp, sp cmp _boss_phase_frame, 48 jge short loc_1A58D mov eax, _boss_pos.cur mov _gather_template.GT_center, eax mov ax, _boss_phase_frame add ax, -24 call gather_add_only_3stack pascal, ax, large (9 shl 16) or 8 mov _boss_sprite, 183 cmp _boss_phase_frame, 32 jnz short loc_1A5B1 call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- loc_1A58D: call fp_2CE36 or al, al jnz short loc_1A59C mov _boss_sprite, 184 pop bp retn ; --------------------------------------------------------------------------- loc_1A59C: mov _boss_phase_frame, 0 mov _boss_mode, 0 mov _boss_sprite, 180 mov _yuki_sprite, 180 loc_1A5B1: pop bp retn mai_yuki_1A556 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame mai_yuki_1A5B3 proc near push bp mov bp, sp cmp _boss_phase_frame, 48 jge short loc_1A5DC mov eax, _yuki_pos.cur mov _gather_template.GT_center, eax mov ax, _boss_phase_frame add ax, -24 call gather_add_only_3stack pascal, ax, large (9 shl 16) or 8 mov _yuki_sprite, 183 pop bp retn ; --------------------------------------------------------------------------- loc_1A5DC: call fp_2CE38 or al, al jnz short loc_1A5E9 mov _yuki_sprite, 184 loc_1A5E9: pop bp retn mai_yuki_1A5B3 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1A5EB proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 6 cwd idiv bx or dx, dx jnz short loc_1A641 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_STACK_AIMED 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 _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) 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 _bullet_template_tune call sub_15A5C call snd_se_play pascal, 3 loc_1A641: cmp _boss_phase_frame, 128 jnz short loc_1A64D mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1A64D: mov al, 0 pop bp retn sub_1A5EB endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1A651 proc near push bp mov bp, sp cmp _boss_phase_frame, 48 jnz short loc_1A69C mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD_AIMED 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 _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) 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 _bullet_template_tune call sub_15A9C call snd_se_play pascal, 3 loc_1A69C: cmp _boss_phase_frame, 96 jnz short loc_1A6A7 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1A6A7: mov al, 0 pop bp retn sub_1A651 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1A6AB proc near push bp mov bp, sp cmp _boss_phase_frame, 48 jnz short loc_1A6BA mov angle_2D085, -10h loc_1A6BA: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1A709 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD mov al, angle_2D085 mov _bullet_template.BT_angle, al add al, 5 mov angle_2D085, al mov _bullet_template.patnum, 0 mov ax, _boss_pos.cur.x mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) 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 _bullet_template_tune call sub_15A8E call snd_se_play pascal, 3 loc_1A709: cmp _boss_phase_frame, 160 jnz short loc_1A715 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1A715: mov al, 0 pop bp retn sub_1A6AB endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1A719 proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1A765 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD mov _bullet_template.BT_angle, 40h mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_BLUE mov ax, _boss_pos.cur.x mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) 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 _bullet_template_tune call sub_15A5C call snd_se_play pascal, 3 loc_1A765: cmp _boss_phase_frame, 128 jnz short loc_1A771 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1A771: mov al, 0 pop bp retn sub_1A719 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1A775 proc near var_1 = byte ptr -1 enter 2, 0 cmp _boss_phase_frame, 48 jnz short loc_1A7AF mov eax, _boss_pos.cur mov _laser_template.coords.origin, eax mov ax, _player_pos.cur.y sub ax, _laser_template.coords.origin.y push ax mov ax, _player_pos.cur.x sub ax, _laser_template.coords.origin.x push ax call iatan2 mov _laser_template.coords.angle, al mov _laser_template.LASER_color, 8 mov _laser_template.coords.LASER_width, 8 call lasers_new_fixed_and_manual_in_slot pascal, 0 loc_1A7AF: cmp _boss_phase_frame, 80 jnz short loc_1A7BB call lasers_grow_manual_in_slot pascal, 0 loc_1A7BB: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1A81A cmp _boss_phase_frame, 80 jl short loc_1A7D7 cmp _boss_phase_frame, 144 jl short loc_1A7E4 loc_1A7D7: mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1A81A loc_1A7E4: mov ax, _player_pos.cur.y sub ax, _laser_template.coords.origin.y push ax mov ax, _player_pos.cur.x sub ax, _laser_template.coords.origin.x push ax call iatan2 mov [bp-1], al mov al, _lasers[0 * size laser_t].coords.angle sub [bp-1], al cmp byte ptr [bp-1], 0 jle short loc_1A80C inc al jmp short loc_1A817 ; --------------------------------------------------------------------------- loc_1A80C: cmp byte ptr [bp-1], 0 jge short loc_1A81A mov al, _lasers[0 * size laser_t].coords.angle add al, -1 loc_1A817: mov _lasers[0 * size laser_t].coords.angle, al loc_1A81A: cmp _boss_phase_frame, 160 jnz short loc_1A82B call lasers_stop_in_slot pascal, 0 mov al, 1 leave retn ; --------------------------------------------------------------------------- loc_1A82B: mov al, 0 leave retn sub_1A775 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1A82F proc near push bp mov bp, sp cmp _boss_phase_frame, 48 jnz short loc_1A843 mov angle_2D085, 20h mov byte_2D082, 0FCh loc_1A843: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1A8B9 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_RING mov al, angle_2D085 mov _bullet_template.BT_angle, al mov al, byte_2D082 add angle_2D085, al mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_BLUE mov ax, _boss_pos.cur.x mov _bullet_template.BT_origin.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) mov _bullet_template.BT_origin.y, ax mov _bullet_template.spread, 4 mov _bullet_template.speed, (2 shl 4) + 6 call _bullet_template_tune call sub_15A5C mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1A8B2 push 7 call randring2_next16_and add al, 10h mov dl, angle_2D085 sub dl, al mov angle_2D085, dl mov al, byte_2D082 neg al mov byte_2D082, al loc_1A8B2: call snd_se_play pascal, 3 loc_1A8B9: cmp _boss_phase_frame, 256 jnz short loc_1A8C5 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1A8C5: mov al, 0 pop bp retn sub_1A82F endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame mai_yuki_1A8C9 proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1A91D mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD_AIMED 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 _bullet_template.BT_origin.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) 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 _bullet_template_tune call sub_15A70 loc_1A91D: mov al, 0 pop bp retn mai_yuki_1A8C9 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1A921 proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1A966 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_RING call randring2_next16 mov _bullet_template.BT_angle, al mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED mov ax, _yuki_pos.cur.x mov _bullet_template.BT_origin.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) mov _bullet_template.BT_origin.y, ax mov _bullet_template.spread, 32 mov _bullet_template.speed, (2 shl 4) + 8 call _bullet_template_tune call sub_15A5C loc_1A966: mov al, 0 pop bp retn sub_1A921 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1A96A proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1A9AF mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_STACK_AIMED mov _bullet_template.BT_angle, 0 mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED mov ax, _yuki_pos.cur.x mov _bullet_template.BT_origin.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) 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 _bullet_template_tune call sub_15A5C loc_1A9AF: mov al, 0 pop bp retn sub_1A96A endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame mai_yuki_1A9B3 proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1A9FF mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD mov _bullet_template.BT_angle, 40h mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED mov ax, _yuki_pos.cur.x mov _bullet_template.BT_origin.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) 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 _bullet_template_tune call sub_15A5C call snd_se_play pascal, 3 loc_1A9FF: mov al, 0 pop bp retn mai_yuki_1A9B3 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame mai_yuki_1AA03 proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1AA48 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_STACK_AIMED mov _bullet_template.BT_angle, 0 mov _bullet_template.patnum, PAT_BULLET16_N_RED mov ax, _yuki_pos.cur.x mov _bullet_template.BT_origin.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) 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 _bullet_template_tune call sub_15A5C loc_1AA48: mov al, 0 pop bp retn mai_yuki_1AA03 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame mai_yuki_1AA4C proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz short loc_1AA97 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD call randring2_next16 mov _bullet_template.BT_angle, al mov _bullet_template.patnum, 0 mov ax, _yuki_pos.cur.x mov _bullet_template.BT_origin.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) 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 _bullet_template_tune call sub_15A5C loc_1AA97: mov al, 0 pop bp retn mai_yuki_1AA4C endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame mai_yuki_1AA9B proc near push bp mov bp, sp cmp _boss_phase_frame, 48 jnz short loc_1AAAF mov angle_2D084, 0 mov byte_2D083, 4 loc_1AAAF: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1AB1B mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_RING mov al, angle_2D084 mov _bullet_template.BT_angle, al mov al, byte_2D083 add angle_2D084, al mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED mov ax, _yuki_pos.cur.x mov _bullet_template.BT_origin.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) mov _bullet_template.BT_origin.y, ax mov _bullet_template.spread, 4 mov _bullet_template.speed, (2 shl 4) + 6 call _bullet_template_tune call sub_15A5C mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1AB1B push 7 call randring2_next16_and add al, angle_2D084 add al, 10h mov angle_2D084, al mov al, byte_2D083 neg al mov byte_2D083, al loc_1AB1B: mov al, 0 pop bp retn mai_yuki_1AA9B endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame mai_yuki_1AB1F proc near @@angle = byte ptr -1 enter 2, 0 cmp _boss_phase_frame, 48 jz short loc_1AB31 cmp _boss_phase_frame, 96 jnz short loc_1AB72 loc_1AB31: mov eax, _yuki_pos.cur mov curvebullet_template.pos.cur, eax mov curvebullet_template.CBTMPL_col, 11 mov curvebullet_template.CBTMPL_speed, (2 shl 4) mov ax, _boss_pos.cur.x cmp ax, _yuki_pos.cur.x jl short loc_1AB53 mov [bp+@@angle], 40h jmp short loc_1AB57 ; --------------------------------------------------------------------------- loc_1AB53: mov [bp+@@angle], -40h loc_1AB57: call player_angle_from pascal, curvebullet_template.pos.cur.x, curvebullet_template.pos.cur.y, word ptr [bp+@@angle] mov curvebullet_template.CBTMPL_angle, al call curvebullets_add call snd_se_play pascal, 15 loc_1AB72: mov al, 0 leave retn mai_yuki_1AB1F endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame mai_yuki_1AB76 proc near @@angle = byte ptr -1 enter 2, 0 cmp _boss_phase_frame, 48 jz short loc_1AB88 cmp _boss_phase_frame, 96 jnz short loc_1ABC9 loc_1AB88: mov eax, _boss_pos.cur mov curvebullet_template.pos.cur, eax mov curvebullet_template.CBTMPL_col, 9 mov curvebullet_template.CBTMPL_speed, (2 shl 4) mov ax, _boss_pos.cur.x cmp ax, _yuki_pos.cur.x jge short loc_1ABAA mov [bp+@@angle], 40h jmp short loc_1ABAE ; --------------------------------------------------------------------------- loc_1ABAA: mov [bp+@@angle], -40h loc_1ABAE: call player_angle_from pascal, curvebullet_template.pos.cur.x, curvebullet_template.pos.cur.y, word ptr [bp+@@angle] mov curvebullet_template.CBTMPL_angle, al call curvebullets_add call snd_se_play pascal, 15 loc_1ABC9: cmp _boss_phase_frame, 128 jnz short loc_1ABD6 mov ax, 1 jmp short locret_1ABD8 ; --------------------------------------------------------------------------- loc_1ABD6: xor ax, ax locret_1ABD8: leave retn mai_yuki_1AB76 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MAI_YUKI_UPDATE mai_yuki_update proc far var_4 = word ptr -4 var_2 = word ptr -2 enter 4, 0 push si mov ax, _boss_pos.cur.y cmp ax, _yuki_pos.cur.y jle short loc_1ABEE mov eax, _boss_pos.cur jmp short loc_1ABF2 ; --------------------------------------------------------------------------- loc_1ABEE: mov eax, _yuki_pos.cur loc_1ABF2: mov _homing_target, eax inc _boss_phase_frame mov al, _boss_phase mov ah, 0 mov [bp+var_4], ax mov cx, 6 ; switch 6 cases mov bx, offset word_1AFBC loc_1AC08: mov ax, cs:[bx] cmp ax, [bp+var_4] jz short loc_1AC18 add bx, 2 loop loc_1AC08 jmp loc_1AFA7 ; default ; --------------------------------------------------------------------------- loc_1AC18: jmp word ptr cs:[bx+0Ch] ; switch jump loc_1AC1C: cmp _boss_phase_frame, 1 ; jumptable 0001AC18 case 0 jnz short loc_1AC5E mov _boss_hp, 4500 mov _boss_phase_end_hp, 0 mov _yuki_hp, 4500 mov _yuki_phase_end_hp, 0 mov _gather_template.GT_radius, (64 shl 4) mov _gather_template.GT_angle_delta, 2 mov _gather_template.GT_ring_points, 8 mov si, 212 jmp short loc_1AC58 ; --------------------------------------------------------------------------- loc_1AC51: call super_convert_tiny pascal, si inc si loc_1AC58: cmp si, 228 jl short loc_1AC51 loc_1AC5E: call sub_1FB07 call mai_yuki_1A3EF pascal, (24 shl 4) or ((24 shl 4) shl 16), 10 cmp _boss_phase_frame, 128 jl loc_1AFA7 ; default inc _boss_phase mov _boss_phase_frame, 0 call snd_se_play pascal, 13 mov fp_23F5A, offset mai_yuki_bg_render jmp loc_1AFA7 ; default ; --------------------------------------------------------------------------- loc_1AC90: call sub_1FB07 ; jumptable 0001AC18 case 1 call mai_yuki_1A3EF pascal, (24 shl 4) or ((24 shl 4) shl 16), 10 cmp _boss_phase_frame, 64 jl loc_1AFA7 ; default inc _boss_phase loc_1ACAB: mov _boss_phase_frame, 0 mov _boss_mode, 1 mov _boss_mode_change, 0 mov fp_2CE36, offset sub_1A5EB mov fp_2CE38, offset mai_yuki_1A8C9 mov _boss_custombullets_render, offset curvebullets_render jmp loc_1AFA7 ; default ; --------------------------------------------------------------------------- loc_1ACD0: mov al, _boss_mode ; jumptable 0001AC18 case 2 mov ah, 0 or ax, ax jz short loc_1ACE3 cmp ax, 1 jz loc_1ADC9 jmp loc_1ADCF ; --------------------------------------------------------------------------- loc_1ACE3: cmp _boss_mode_change, 9 jz short loc_1ACF1 cmp _boss_mode_change, 14 jnz short loc_1AD20 loc_1ACF1: mov ax, _boss_phase_frame add ax, -64 mov [bp+var_2], ax cmp _boss_phase_frame, 16 jnz short loc_1AD29 cmp _bullet_clear_time, 20 jnb short loc_1AD0D mov _bullet_clear_time, 20 loc_1AD0D: call snd_se_play pascal, 15 call boss_explode_small pascal, ET_NW_SE call boss2_explode_small pascal, 2 jmp short loc_1AD29 ; --------------------------------------------------------------------------- loc_1AD20: mov ax, _boss_phase_frame add ax, -16 mov [bp+var_2], ax loc_1AD29: call mai_yuki_flystep_random pascal, [bp+var_2] or al, al jz loc_1ADCF mov _boss_phase_frame, 0 inc _boss_mode inc _boss_mode_change cmp _boss_mode_change, 10 jnb short loc_1AD6F mov al, _boss_mode_change mov ah, 0 and ax, 3 add ax, ax mov bx, ax mov ax, off_22788[bx] mov fp_2CE36, ax mov al, _boss_mode_change mov ah, 0 and ax, 3 add ax, ax mov bx, ax mov ax, off_227A0[bx] jmp short loc_1ADB8 ; --------------------------------------------------------------------------- loc_1AD6F: cmp _boss_mode_change, 15 jnb short loc_1AD8E mov fp_2CE36, offset sub_1A775 mov al, _boss_mode_change mov ah, 0 and ax, 3 add ax, ax mov bx, ax mov ax, off_227A8[bx] jmp short loc_1ADB8 ; --------------------------------------------------------------------------- loc_1AD8E: cmp _boss_mode_change, 36 jnb short loc_1ADBD mov al, _boss_mode_change mov ah, 0 and ax, 3 add ax, ax mov bx, ax mov ax, off_22790[bx] mov fp_2CE36, ax mov al, _boss_mode_change mov ah, 0 and ax, 3 add ax, ax mov bx, ax mov ax, off_227B0[bx] loc_1ADB8: mov fp_2CE38, ax jmp short loc_1ADCF ; --------------------------------------------------------------------------- loc_1ADBD: mov _boss_mode_change, 0 mov [bp+var_2], 1 jmp short loc_1AE2C ; --------------------------------------------------------------------------- loc_1ADC9: call mai_yuki_1A556 call mai_yuki_1A5B3 loc_1ADCF: mov ax, _boss_hp add ax, _yuki_hp cmp ax, 5500 jge short loc_1ADF4 cmp _boss_mode_change, 9 jnb short loc_1ADF4 mov _boss_mode, 0 mov _boss_phase_frame, 0 mov _boss_mode_change, 9 jmp short loc_1AE17 ; --------------------------------------------------------------------------- loc_1ADF4: mov ax, _boss_hp add ax, _yuki_hp cmp ax, 2250 jge short loc_1AE17 cmp _boss_mode_change, 14 jnb short loc_1AE17 mov _boss_mode, 0 mov _boss_phase_frame, 0 mov _boss_mode_change, 14 loc_1AE17: call mai_yuki_1A42B mov ah, 0 mov [bp+var_2], ax cmp [bp+var_2], 0 jz loc_1AFA7 ; default mov _boss_mode_change, 1 loc_1AE2C: mov al, byte ptr [bp+var_2] add al, 0FFh mov _boss2_mode_change, al mov _boss_phase, PHASE_BOSS_EXPLODE_SMALL mov _boss_phase_frame, 0 cmp _lasers[0 * size laser_t].mode, LM_NONE jz loc_1AFA7 ; default call lasers_stop_in_slot pascal, 0 jmp short loc_1AE69 ; --------------------------------------------------------------------------- loc_1AE4F: cmp _boss_phase_frame, 16 ; jumptable 0001AC18 case 253 jnz short loc_1AE6C cmp _boss2_mode_change, 0 jnz short loc_1AE64 call boss_explode_small pascal, ET_VERTICAL jmp short loc_1AE69 ; --------------------------------------------------------------------------- loc_1AE64: call boss2_explode_small pascal, 4 loc_1AE69: jmp loc_1AFA7 ; default ; --------------------------------------------------------------------------- loc_1AE6C: cmp _boss_phase_frame, 32 jnz loc_1AFA7 ; default cmp _boss2_mode_change, 0 jnz short loc_1AE8B call boss_explode_big mov _boss_sprite, 4 mov _yuki_sprite, 180 jmp short loc_1AE98 ; --------------------------------------------------------------------------- loc_1AE8B: call boss2_explode_big mov _yuki_sprite, 4 mov _boss_sprite, 180 loc_1AE98: inc _boss_phase mov al, _boss_mode_change mov _bullet_clear_trigger, al mov _boss_phase_frame, 0 call snd_se_play pascal, 12 mov _player_invincibility_time, BOSS_DEFEAT_INVINCIBILITY_FRAMES jmp loc_1AFA7 ; default ; --------------------------------------------------------------------------- loc_1AEB7: cmp _boss_phase_frame, 12 ; jumptable 0001AC18 case 254 jge short loc_1AEE2 cmp _stage_frame_mod2, 0 jnz short loc_1AECA mov ax, 0FFFCh jmp short loc_1AECD ; --------------------------------------------------------------------------- loc_1AECA: mov ax, 4 loc_1AECD: mov word_2CE02, ax cmp _stage_frame_mod4, 1 ja short loc_1AEDC mov ax, 0FFFCh jmp short loc_1AEDF ; --------------------------------------------------------------------------- loc_1AEDC: mov ax, 4 loc_1AEDF: mov word_2CE04, ax loc_1AEE2: mov fp_23F5A, offset tiles_render_all mov word_25FE6, 2 mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz loc_1AFA7 ; default cmp _boss2_mode_change, 0 jnz short loc_1AF0A inc _boss_sprite jmp short loc_1AF0E ; --------------------------------------------------------------------------- loc_1AF0A: inc _yuki_sprite loc_1AF0E: cmp _boss_phase_frame, 64 jl loc_1AFA7 ; default inc _boss_phase mov _boss_phase_frame, 0 jmp loc_1AFA7 ; default ; --------------------------------------------------------------------------- loc_1AF24: mov PaletteTone, 60 ; jumptable 0001AC18 case 255 mov _palette_changed, 1 cmp _boss_phase_frame, 1 jnz short loc_1AFA7 ; default cmp _boss2_mode_change, 0 jnz short loc_1AF66 push ds push offset a_dm09_tx2 ; "_DM09.TX2" call sub_ED87 mov word ptr _boss_bgm_title+2, ds mov word ptr _boss_bgm_title, offset aTH05_10 mov eax, _yuki_pos.cur mov _boss_pos.cur, eax setfarfp _boss_update, yuki_update jmp short loc_1AF85 ; --------------------------------------------------------------------------- loc_1AF66: push ds push offset a_dm08_tx2 ; "_DM08.TX2" call sub_ED87 mov word ptr _boss_bgm_title+2, ds mov word ptr _boss_bgm_title, offset aTH05_11 setfarfp _boss_update, sub_1C518 loc_1AF85: call sub_F2B4 mov _overlay_text, offset popup_boss_bgm_update_and_render mov _boss_phase, 0 mov _boss_phase_frame, 0 mov _boss_fg_render, offset sub_10F12 mov _boss_hp, 7900 loc_1AFA7: call curvebullets_update ; default mov ax, _boss_hp add ax, _yuki_hp push ax push 9000 call sub_17354 pop si leave retf mai_yuki_update endp ; --------------------------------------------------------------------------- db 0 word_1AFBC dw 0, 1, 2, 0FDh dw 0FEh, 0FFh ; value table for switch statement dw offset loc_1AC1C ; jump table for switch statement dw offset loc_1AC90 dw offset loc_1ACD0 dw offset loc_1AE4F dw offset loc_1AEB7 dw offset loc_1AF24 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1AFD4 proc near push bp mov bp, sp push si cmp _midboss_phase_frame, 16 jl loc_1B09F mov ax, _midboss_phase_frame add ax, -16 mov si, ax cmp si, 32 jge short loc_1B039 or si, si jnz short loc_1B004 mov angle_2D085, 0 call snd_se_play pascal, 13 mov ax, _midboss_pos.cur.x mov word_2CE3A, ax loc_1B004: mov ax, word_2CE3A mov _midboss_pos.cur.x, ax cmp si, 20 jle short loc_1B01C lea ax, [si-20] cwd sub ax, dx sar ax, 1 add ax, 20 mov si, ax loc_1B01C: cmp _stage_frame_mod2, 0 jz short loc_1B02E mov ax, si shl ax, 5 add _midboss_pos.cur.x, ax jmp short loc_1B09F ; --------------------------------------------------------------------------- loc_1B02E: mov ax, si shl ax, 5 sub _midboss_pos.cur.x, ax jmp short loc_1B09F ; --------------------------------------------------------------------------- loc_1B039: cmp si, 32 jnz short loc_1B058 push 1000h call randring2_next16_mod add ax, 400h mov word_2CE3A, ax push 200h call randring2_next16_mod add ax, 400h mov _midboss_pos.cur.y, ax jmp short loc_1B09F ; --------------------------------------------------------------------------- loc_1B058: mov ax, 64 sub ax, si mov si, ax cmp si, 20 jle short loc_1B071 add ax, -20 cwd sub ax, dx sar ax, 1 add ax, 20 mov si, ax loc_1B071: mov ax, word_2CE3A mov _midboss_pos.cur.x, ax cmp _stage_frame_mod2, 0 jz short loc_1B089 mov ax, si shl ax, 5 add _midboss_pos.cur.x, ax jmp short loc_1B092 ; --------------------------------------------------------------------------- loc_1B089: mov ax, si shl ax, 5 sub _midboss_pos.cur.x, ax loc_1B092: or si, si jnz short loc_1B09F mov angle_2D085, 1 mov al, 1 jmp short loc_1B0A1 ; --------------------------------------------------------------------------- loc_1B09F: mov al, 0 loc_1B0A1: pop si pop bp retn sub_1AFD4 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1B0A4 proc near push bp mov bp, sp push si cmp _midboss_phase_frame, 16 jnz short loc_1B0CE call snd_se_play pascal, 8 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED mov _bullet_template.spread, 7 call _bullet_template_tune mov _midboss_sprite, 212 loc_1B0CE: cmp _midboss_phase_frame, 48 jl short loc_1B139 cmp _midboss_phase_frame, 80 jg short loc_1B139 mov ax, _midboss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1B139 mov _bullet_template.speed, 8 xor si, si jmp short loc_1B12D ; --------------------------------------------------------------------------- loc_1B0F2: test si, 1 jz short loc_1B0FC mov al, 74h ; 't' jmp short loc_1B0FE ; --------------------------------------------------------------------------- loc_1B0FC: mov al, 0 loc_1B0FE: 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 _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 _bullet_template.BT_origin.y, ax call sub_15A8E mov al, _bullet_template.speed add al, (1 shl 4) mov _bullet_template.speed, al inc si loc_1B12D: cmp si, 4 jl short loc_1B0F2 call snd_se_play pascal, 15 loc_1B139: cmp _midboss_phase_frame, 96 jl short loc_1B150 mov _midboss_sprite, 208 mov _midboss_phase_frame, 0 mov angle_2D084, 0 loc_1B150: pop si pop bp retn sub_1B0A4 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1B153 proc near push bp mov bp, sp cmp _midboss_phase_frame, 16 jnz short loc_1B17C call snd_se_play pascal, 8 mov _bullet_template.pattern, BP_RING mov _bullet_template.spread, 16 call _bullet_template_tune mov _midboss_sprite, 212 mov _bullet_template.patnum, PAT_BULLET16_V_RED loc_1B17C: cmp _midboss_phase_frame, 48 jl short loc_1B1CC cmp _midboss_phase_frame, 80 jg short loc_1B1CC mov ax, _midboss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1B1CC mov ax, _midboss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1B1B0 mov _bullet_template.speed, (3 shl 4) + 8 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS jmp short loc_1B1BA ; --------------------------------------------------------------------------- loc_1B1B0: mov _bullet_template.speed, (2 shl 4) + 8 mov _bullet_template.spawn_type, BST_NORMAL loc_1B1BA: call sub_15A5C mov al, _bullet_template.BT_angle add al, 4 mov _bullet_template.BT_angle, al call snd_se_play pascal, 3 loc_1B1CC: cmp _midboss_phase_frame, 96 jl short loc_1B1E3 mov _midboss_sprite, 208 mov _midboss_phase_frame, 0 mov angle_2D084, 0 loc_1B1E3: pop bp retn sub_1B153 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1B1E5 proc near push bp mov bp, sp cmp _midboss_phase_frame, 16 jnz short loc_1B221 call snd_se_play pascal, 8 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD_STACK_AIMED 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 _bullet_template_tune mov _midboss_sprite, 212 loc_1B221: cmp _midboss_phase_frame, 48 jl short loc_1B256 cmp _midboss_phase_frame, 80 jg short loc_1B256 mov ax, _midboss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1B256 call sub_15A5C 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: cmp _midboss_phase_frame, 96 jl short loc_1B26D mov _midboss_sprite, 208 mov _midboss_phase_frame, 0 mov angle_2D084, 0 loc_1B26D: pop bp retn sub_1B1E5 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MIDBOSS4_UPDATE midboss4_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur mov _bullet_template.BT_origin, eax mov _gather_template.GT_center, eax inc _midboss_phase_frame mov al, _midboss_phase mov ah, 0 or ax, ax jz short loc_1B293 cmp ax, 1 jz short loc_1B2DC jmp loc_1B392 ; --------------------------------------------------------------------------- loc_1B293: cmp _midboss_phase_frame, 1 jnz short loc_1B29F mov angle_2D085, 1 loc_1B29F: push offset _midboss_pos call _motion_update_2 call sub_1FA9D pascal, (24 shl 4) or ((24 shl 4) shl 16), 10 cmp _midboss_phase_frame, 192 jl loc_1B3A1 inc _midboss_phase mov _midboss_phase_frame, 0 mov _midboss_angle, 0 mov angle_2D084, 1 mov byte_2D083, 0 mov _midboss_pos.velocity.x, 0 jmp loc_1B3A1 ; --------------------------------------------------------------------------- loc_1B2DC: mov eax, _midboss_pos.cur mov _midboss_pos.prev, eax mov al, angle_2D084 mov ah, 0 mov bx, ax cmp bx, 3 ja short loc_1B32F add bx, bx jmp cs:off_1B3BA[bx] loc_1B2F7: call sub_1AFD4 or al, al jz short loc_1B32F mov _midboss_phase_frame, 0 inc byte_2D083 mov al, byte_2D083 mov ah, 0 mov bx, 3 cwd idiv bx inc dl mov angle_2D084, dl cmp byte_2D083, 10h jb short loc_1B32F jmp short loc_1B368 ; --------------------------------------------------------------------------- loc_1B322: call sub_1B0A4 jmp short loc_1B32F ; --------------------------------------------------------------------------- loc_1B327: call sub_1B153 jmp short loc_1B32F ; --------------------------------------------------------------------------- loc_1B32C: call sub_1B1E5 loc_1B32F: cmp angle_2D085, 0 jz short loc_1B34A call sub_1FA9D pascal, (24 shl 4) or ((24 shl 4) shl 16), 4 mov _midboss_damage_this_frame, al mov ah, 0 sub _midboss_hp, ax loc_1B34A: cmp _midboss_hp, 0 jg short loc_1B3A1 mov _bullet_clear_trigger, 1 push 0Fh call sub_173AC call items_add pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, IT_BOMB loc_1B368: mov _midboss_phase, PHASE_EXPLODE_BIG mov _midboss_sprite, 4 mov _midboss_phase_frame, 0 call sparks_add_circle pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, large (((8 shl 4) shl 16) or 48) call snd_se_play pascal, 12 jmp short loc_1B3A1 ; --------------------------------------------------------------------------- loc_1B392: call sub_17486 push _midboss_hp push 1100 call sub_17354 pop bp retf ; --------------------------------------------------------------------------- loc_1B3A1: push _midboss_hp push 1100 call sub_17354 mov ax, _midboss_pos.cur.x mov _homing_target.x, ax mov ax, _midboss_pos.cur.y mov _homing_target.y, ax pop bp retf midboss4_update endp ; --------------------------------------------------------------------------- db 0 off_1B3BA dw offset loc_1B2F7 dw offset loc_1B322 dw offset loc_1B327 dw offset loc_1B32C include th05/main/bullet/b4balls_add.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public B4BALLS_UPDATE b4balls_update proc near @@damage = word ptr -2 enter 2, 0 push si push di mov _shot_hitbox_radius.x, (8 shl 4) mov _shot_hitbox_radius.y, (8 shl 4) mov si, offset b4balls mov di, 1 jmp @@more? ; --------------------------------------------------------------------------- @@loop: cmp [si+b4ball_t.flag], 0 jz @@next inc [si+b4ball_t.B4B_age] lea ax, [si+b4ball_t.pos] call _motion_update_2 pascal, ax cmp ax, (-16 shl 4) jle short @@clip cmp ax, ((PLAYFIELD_W + 16) shl 4) jge short @@clip cmp dx, (-16 shl 4) jle short @@clip cmp dx, ((PLAYFIELD_H + 16) shl 4) jl short loc_1B48B @@clip: jmp @@remove ; --------------------------------------------------------------------------- loc_1B48B: cmp [si+b4ball_t.flag], 2 jz loc_1B535 sub ax, _player_pos.cur.x sub dx, _player_pos.cur.y add ax, 8 * 16 cmp ax, 16 * 16 ja short loc_1B4B1 add dx, 8 * 16 cmp dx, 16 * 16 ja short loc_1B4B1 mov _player_is_hit, 1 loc_1B4B1: mov eax, dword ptr [si+b4ball_t.pos.cur] mov dword ptr _shot_hitbox_center, eax call sub_126B3 mov [bp+@@damage], ax or ax, ax jz @@next cmp [si+b4ball_t.B4B_patnum_tiny_base], PAT_B4BALL_SNOW jz short @@is_snow push 10 jmp short loc_1B52E ; --------------------------------------------------------------------------- @@is_snow: mov [si+b4ball_t.B4B_damaged_this_frame], 1 mov ax, [bp+@@damage] sub [si+b4ball_t.B4B_hp], ax call snd_se_play pascal, 4 cmp [si+b4ball_t.B4B_hp], 0 jge short @@next inc [si+b4ball_t.flag] mov [si+b4ball_t.B4B_age], 0 mov [si+b4ball_t.B4B_patnum_tiny_base], PAT_DECAY_B4BALL mov ax, [si+b4ball_t.pos.velocity.x] mov bx, 4 cwd idiv bx mov [si+b4ball_t.pos.velocity.x], ax mov ax, [si+b4ball_t.pos.velocity.y] cwd idiv bx mov [si+b4ball_t.pos.velocity.y], ax add _score_delta, 550 cmp [si+b4ball_t.B4B_revenge], 0 jz short loc_1B52C cmp [si+b4ball_t.pos.cur.y], (240 shl 4) jg short loc_1B52C mov eax, dword ptr [si+b4ball_t.pos.cur] mov _bullet_template.BT_origin, eax call sub_15A5C loc_1B52C: push 3 loc_1B52E: call snd_se_play jmp short @@next ; --------------------------------------------------------------------------- loc_1B535: test byte ptr [si+b4ball_t.B4B_age], 3 jnz short @@next inc [si+b4ball_t.B4B_patnum_tiny_base] cmp [si+b4ball_t.B4B_patnum_tiny_base], (PAT_DECAY_B4BALL + BULLET_DECAY_CELS) jl short @@next @@remove: mov [si+b4ball_t.flag], 0 @@next: inc di add si, size b4ball_t @@more?: cmp di, 1 + B4BALL_COUNT jl @@loop pop di pop si leave retn b4balls_update endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1B557 proc near push bp mov bp, sp cmp _boss_phase_frame, 48 jnz short loc_1B599 call randring2_next16 mov angle_2D085, al mov angle_2D084, 1 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_RING mov _bullet_template.BT_special_motion, 0Ah mov _bullet_template.patnum, PAT_BULLET16_N_SMALL_BALL_RED mov al, _rank add al, 5 mov _bullet_template.spread, al mov _bullet_template.speed, (3 shl 4) + 6 mov _boss_sprite, 208 call _bullet_template_tune jmp loc_1B624 ; --------------------------------------------------------------------------- loc_1B599: cmp _boss_phase_frame, 48 jle loc_1B624 mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz short loc_1B5E2 mov al, angle_2D085 mov _bullet_template.BT_angle, al mov al, angle_2D084 add angle_2D085, al call sub_15A70 mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1B5DB mov al, angle_2D084 mov ah, 0 imul ax, 0Ch add al, angle_2D085 mov angle_2D085, al loc_1B5DB: call snd_se_play pascal, 3 loc_1B5E2: cmp _boss_phase_frame, 160 jnz short loc_1B5F2 mov al, angle_2D084 neg al mov angle_2D084, al loc_1B5F2: cmp _boss_phase_frame, 256 jnz short loc_1B609 mov _boss_phase_frame, 0 mov _boss_mode, 0 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1B609: cmp _boss_mode_change, 2 jb short loc_1B624 cmp _boss_phase_frame, 64 jl short loc_1B624 mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx call boss_flystep_random pascal, dx loc_1B624: mov al, 0 pop bp retn sub_1B557 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1B628 proc near push bp mov bp, sp cmp _boss_phase_frame, 8 jnz short loc_1B64D mov _bullet_template.BT_angle, 80h mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD mov _boss_sprite, 208 mov _bullet_template.patnum, PAT_BULLET16_N_RED jmp short loc_1B6C0 ; --------------------------------------------------------------------------- loc_1B64D: cmp _boss_phase_frame, 8 jle short loc_1B6C0 mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz short loc_1B68E call randring2_next16_and pascal, 1Fh add al, 8 mov _bullet_template.speed, al push 7 call randring2_next16_and mov _bullet_template.spread, al mov _bullet_template.spread_angle_delta, 6 call _bullet_template_tune call sub_15A5C mov al, _bullet_template.BT_angle add al, 6 mov _bullet_template.BT_angle, al call snd_se_play pascal, 3 loc_1B68E: cmp _boss_phase_frame, 256 jnz short loc_1B6A5 mov _boss_phase_frame, 0 mov _boss_mode, 0 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1B6A5: cmp _boss_mode_change, 2 jb short loc_1B6C0 cmp _boss_phase_frame, 64 jl short loc_1B6C0 mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx call boss_flystep_random pascal, dx loc_1B6C0: mov al, 0 pop bp retn sub_1B628 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1B6C4 proc near push bp mov bp, sp cmp _boss_phase_frame, 8 jnz short loc_1B6ED mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_RING mov _bullet_template.patnum, 0 mov _bullet_template.spread, 24 call _bullet_template_tune mov _boss_sprite, 208 jmp short loc_1B750 ; --------------------------------------------------------------------------- loc_1B6ED: cmp _boss_phase_frame, 8 jle short loc_1B750 mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1B71B call randring2_next16 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 loc_1B71B: cmp _boss_phase_frame, 160 jnz short loc_1B732 mov _boss_phase_frame, 0 mov _boss_mode, 0 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1B732: cmp _boss_mode_change, 2 jb short loc_1B750 cmp _boss_phase_frame, 64 jl short loc_1B750 mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx add dx, -32 call boss_flystep_random pascal, dx loc_1B750: mov al, 0 pop bp retn sub_1B6C4 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1B754 proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jge short loc_1B799 mov ax, _boss_phase_frame add ax, -16 call gather_add_only_3stack pascal, ax, large (9 shl 16) or 8 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD_AIMED 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 _bullet_template_tune mov _boss_sprite, 208 mov b4ball_template.B4B_speed, (4 shl 4) jmp loc_1B82E ; --------------------------------------------------------------------------- loc_1B799: mov ax, _boss_phase_frame mov bx, 32 cwd idiv bx or dx, dx jnz short loc_1B7F9 call randring2_next16_and pascal, 1Fh add al, (1 shl 4) mov _bullet_template.speed, al call sub_15A5C call player_angle_from pascal, b4ball_template.pos.cur.x, b4ball_template.pos.cur.y, 0 mov b4ball_template.B4B_angle, al call b4balls_add mov al, b4ball_template.B4B_angle add al, -12 mov b4ball_template.B4B_angle, al call b4balls_add mov al, b4ball_template.B4B_angle add al, -12 mov b4ball_template.B4B_angle, al call b4balls_add mov al, b4ball_template.B4B_angle add al, 36 mov b4ball_template.B4B_angle, al call b4balls_add mov al, b4ball_template.B4B_angle add al, 12 mov b4ball_template.B4B_angle, al call b4balls_add call snd_se_play pascal, 15 loc_1B7F9: cmp _boss_phase_frame, 160 jnz short loc_1B810 mov _boss_phase_frame, 0 mov _boss_mode, 0 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1B810: cmp _boss_mode_change, 2 jb short loc_1B82E cmp _boss_phase_frame, 64 jl short loc_1B82E mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx add dx, -32 call boss_flystep_random pascal, dx loc_1B82E: mov al, 0 pop bp retn sub_1B754 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1B832 proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jge short loc_1B858 mov ax, _boss_phase_frame add ax, -16 call gather_add_only_3stack pascal, ax, large (9 shl 16) or 8 mov _boss_sprite, 208 mov b4ball_template.B4B_speed, (2 shl 4) jmp short loc_1B8C4 ; --------------------------------------------------------------------------- loc_1B858: cmp _boss_phase_frame, 32 jnz short loc_1B866 call snd_se_play pascal, 15 loc_1B866: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1B8A6 call b4balls_add mov al, b4ball_template.B4B_angle add al, 40h mov b4ball_template.B4B_angle, al call b4balls_add mov al, b4ball_template.B4B_angle add al, 40h mov b4ball_template.B4B_angle, al call b4balls_add mov al, b4ball_template.B4B_angle add al, 40h mov b4ball_template.B4B_angle, al call b4balls_add mov al, b4ball_template.B4B_angle add al, 40h mov b4ball_template.B4B_angle, al mov al, byte_2D083 add b4ball_template.B4B_angle, al loc_1B8A6: cmp _boss_phase_frame, 64 jnz short loc_1B8C4 mov _boss_phase_frame, 0 mov _boss_mode, 0 mov al, byte_2D083 neg al mov byte_2D083, al mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1B8C4: mov al, 0 pop bp retn sub_1B832 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1B8C8 proc near push bp mov bp, sp cmp _boss_phase_frame, 24 jnz short loc_1B8FC mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_STACK 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 _bullet_template_tune mov _boss_sprite, 208 jmp short loc_1B96F ; --------------------------------------------------------------------------- loc_1B8FC: cmp _boss_phase_frame, 24 jl short loc_1B96F mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz short loc_1B927 mov al, angle_2D085 mov _bullet_template.BT_angle, al call sub_15A5C mov al, angle_2D084 add angle_2D085, al call snd_se_play pascal, 15 loc_1B927: cmp _boss_phase_frame, 64 jnz short loc_1B958 mov al, angle_2D084 neg al mov angle_2D084, al cmp angle_2D084, 7Fh jnb short loc_1B944 mov angle_2D085, 10h jmp short loc_1B949 ; --------------------------------------------------------------------------- loc_1B944: mov angle_2D085, 70h loc_1B949: mov _boss_phase_frame, 0 mov _boss_mode, 0 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1B958: cmp _boss_mode_change, 2 jbe short loc_1B96F mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx add dx, -25 call boss_flystep_random pascal, dx loc_1B96F: mov al, 0 pop bp retn sub_1B8C8 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1B973 proc near push bp mov bp, sp cmp _boss_phase_frame, 8 jnz short loc_1B9AC mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_RANDOM_ANGLE mov _bullet_template.BT_special_motion, 3 mov byte_2C976, 1 mov _bullet_template.patnum, PAT_BULLET16_V_RED mov al, _rank add al, al add al, 4 mov _bullet_template.spread, al mov _boss_sprite, 208 mov _bullet_template.speed, (2 shl 4) jmp short loc_1B9EE ; --------------------------------------------------------------------------- loc_1B9AC: cmp _boss_phase_frame, 8 jle short loc_1B9EE mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1B9C3 call sub_15A70 loc_1B9C3: cmp _boss_phase_frame, 128 jl short loc_1B9EE cmp _boss_phase_frame, 320 jge short loc_1B9E1 mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx add dx, -32 jmp short loc_1B9EA ; --------------------------------------------------------------------------- loc_1B9E1: mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx loc_1B9EA: call boss_flystep_random pascal, dx loc_1B9EE: mov al, 0 pop bp retn sub_1B973 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public YUKI_UPDATE yuki_update proc far push bp mov bp, sp mov eax, _boss_pos.cur mov _homing_target, eax mov _bullet_template.BT_origin, eax mov _gather_template.GT_center, eax mov b4ball_template.pos.cur, eax inc _boss_phase_frame mov al, _boss_phase mov ah, 0 mov bx, ax cmp bx, 9 ja loc_1BD02 add bx, bx jmp cs:off_1BD18[bx] loc_1BA22: cmp _boss_phase_frame, 1 jnz short loc_1BA63 mov _boss_hp, 7900 mov _boss_phase_end_hp, 4600 mov _gather_template.GT_radius, (64 shl 4) mov _gather_template.GT_angle_delta, 2 mov _gather_template.GT_ring_points, 8 mov _boss_sprite, 196 mov _boss_sprite_left, 198 mov _boss_sprite_right, 197 mov _boss_sprite_stay, 196 mov b4ball_template.B4B_patnum_tiny_base, PAT_B4BALL_FIRE loc_1BA63: call sub_1FB07 cmp _boss_phase_frame, 64 jl loc_1BD09 inc _boss_phase mov _boss_phase_frame, 0 call snd_se_play pascal, 13 mov fp_23F5A, offset mai_yuki_bg_render jmp loc_1BD09 ; --------------------------------------------------------------------------- loc_1BA89: call sub_1FB07 cmp _boss_phase_frame, 64 jl loc_1BD09 mov _boss_sprite, 204 inc _boss_phase mov _boss_phase_frame, 0 mov _boss_custombullets_render, offset b4balls_render jmp loc_1BD09 ; --------------------------------------------------------------------------- loc_1BAAD: call sub_1FB07 push (((PLAYFIELD_W / 2) shl 4) shl 16) or (96 shl 4) call boss_flystep_towards or al, al jz loc_1BD09 mov _boss_sprite, 204 inc _boss_phase mov _boss_phase_frame, 0 mov _boss_mode, 1 mov _boss_mode_change, 0 mov ax, _boss_pos.cur.x mov _yuki_pos.cur.x, ax mov ax, _boss_pos.cur.y add ax, (16 shl 4) mov _yuki_pos.cur.y, ax push _boss_pos.cur.x push _boss_pos.cur.y call circles_add_growing call boss_explode_small pascal, ET_VERTICAL mov fp_2CE42, offset sub_1B557 mov _boss_sprite_left, 206 mov _boss_sprite_right, 205 mov _boss_sprite_stay, 204 jmp loc_1BD09 ; --------------------------------------------------------------------------- loc_1BB14: mov al, _boss_mode mov ah, 0 or ax, ax jz short loc_1BB24 cmp ax, 1 jz short loc_1BB69 jmp short loc_1BB6D ; --------------------------------------------------------------------------- loc_1BB24: call boss_flystep_towards pascal, _yuki_pos.cur.x, _yuki_pos.cur.y or al, al jz short loc_1BB6D mov ax, _boss_pos.cur.x mov _yuki_pos.cur.x, ax mov _yuki_pos.cur.y, (96 shl 4) mov _boss_phase_frame, 0 inc _boss_mode inc _boss_mode_change cmp _boss_mode_change, 12 jnb short loc_1BB7B mov al, _boss_mode_change mov ah, 0 and ax, 1 add ax, ax mov bx, ax mov ax, off_22806[bx] mov fp_2CE42, ax jmp short loc_1BB6D ; --------------------------------------------------------------------------- loc_1BB69: call fp_2CE42 loc_1BB6D: call sub_1FADD or al, al jz loc_1BD09 push 0Ah call sub_17416 loc_1BB7B: push (ET_NW_SE shl 16) or 3200 jmp loc_1BC4E ; --------------------------------------------------------------------------- loc_1BB84: call sub_1FADD push (((PLAYFIELD_W / 2) shl 4) shl 16) or (96 shl 4) call boss_flystep_towards or al, al jz loc_1BD09 inc _boss_phase mov _boss_phase_frame, 0 mov fp_2CE42, offset sub_1B6C4 mov _boss_mode, 1 jmp loc_1BD09 ; --------------------------------------------------------------------------- loc_1BBAE: mov al, _boss_mode mov ah, 0 or ax, ax jz short loc_1BBBE cmp ax, 1 jz short loc_1BBF6 jmp short loc_1BBFA ; --------------------------------------------------------------------------- loc_1BBBE: call boss_flystep_towards pascal, _boss_pos.cur.x, (96 shl 4) or al, al jz short loc_1BBFA mov _boss_phase_frame, 0 inc _boss_mode inc _boss_mode_change cmp _boss_mode_change, 24 jnb short loc_1BC08 mov al, _boss_mode_change mov ah, 0 and ax, 1 add ax, ax mov bx, ax mov ax, off_2280A[bx] mov fp_2CE42, ax jmp short loc_1BBFA ; --------------------------------------------------------------------------- loc_1BBF6: call fp_2CE42 loc_1BBFA: call sub_1FADD or al, al jz loc_1BD09 push 0Ah call sub_17416 loc_1BC08: push (ET_SW_NE shl 16) or 1200 jmp short loc_1BC4E ; --------------------------------------------------------------------------- loc_1BC10: call sub_1FADD push (((PLAYFIELD_W / 2) shl 4) shl 16) or (96 shl 4) call boss_flystep_towards or al, al jz loc_1BD09 inc _boss_phase mov _boss_phase_frame, 0 jmp loc_1BD09 ; --------------------------------------------------------------------------- loc_1BC2F: call sub_1B973 cmp _boss_phase_frame, 2000 jge short loc_1BC48 call sub_1FADD or al, al jz loc_1BD09 push 0Ah call sub_17416 loc_1BC48: push (ET_HORIZONTAL shl 16) or 0 loc_1BC4E: call boss_phase_end jmp loc_1BD09 ; --------------------------------------------------------------------------- loc_1BC54: call sub_1FADD push (((PLAYFIELD_W / 2) shl 4) shl 16) or (96 shl 4) call boss_flystep_towards or al, al jz loc_1BD09 inc _boss_phase mov _boss_phase_frame, 0 mov fp_2CE42, offset sub_1B832 mov _boss_mode, 1 mov angle_2D084, 8 mov angle_2D085, 10h mov byte_2D083, 0F8h jmp short loc_1BD09 ; --------------------------------------------------------------------------- loc_1BC8C: mov al, _boss_mode mov ah, 0 or ax, ax jz short loc_1BC9C cmp ax, 1 jz short loc_1BCD7 jmp short loc_1BCDB ; --------------------------------------------------------------------------- loc_1BC9C: cmp _boss_phase_frame, 8 jl short loc_1BCDB mov _boss_phase_frame, 0 inc _boss_mode inc _boss_mode_change cmp _boss_mode_change, 36 jb short loc_1BCBF mov _boss_mode_change, 0 jmp short loc_1BCE7 ; --------------------------------------------------------------------------- loc_1BCBF: mov al, _boss_mode_change mov ah, 0 mov bx, 5 cwd idiv bx add dx, dx mov bx, dx mov ax, off_2280E[bx] mov fp_2CE42, ax jmp short loc_1BCDB ; --------------------------------------------------------------------------- loc_1BCD7: call fp_2CE42 loc_1BCDB: call sub_1FADD or al, al jz short loc_1BD09 mov _boss_mode_change, 1 loc_1BCE7: call boss_explode_small pascal, ET_VERTICAL mov _boss_phase_frame, 0 mov _boss_phase, PHASE_BOSS_EXPLODE_SMALL call b4balls_reset mov _boss_custombullets_render, offset nullfunc_near jmp short loc_1BD09 ; --------------------------------------------------------------------------- loc_1BD02: push 32h ; '2' call boss_death_sequence_function pop bp retf ; --------------------------------------------------------------------------- loc_1BD09: call b4balls_update push _boss_hp push 1EDCh call sub_17354 pop bp retf yuki_update endp ; --------------------------------------------------------------------------- off_1BD18 dw offset loc_1BA22 dw offset loc_1BA89 dw offset loc_1BAAD dw offset loc_1BB14 dw offset loc_1BB84 dw offset loc_1BBAE dw offset loc_1BC10 dw offset loc_1BC2F dw offset loc_1BC54 dw offset loc_1BC8C ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1BD2C proc near push bp mov bp, sp push si cmp _boss_phase_frame, 32 jnz short loc_1BD57 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD 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 ; --------------------------------------------------------------------------- loc_1BD57: cmp _boss_phase_frame, 32 jle short loc_1BDCB mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1BD99 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, _bullet_template.spread_angle_delta add al, 8 mov _bullet_template.spread_angle_delta, al mov al, _bullet_template.speed add al, 6 mov _bullet_template.speed, al inc si loc_1BD8D: cmp si, 8 jl short loc_1BD79 call snd_se_play pascal, 3 loc_1BD99: cmp _boss_phase_frame, 160 jnz short loc_1BDB0 mov _boss_phase_frame, 0 mov _boss_mode, 0 mov al, 1 jmp short loc_1BDCD ; --------------------------------------------------------------------------- loc_1BDB0: cmp _boss_mode_change, 2 jb short loc_1BDCB cmp _boss_phase_frame, 64 jl short loc_1BDCB mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx call boss_flystep_random pascal, dx loc_1BDCB: mov al, 0 loc_1BDCD: pop si pop bp retn sub_1BD2C endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1BDD0 proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_1BE12 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_STACK mov byte_2C976, 1 mov _bullet_template.BT_special_motion, 2 mov _bullet_template.patnum, PAT_BULLET16_V_BLUE mov al, _rank add al, 4 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 angle_2D085, 60h jmp loc_1BE92 ; --------------------------------------------------------------------------- loc_1BE12: cmp _boss_phase_frame, 32 jle short loc_1BE92 mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1BE60 mov ax, _boss_phase_frame mov bx, 32 cwd idiv bx or dx, dx jnz short loc_1BE40 mov al, angle_2D085 mov _bullet_template.BT_angle, al mov byte_2C977, 0C0h jmp short loc_1BE4E ; --------------------------------------------------------------------------- loc_1BE40: mov al, 80h sub al, angle_2D085 mov _bullet_template.BT_angle, al mov byte_2C977, 40h loc_1BE4E: call sub_15A9C mov al, angle_2D085 add al, 9 mov angle_2D085, al call snd_se_play pascal, 3 loc_1BE60: cmp _boss_phase_frame, 192 jnz short loc_1BE77 mov _boss_phase_frame, 0 mov _boss_mode, 0 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1BE77: cmp _boss_mode_change, 2 jb short loc_1BE92 cmp _boss_phase_frame, 64 jl short loc_1BE92 mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx call boss_flystep_random pascal, dx loc_1BE92: mov al, 0 pop bp retn sub_1BDD0 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1BE96 proc near push bp mov bp, sp push si mov ax, _boss_phase_frame add ax, -32 mov bx, 256 cwd idiv bx mov si, dx or si, si jnz short loc_1BED4 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD 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 _bullet_template_tune loc_1BED4: cmp si, 80h jg short loc_1BEF1 mov ax, si mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1BEF1 call sub_15A5C mov al, _bullet_template.BT_angle add al, 6 mov _bullet_template.BT_angle, al loc_1BEF1: pop si pop bp retn sub_1BE96 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1BEF4 proc near push bp mov bp, sp push si mov ax, _boss_phase_frame add ax, -32 mov bx, 256 cwd idiv bx mov si, dx or si, si jnz short loc_1BF31 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_RING 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 _bullet_template_tune loc_1BF31: cmp si, 80h jg short loc_1BF4A mov ax, si mov bx, 10h cwd idiv bx or dx, dx jnz short loc_1BF4A call sub_15A5C inc _bullet_template.BT_angle loc_1BF4A: pop si pop bp retn sub_1BEF4 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1BF4D proc near push bp mov bp, sp push si mov ax, _boss_phase_frame add ax, -32 mov bx, 256 cwd idiv bx mov si, dx or si, si jnz short loc_1BF9C mov b4ball_template.B4B_speed, (3 shl 4) mov b4ball_template.B4B_angle, 80h mov b4ball_template.B4B_hp, 24 mov b4ball_template.B4B_revenge, 1 mov b4ball_template.B4B_patnum_tiny_base, PAT_B4BALL_SNOW mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_RANDOM_ANGLE mov _bullet_template.patnum, 0 mov _bullet_template.spread, 4 mov _bullet_template.speed, (2 shl 4) call _bullet_template_tune loc_1BF9C: cmp si, 80h jg short loc_1BFD7 mov ax, si mov bx, 10h cwd idiv bx or dx, dx jnz short loc_1BFD7 mov al, b4ball_template.B4B_angle add al, 10h mov b4ball_template.B4B_angle, al call b4balls_add mov al, b4ball_template.B4B_angle add al, -10h mov b4ball_template.B4B_angle, al call b4balls_add mov al, b4ball_template.B4B_angle add al, -10h mov b4ball_template.B4B_angle, al call b4balls_add mov al, b4ball_template.B4B_angle add al, 4 mov b4ball_template.B4B_angle, al loc_1BFD7: pop si pop bp retn sub_1BF4D endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1BFDA proc near push bp mov bp, sp push si cmp _boss_phase_frame, 32 jnz short loc_1C004 mov _boss_sprite, 192 mov b4ball_template.B4B_speed, (3 shl 4) mov b4ball_template.B4B_hp, 24 mov b4ball_template.B4B_revenge, 1 mov b4ball_template.B4B_patnum_tiny_base, PAT_B4BALL_SNOW jmp loc_1C0DF ; --------------------------------------------------------------------------- loc_1C004: cmp _boss_phase_frame, 32 jle loc_1C0DF mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz loc_1C0AD mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD 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, _bullet_template.spread_angle_delta add al, 8 mov _bullet_template.spread_angle_delta, al mov al, _bullet_template.speed add al, 6 mov _bullet_template.speed, al inc si loc_1C057: cmp si, 8 jl short loc_1C043 call snd_se_play pascal, 3 mov _bullet_template.pattern, BP_RANDOM_ANGLE 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 idiv bx or dx, dx jnz short loc_1C0AD call player_angle_from pascal, b4ball_template.pos.cur.x, b4ball_template.pos.cur.y, 20h mov b4ball_template.B4B_angle, al call b4balls_add mov al, b4ball_template.B4B_angle add al, -20h mov b4ball_template.B4B_angle, al call b4balls_add mov al, b4ball_template.B4B_angle add al, -20h mov b4ball_template.B4B_angle, al call b4balls_add loc_1C0AD: cmp _boss_phase_frame, 224 jnz short loc_1C0C4 mov _boss_phase_frame, 0 mov _boss_mode, 0 mov al, 1 jmp short loc_1C0E1 ; --------------------------------------------------------------------------- loc_1C0C4: cmp _boss_mode_change, 2 jb short loc_1C0DF cmp _boss_phase_frame, 64 jl short loc_1C0DF mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx call boss_flystep_random pascal, dx loc_1C0DF: mov al, 0 loc_1C0E1: pop si pop bp retn sub_1BFDA endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1C0E4 proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_1C121 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD_STACK mov byte_2C976, 1 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 ; --------------------------------------------------------------------------- loc_1C121: cmp _boss_phase_frame, 32 jle short loc_1C190 mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1C15E mov _bullet_template.BT_angle, 80h call sub_15A9C mov al, byte_2C977 neg al mov byte_2C977, al mov _bullet_template.BT_angle, 0 call sub_15A9C mov al, byte_2C977 neg al add al, 8 mov byte_2C977, al call snd_se_play pascal, 3 loc_1C15E: cmp _boss_phase_frame, 192 jnz short loc_1C175 mov _boss_phase_frame, 0 mov _boss_mode, 0 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1C175: cmp _boss_mode_change, 2 jb short loc_1C190 cmp _boss_phase_frame, 64 jl short loc_1C190 mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx call boss_flystep_random pascal, dx loc_1C190: mov al, 0 pop bp retn sub_1C0E4 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1C194 proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_1C1C1 mov _boss_sprite, 192 mov b4ball_template.B4B_speed, (1 shl 4) + 12 mov b4ball_template.B4B_hp, 6 mov b4ball_template.B4B_revenge, 1 mov b4ball_template.B4B_angle, 80h mov b4ball_template.B4B_patnum_tiny_base, PAT_B4BALL_SNOW jmp short loc_1C239 ; --------------------------------------------------------------------------- loc_1C1C1: cmp _boss_phase_frame, 32 jle short loc_1C239 cmp _boss_phase_frame, 128 jg short loc_1C20F mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED 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 idiv bx or dx, dx jnz short loc_1C239 mov al, byte_2D080 mov b4ball_template.B4B_angle, al call b4balls_add mov al, byte_2D081 add byte_2D080, al call snd_se_play pascal, 3 jmp short loc_1C239 ; --------------------------------------------------------------------------- loc_1C20F: mov al, byte_2D081 neg al mov byte_2D081, al cmp byte_2D081, 7Fh jnb short loc_1C225 mov byte_2D080, 0 jmp short loc_1C22A ; --------------------------------------------------------------------------- loc_1C225: mov byte_2D080, 80h loc_1C22A: mov _boss_phase_frame, 0 mov _boss_mode, 0 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1C239: mov al, 0 pop bp retn sub_1C194 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1C23D proc near var_2 = word ptr -2 enter 2, 0 cmp _boss_phase_frame, 16 jnz short loc_1C2AB mov _boss_sprite, 192 push 0Fh call randring2_next16_and add ax, 10h mov [bp+var_2], ax mov _laser_template.grow_at_age, 32 mov _laser_template.shrink_at_age, 90 cwd sub ax, dx sar ax, 1 mov dl, 64 sub dl, byte ptr [bp+var_2] sub dl, al mov _laser_template.coords.angle, dl call lasers_new_fixed_in_slot pascal, 0 mov al, _laser_template.coords.angle add al, byte ptr [bp+var_2] mov _laser_template.coords.angle, al call lasers_new_fixed_in_slot pascal, 1 mov al, _laser_template.coords.angle add al, byte ptr [bp+var_2] mov _laser_template.coords.angle, al call lasers_new_fixed_in_slot pascal, 2 mov al, _laser_template.coords.angle add al, byte ptr [bp+var_2] mov _laser_template.coords.angle, al call lasers_new_fixed_in_slot pascal, 3 mov byte_2D083, 0F8h jmp loc_1C347 ; --------------------------------------------------------------------------- loc_1C2AB: cmp _boss_phase_frame, 32 jle loc_1C347 cmp _boss_phase_frame, 128 jg short loc_1C338 mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1C31D mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_STACK 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 _bullet_template.BT_angle, al call sub_15A70 mov al, 80h sub al, byte_2D083 mov _bullet_template.BT_angle, al call sub_15A70 mov al, byte_2D083 add al, 8 mov byte_2D083, al cmp byte_2D083, 30h ; '0' jbe short loc_1C316 mov byte_2D083, 0F8h loc_1C316: call snd_se_play pascal, 3 loc_1C31D: mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED 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 ; --------------------------------------------------------------------------- loc_1C338: mov _boss_phase_frame, 0 mov _boss_mode, 0 mov al, 1 leave retn ; --------------------------------------------------------------------------- loc_1C347: mov al, 0 leave retn sub_1C23D endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1C34B proc near var_2 = word ptr -2 enter 2, 0 push si cmp _boss_phase_frame, 32 jnz short loc_1C3B0 mov _laser_template.LASER_color, 8 mov _laser_template.coords.LASER_width, 8 call randring2_next16 mov [bp+var_2], ax mov al, _rank mov ah, 0 add ax, 5 mov word_2CE3C, ax xor si, si jmp short loc_1C38B ; --------------------------------------------------------------------------- loc_1C376: mov ax, si shl ax, 8 cwd idiv word_2CE3C add al, byte ptr [bp+var_2] mov _laser_template.coords.angle, al call lasers_new_fixed_and_manual_in_slot pascal, si inc si loc_1C38B: cmp si, word_2CE3C jl short loc_1C376 mov word_2CE40, 0 mov word_2CE3E, 1 mov fp_2CE44, offset sub_1BE96 mov angle_2D085, 1 mov byte_2D080, 0 jmp loc_1C513 ; --------------------------------------------------------------------------- loc_1C3B0: cmp _boss_phase_frame, 32 jle loc_1C513 mov ax, _boss_phase_frame add ax, -32 mov bx, 256 cwd idiv bx mov [bp+var_2], dx xor si, si jmp short loc_1C3DB ; --------------------------------------------------------------------------- loc_1C3CC: mov bx, si imul bx, size laser_t mov eax, _boss_pos.cur mov _lasers[bx].coords.origin, eax inc si loc_1C3DB: cmp si, word_2CE3C jl short loc_1C3CC cmp [bp+var_2], 0A0h jnz short loc_1C3F9 xor si, si jmp short loc_1C3F1 ; --------------------------------------------------------------------------- loc_1C3EC: call lasers_grow_manual_in_slot pascal, si inc si loc_1C3F1: cmp si, word_2CE3C jl short loc_1C3EC jmp short loc_1C426 ; --------------------------------------------------------------------------- loc_1C3F9: cmp [bp+var_2], 0D4h jnz short loc_1C417 xor si, si jmp short loc_1C40F ; --------------------------------------------------------------------------- loc_1C404: mov bx, si imul bx, size laser_t mov _lasers[bx].mode, LM_FIXED_SHRINK_AND_WAIT_TO_GROW inc si loc_1C40F: cmp si, word_2CE3C jl short loc_1C404 jmp short loc_1C426 ; --------------------------------------------------------------------------- loc_1C417: cmp [bp+var_2], 0B4h jnz short loc_1C426 mov al, angle_2D085 neg al mov angle_2D085, al loc_1C426: cmp [bp+var_2], 70h ; 'p' jg short loc_1C445 mov al, _stage_frame_mod2 mov ah, 0 add word_2CE3E, ax cmp word_2CE3E, 80h jle short loc_1C483 mov word_2CE3E, 80h jmp short loc_1C483 ; --------------------------------------------------------------------------- loc_1C445: cmp [bp+var_2], 0C0h jg short loc_1C460 sub word_2CE3E, 2 cmp word_2CE3E, 0 jge short loc_1C483 mov word_2CE3E, 0 jmp short loc_1C483 ; --------------------------------------------------------------------------- loc_1C460: mov al, _stage_frame_mod2 mov ah, 0 add word_2CE3E, ax cmp [bp+var_2], 0D4h jle short loc_1C483 push 1Fh call randring2_next16_and or ax, ax jnz short loc_1C483 mov ax, 0FFh sub ax, [bp+var_2] add _boss_phase_frame, ax loc_1C483: cmp [bp+var_2], 0 jnz short loc_1C4A3 mov al, byte_2D080 mov ah, 0 mov bx, 3 cwd idiv bx add dx, dx mov bx, dx mov ax, off_22818[bx] mov fp_2CE44, ax inc byte_2D080 loc_1C4A3: cmp _boss_phase_frame, 288 jl short loc_1C4C7 call fp_2CE44 cmp _boss_phase_frame, 544 jl short loc_1C4C7 cmp [bp+var_2], 60h jg short loc_1C4C7 mov ax, [bp+var_2] add ax, -32 call boss_flystep_random pascal, ax loc_1C4C7: mov ax, word_2CE3E add word_2CE40, ax cmp word_2CE40, 10h jl short loc_1C513 mov ax, word_2CE40 mov bx, 10h cwd idiv bx mov dl, angle_2D085 mov dh, 0 imul dx mov [bp+var_2], ax mov ax, word_2CE40 cwd idiv bx mov word_2CE40, dx xor si, si jmp short loc_1C50D ; --------------------------------------------------------------------------- loc_1C4F7: mov bx, si imul bx, size laser_t mov al, _lasers[bx].coords.angle add al, byte ptr [bp+var_2] mov bx, si imul bx, size laser_t mov _lasers[bx].coords.angle, al inc si loc_1C50D: cmp si, word_2CE3C jl short loc_1C4F7 loc_1C513: mov al, 0 pop si leave retn sub_1C34B endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1C518 proc far push bp mov bp, sp push si mov eax, _boss_pos.cur mov _homing_target, eax mov _bullet_template.BT_origin, eax mov _gather_template.GT_center, eax mov _laser_template.coords.origin, eax mov b4ball_template.pos.cur, eax inc _boss_phase_frame mov al, _boss_phase mov ah, 0 mov bx, ax cmp bx, 9 ja loc_1C7FE add bx, bx jmp cs:off_1C816[bx] loc_1C54D: cmp _boss_phase_frame, 1 jnz short loc_1C58E mov _boss_hp, 7800 mov _boss_phase_end_hp, 5800 mov _gather_template.GT_radius, (64 shl 4) mov _gather_template.GT_angle_delta, 2 mov _gather_template.GT_ring_points, 8 mov _boss_sprite, 180 mov _boss_sprite_left, 182 mov _boss_sprite_right, 181 mov _boss_sprite_stay, 180 mov b4ball_template.B4B_patnum_tiny_base, PAT_B4BALL_SNOW loc_1C58E: call sub_1FB07 cmp _boss_phase_frame, 64 jl loc_1C805 inc _boss_phase mov _boss_phase_frame, 0 call snd_se_play pascal, 13 mov fp_23F5A, offset mai_yuki_bg_render jmp loc_1C805 ; --------------------------------------------------------------------------- loc_1C5B4: call sub_1FB07 cmp _boss_phase_frame, 64 jl loc_1C805 mov _boss_sprite, 204 inc _boss_phase mov _boss_phase_frame, 0 mov _boss_custombullets_render, offset b4balls_render jmp loc_1C805 ; --------------------------------------------------------------------------- loc_1C5D8: call sub_1FB07 push (((PLAYFIELD_W / 2) shl 4) shl 16) or (96 shl 4) call boss_flystep_towards or al, al jz loc_1C805 mov _boss_sprite, 188 inc _boss_phase mov _boss_phase_frame, 0 mov _boss_mode, 1 mov _boss_mode_change, 0 call boss_explode_small pascal, ET_VERTICAL push _boss_pos.cur.x push _boss_pos.cur.y call circles_add_growing mov fp_2CE42, offset sub_1BD2C mov _boss_sprite_left, 190 mov _boss_sprite_right, 189 mov _boss_sprite_stay, 188 jmp loc_1C805 ; --------------------------------------------------------------------------- loc_1C630: mov al, _boss_mode mov ah, 0 or ax, ax jz short loc_1C640 cmp ax, 1 jz short loc_1C678 jmp short loc_1C67C ; --------------------------------------------------------------------------- loc_1C640: mov ax, _boss_phase_frame add ax, -32 call boss_flystep_random pascal, ax or al, al jz short loc_1C67C mov _boss_phase_frame, 0 inc _boss_mode inc _boss_mode_change cmp _boss_mode_change, 36 jnb short loc_1C68A mov al, _boss_mode_change mov ah, 0 and ax, 1 add ax, ax mov bx, ax mov ax, off_22826[bx] mov fp_2CE42, ax jmp short loc_1C67C ; --------------------------------------------------------------------------- loc_1C678: call fp_2CE42 loc_1C67C: call sub_1FADD or al, al jz loc_1C805 push 0Ah call sub_17416 loc_1C68A: push (ET_NW_SE shl 16) or 2800 jmp loc_1C755 ; --------------------------------------------------------------------------- loc_1C693: call sub_1FADD push (((PLAYFIELD_W / 2) shl 4) shl 16) or (128 shl 4) call boss_flystep_towards or al, al jz loc_1C805 inc _boss_phase mov _boss_phase_frame, 0 jmp loc_1C805 ; --------------------------------------------------------------------------- loc_1C6B2: call sub_1C34B cmp _boss_phase_frame, 5000 jge short loc_1C6CB call sub_1FADD or al, al jz loc_1C805 push 0Ah call sub_17416 loc_1C6CB: xor si, si jmp short loc_1C6D4 ; --------------------------------------------------------------------------- loc_1C6CF: call lasers_stop_in_slot pascal, si inc si loc_1C6D4: cmp si, 0Ah jl short loc_1C6CF push (ET_HORIZONTAL shl 16) or 1200 jmp short loc_1C755 ; --------------------------------------------------------------------------- loc_1C6E1: call sub_1FADD push (((PLAYFIELD_W / 2) shl 4) shl 16) or (96 shl 4) call boss_flystep_towards or al, al jz loc_1C805 jmp short loc_1C76D ; --------------------------------------------------------------------------- loc_1C6F5: mov al, _boss_mode mov ah, 0 or ax, ax jz short loc_1C705 cmp ax, 1 jz short loc_1C73D jmp short loc_1C741 ; --------------------------------------------------------------------------- loc_1C705: mov ax, _boss_phase_frame add ax, -32 call boss_flystep_random pascal, ax or al, al jz short loc_1C741 mov _boss_phase_frame, 0 inc _boss_mode inc _boss_mode_change cmp _boss_mode_change, 36 jnb short loc_1C74F mov al, _boss_mode_change mov ah, 0 and ax, 1 add ax, ax mov bx, ax mov ax, off_2281E[bx] mov fp_2CE42, ax jmp short loc_1C741 ; --------------------------------------------------------------------------- loc_1C73D: call fp_2CE42 loc_1C741: call sub_1FADD or al, al jz loc_1C805 push 0Ah call sub_17416 loc_1C74F: push (ET_NW_SE shl 16) or 0 loc_1C755: call boss_phase_end jmp loc_1C805 ; --------------------------------------------------------------------------- loc_1C75B: call sub_1FADD push (((PLAYFIELD_W / 2) shl 4) shl 16) or (96 shl 4) call boss_flystep_towards or al, al jz loc_1C805 loc_1C76D: inc _boss_phase mov _boss_phase_frame, 0 mov byte_2D080, 80h mov byte_2D081, 0FCh jmp loc_1C805 ; --------------------------------------------------------------------------- loc_1C784: mov al, _boss_mode mov ah, 0 or ax, ax jz short loc_1C794 cmp ax, 1 jz short loc_1C7D3 jmp short loc_1C7D7 ; --------------------------------------------------------------------------- loc_1C794: mov ax, _boss_phase_frame add ax, -4 call boss_flystep_random pascal, ax or al, al jz short loc_1C7D7 mov _boss_phase_frame, 0 inc _boss_mode inc _boss_mode_change cmp _boss_mode_change, 20 jb short loc_1C7BE mov _boss_mode_change, 0 jmp short loc_1C7E3 ; --------------------------------------------------------------------------- loc_1C7BE: mov al, _boss_mode_change mov ah, 0 and ax, 1 add ax, ax mov bx, ax mov ax, off_22822[bx] mov fp_2CE42, ax jmp short loc_1C7D7 ; --------------------------------------------------------------------------- loc_1C7D3: call fp_2CE42 loc_1C7D7: call sub_1FADD or al, al jz short loc_1C805 mov _boss_mode_change, 1 loc_1C7E3: call boss_explode_small pascal, ET_VERTICAL mov _boss_phase_frame, 0 mov _boss_phase, PHASE_BOSS_EXPLODE_SMALL call b4balls_reset mov _boss_custombullets_render, offset nullfunc_near jmp short loc_1C805 ; --------------------------------------------------------------------------- loc_1C7FE: push 46h ; 'F' call boss_death_sequence_function jmp short loc_1C812 ; --------------------------------------------------------------------------- loc_1C805: call b4balls_update push _boss_hp push 1E78h call sub_17354 loc_1C812: pop si pop bp retf sub_1C518 endp ; --------------------------------------------------------------------------- db 0 off_1C816 dw offset loc_1C54D dw offset loc_1C5B4 dw offset loc_1C5D8 dw offset loc_1C630 dw offset loc_1C693 dw offset loc_1C6B2 dw offset loc_1C6E1 dw offset loc_1C6F5 dw offset loc_1C75B dw offset loc_1C784 include th05/main/bullet/knives_add_update.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1C9BE proc near @@angle = byte ptr -1 arg_0 = word ptr 4 @@length = word ptr 6 enter 2, 0 cmp _boss_phase_frame, 1 jnz short loc_1C9E7 call randring2_next16 mov [bp+@@angle], al call vector2 pascal, ds, offset _boss_pos.velocity.x, ds, offset _boss_pos.velocity.y, word ptr [bp+@@angle], [bp+@@length] mov _boss_sprite, 188 loc_1C9E7: mov ax, _boss_pos.velocity.x add _boss_pos.cur.x, ax mov ax, _boss_pos.velocity.y add _boss_pos.cur.y, ax cmp _boss_pos.cur.x, (48 shl 4) jle short loc_1CA05 cmp _boss_pos.cur.x, (336 shl 4) jl short loc_1CA0F loc_1CA05: mov ax, -1 imul _boss_pos.velocity.x mov _boss_pos.velocity.x, ax loc_1CA0F: cmp _boss_pos.cur.y, (48 shl 4) jle short loc_1CA1F cmp _boss_pos.cur.y, (128 shl 4) jl short loc_1CA29 loc_1CA1F: mov ax, -1 imul _boss_pos.velocity.y mov _boss_pos.velocity.y, ax loc_1CA29: mov ax, _boss_phase_frame cmp ax, [bp+arg_0] jl short loc_1CA3C mov _boss_sprite, 180 mov al, 1 leave retn 4 ; --------------------------------------------------------------------------- loc_1CA3C: mov al, 0 leave retn 4 sub_1C9BE endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1CA42 proc near push bp mov bp, sp cmp _boss_phase_frame, 16 jnz short loc_1CA6B mov _boss_sprite, 184 mov knife_template.twirl_time, 48 mov knife_template.KNIFE_speed, (5 shl 4) mov knife_template.KNIFE_angle, 70h push 1 call randring2_next16_and mov angle_2D085, al pop bp retn ; --------------------------------------------------------------------------- loc_1CA6B: cmp _boss_phase_frame, 32 jle short loc_1CAD5 mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz short loc_1CAD5 cmp angle_2D085, 0 jz short loc_1CA8F mov al, 80h sub al, knife_template.KNIFE_angle mov knife_template.KNIFE_angle, al loc_1CA8F: push offset knife_template.pos.cur push _boss_pos.cur.x push _boss_pos.cur.y push (48 shl 4) mov al, knife_template.KNIFE_angle mov ah, 0 push ax call vector2_at call knives_add cmp angle_2D085, 0 jz short loc_1CABB mov al, 80h sub al, knife_template.KNIFE_angle mov knife_template.KNIFE_angle, al loc_1CABB: mov al, knife_template.KNIFE_angle add al, -6 mov knife_template.KNIFE_angle, al cmp knife_template.KNIFE_angle, 0Ch ja short loc_1CAD5 mov _boss_phase_frame, 0 mov _boss_mode, 0 loc_1CAD5: pop bp retn sub_1CA42 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1CAD7 proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jge short loc_1CB23 mov ax, _boss_phase_frame add ax, -16 call gather_add_only_3stack pascal, ax, large (7 shl 16) or 6 cmp _boss_phase_frame, 16 jnz short loc_1CB6F mov _boss_sprite, 184 mov _bullet_template.spawn_type, BST_CLOUD_BACKWARDS or BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_N_RED mov _bullet_template.pattern, BP_RING mov _bullet_template.speed, (3 shl 4) + 12 mov _bullet_template.spread, 16 call _bullet_template_tune call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- loc_1CB23: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1CB5D call randring2_next16 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, _bullet_template.BT_angle mov ah, 0 push ax call vector2_at call sub_15A5C call snd_se_play pascal, 3 loc_1CB5D: cmp _boss_phase_frame, 80 jnz short loc_1CB6F mov _boss_phase_frame, 0 mov _boss_mode, 0 loc_1CB6F: pop bp retn sub_1CAD7 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1CB71 proc near @@angle = byte ptr -1 enter 2, 0 push si cmp _boss_phase_frame, 32 jge short loc_1CBD2 mov ax, _boss_phase_frame add ax, -16 call gather_add_only_3stack pascal, ax, large (7 shl 16) or 6 cmp _boss_phase_frame, 16 jnz loc_1CCD0 mov _boss_sprite, 184 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_V_RED mov _bullet_template.pattern, BP_SINGLE mov _bullet_template.speed, (6 shl 4) call _bullet_template_tune call snd_se_play pascal, 8 mov knife_template.twirl_time, 32 mov knife_template.KNIFE_speed, (4 shl 4) + 12 mov byte_2D083, 0 mov byte_2D082, 20h ; ' ' jmp loc_1CCD0 ; --------------------------------------------------------------------------- loc_1CBD2: mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx mov si, dx mov al, byte_2D082 mov ah, 0 cmp ax, si jle short loc_1CC3E test si, 1 jnz short loc_1CC3E 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 call player_angle_from pascal, _bullet_template.BT_origin.x, _bullet_template.BT_origin.y, 0 mov angle_2D085, al mov ax, _bullet_template.BT_origin.x add ax, (64 shl 4) call player_angle_from pascal, ax, _bullet_template.BT_origin.y, 0 mov angle_2D084, al loc_1CC1F: mov al, angle_2D085 mov _bullet_template.BT_angle, al call sub_15A5C add _bullet_template.BT_origin.x, (64 shl 4) mov al, angle_2D084 mov _bullet_template.BT_angle, al call sub_15A5C call snd_se_play pascal, 3 loc_1CC3E: mov al, _yumeko_interval_phase4 mov ah, 0 push ax mov ax, _boss_phase_frame cwd pop bx idiv bx or dx, dx jnz short loc_1CC7F push 1Fh call randring2_next16_and sub al, 0Fh mov [bp+@@angle], al call randring2_next16_mod pascal, (96 shl 4) mov knife_template.pos.cur.y, ax call randring2_next16_mod pascal, (352 shl 4) add ax, (16 shl 4) mov knife_template.pos.cur.x, ax call player_angle_from pascal, ax, knife_template.pos.cur.y, word ptr [bp+@@angle] mov knife_template.KNIFE_angle, al call knives_add loc_1CC7F: mov ax, _boss_hp sub ax, _boss_phase_end_hp cmp ax, 600 jge short loc_1CCD0 cmp byte_2D083, 0 jnz short loc_1CCD0 mov byte_2D083, 1 push (16 shl 16) or 8 push ( 4 shl 16) or 4 call select_for_rank mov _yumeko_interval_phase4, al push (40 shl 16) or 48 push (52 shl 16) or 52 call select_for_rank mov byte_2D082, al call boss_explode_small pascal, 0 cmp _bullet_clear_time, 20 jnb short loc_1CCD0 mov _bullet_clear_time, 20 loc_1CCD0: pop si leave retn sub_1CB71 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1CCD3 proc near push bp mov bp, sp cmp _boss_phase_frame, 16 jge short loc_1CD26 mov ax, _boss_phase_frame dec ax call gather_add_only_3stack pascal, ax, large (7 shl 16) or 6 cmp _boss_phase_frame, 4 jnz loc_1CE0B mov _boss_sprite, 184 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD 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 angle_2D085, 60h mov angle_2D084, 40h pop bp retn ; --------------------------------------------------------------------------- loc_1CD26: mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz loc_1CDF8 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) mov al, angle_2D085 mov ah, 0 push ax call vector2_at mov al, angle_2D085 add al, angle_2D084 mov _bullet_template.BT_angle, al call sub_15A70 push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (48 shl 4) mov al, angle_2D085 add al, 80h mov ah, 0 push ax call vector2_at mov al, _bullet_template.BT_angle add al, 80h mov _bullet_template.BT_angle, al call sub_15A70 mov _bullet_template.patnum, 0 mov al, angle_2D085 neg al mov angle_2D085, al push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (32 shl 4) mov ah, 0 push ax call vector2_at mov al, angle_2D085 sub al, angle_2D084 mov _bullet_template.BT_angle, al call sub_15A70 push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (32 shl 4) mov al, angle_2D085 add al, 80h mov ah, 0 push ax call vector2_at mov al, _bullet_template.BT_angle add al, 80h mov _bullet_template.BT_angle, al call sub_15A70 mov al, angle_2D085 neg al mov angle_2D085, al add al, -8 mov angle_2D085, al mov al, angle_2D084 add al, -6 mov angle_2D084, al call snd_se_play pascal, 3 loc_1CDF8: cmp _boss_phase_frame, 256 jnz short loc_1CE0B mov _boss_phase_frame, 0 mov _boss_mode, 0 loc_1CE0B: pop bp retn sub_1CCD3 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1CE0D proc near push bp mov bp, sp cmp _boss_phase_frame, 16 jge short loc_1CE63 mov ax, _boss_phase_frame dec ax call gather_add_only_3stack pascal, ax, large (7 shl 16) or 6 cmp _boss_phase_frame, 4 jnz loc_1CED7 mov _boss_sprite, 184 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD_AIMED 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 _bullet_template_tune call snd_se_play pascal, 8 mov angle_2D085, 80h pop bp retn ; --------------------------------------------------------------------------- loc_1CE63: mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1CEC4 push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (48 shl 4) mov al, angle_2D085 mov ah, 0 push ax call vector2_at mov _bullet_template.spread, 5 call sub_15A5C push offset _bullet_template.BT_origin push _boss_pos.cur.x push _boss_pos.cur.y push (48 shl 4) mov al, 80h sub al, angle_2D085 mov ah, 0 push ax call vector2_at mov _bullet_template.spread, 4 call sub_15A5C mov al, angle_2D085 add al, 8 mov angle_2D085, al call snd_se_play pascal, 3 loc_1CEC4: cmp _boss_phase_frame, 192 jnz short loc_1CED7 mov _boss_phase_frame, 0 mov _boss_mode, 0 loc_1CED7: pop bp retn sub_1CE0D endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1CED9 proc near @@angle = byte ptr -1 enter 2, 0 push si push di cmp _boss_phase_frame, 32 jge short loc_1CF57 mov ax, _boss_phase_frame add ax, -16 call gather_add_only_3stack pascal, ax, large (7 shl 16) or 6 cmp _boss_phase_frame, 16 jnz loc_1D081 mov _boss_sprite, 184 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_V_BLUE mov _bullet_template.pattern, BP_SINGLE mov _bullet_template.speed, (6 shl 4) call _bullet_template_tune call snd_se_play pascal, 8 mov _laser_template.LASER_age, 24 mov _laser_template.shootout_speed, (6 shl 4) + 4 mov _laser_template.coords.LASER_width, 6 mov _laser_template.LASER_color, 8 mov _laser_template.grow_at_age, 28 mov byte_2D083, 0 mov byte_2D082, 20h ; ' ' mov knife_template.twirl_time, 32 mov knife_template.KNIFE_speed, (4 shl 4) + 12 jmp loc_1D081 ; --------------------------------------------------------------------------- loc_1CF57: mov ax, _boss_phase_frame mov bx, 64 cwd idiv bx mov di, dx mov al, byte_2D082 mov ah, 0 cmp ax, di jle short loc_1CFC3 test di, 1 jnz short loc_1CFC3 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 call player_angle_from pascal, _bullet_template.BT_origin.x, _bullet_template.BT_origin.y, 0 mov angle_2D085, al mov ax, _bullet_template.BT_origin.x add ax, (64 shl 4) call player_angle_from pascal, ax, _bullet_template.BT_origin.y, 0 mov angle_2D084, al loc_1CFA4: mov al, angle_2D085 mov _bullet_template.BT_angle, al call sub_15A5C add _bullet_template.BT_origin.x, (64 shl 4) mov al, angle_2D084 mov _bullet_template.BT_angle, al call sub_15A5C call snd_se_play pascal, 3 loc_1CFC3: mov al, _yumeko_interval_phase7 mov ah, 0 push ax mov ax, _boss_phase_frame cwd pop bx idiv bx or dx, dx jnz short loc_1D030 mov _laser_template.coords.origin.y, (32 shl 4) push (256 shl 4) call randring2_next16_mod add ax, (64 shl 4) mov _laser_template.coords.origin.x, ax call player_angle_from pascal, ax, _laser_template.coords.origin.y, 0 mov _laser_template.coords.angle, al call lasers_add_shoutout xor si, si jmp short loc_1D02B ; --------------------------------------------------------------------------- loc_1CFFA: push 1Fh call randring2_next16_and sub al, 0Fh mov [bp+@@angle], al call randring2_next16_mod pascal, (96 shl 4) mov knife_template.pos.cur.y, ax call randring2_next16_mod pascal, (352 shl 4) add ax, (16 shl 4) mov knife_template.pos.cur.x, ax call player_angle_from pascal, ax, knife_template.pos.cur.y, word ptr [bp+@@angle] mov knife_template.KNIFE_angle, al call knives_add inc si loc_1D02B: cmp si, 2 jl short loc_1CFFA loc_1D030: mov ax, _boss_hp sub ax, _boss_phase_end_hp cmp ax, 500 jge short loc_1D081 cmp byte_2D083, 0 jnz short loc_1D081 mov byte_2D083, 1 push (34 shl 16) or 28 push (20 shl 16) or 20 call select_for_rank mov _yumeko_interval_phase7, al push (40 shl 16) or 48 push (52 shl 16) or 48 call select_for_rank mov byte_2D082, al call boss_explode_small pascal, 0 cmp _bullet_clear_time, 20 jnb short loc_1D081 mov _bullet_clear_time, 20 loc_1D081: pop di pop si leave retn sub_1CED9 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame yumeko_1D085 proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jge loc_1D117 mov ax, _boss_phase_frame add ax, -16 call gather_add_only_3stack pascal, ax, large (7 shl 16) or 6 cmp _boss_phase_frame, 16 jnz loc_1D1C4 mov _boss_sprite, 184 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_D_BLUE mov _bullet_template.pattern, BP_SPREAD mov _bullet_template.spread, 5 push (24 shl 16) or 16 push (12 shl 16) or 10 call select_for_rank mov _bullet_template.spread_angle_delta, al mov _bullet_template.speed, (8 shl 4) call snd_se_play pascal, 8 mov knife_template.twirl_time, 32 mov knife_template.KNIFE_speed, (4 shl 4) push 200h call randring2_next16_mod mov _boss2_pos.cur.y, ax push (28h shl 16) or 1Eh push (18h shl 16) or 10h call select_for_rank mov angle_2D085, al mov angle_2D084, 0 loc_1D110: mov byte_2D083, 0 pop bp retn ; --------------------------------------------------------------------------- loc_1D117: cmp byte_2D083, 0 jnz short loc_1D17C mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz loc_1D1C4 mov al, angle_2D084 mov knife_template.KNIFE_angle, al cmp angle_2D084, 0 jnz short loc_1D142 mov knife_template.pos.cur.x, (16 shl 4) jmp short loc_1D148 ; --------------------------------------------------------------------------- loc_1D142: mov knife_template.pos.cur.x, ((PLAYFIELD_W - 16) shl 4) loc_1D148: mov ax, _boss2_pos.cur.y mov knife_template.pos.cur.y, ax call knives_add mov al, angle_2D085 mov ah, 0 shl ax, 4 add _boss2_pos.cur.y, ax mov al, angle_2D084 add al, 80h mov angle_2D084, al cmp _boss2_pos.cur.y, (376 shl 4) jl short loc_1D1C4 push 200h call randring2_next16_mod mov _boss2_pos.cur.y, ax inc byte_2D083 pop bp retn ; --------------------------------------------------------------------------- loc_1D17C: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1D1C4 cmp _bullet_template.speed, (6 shl 4) jbe short loc_1D1B9 mov _bullet_template.speed, 8 call snd_se_play pascal, 15 inc byte_2D083 cmp byte_2D083, 5 ja loc_1D110 call player_angle_from pascal, _bullet_template.BT_origin.x, _bullet_template.BT_origin.y, 0 mov _bullet_template.BT_angle, al loc_1D1B9: mov al, _bullet_template.speed add al, 8 mov _bullet_template.speed, al call sub_15A5C loc_1D1C4: pop bp retn yumeko_1D085 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1D1C6 proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jge short loc_1D228 mov ax, _boss_phase_frame add ax, -16 call gather_add_only_3stack pascal, ax, large (7 shl 16) or 6 cmp _boss_phase_frame, 16 jnz loc_1D269 mov _boss_sprite, 184 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_V_BLUE mov _bullet_template.pattern, BP_RING mov _bullet_template.spread, 18 mov _bullet_template.BT_special_motion, 2 mov _bullet_template.speed, (2 shl 4) + 6 call _bullet_template_tune call snd_se_play pascal, 8 mov angle_2D085, 0 mov byte_2C976, 2 mov angle_2D084, 0 pop bp retn ; --------------------------------------------------------------------------- loc_1D228: mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1D269 mov al, angle_2D084 mov _bullet_template.BT_angle, al test angle_2D085, 1 jz short loc_1D252 mov byte_2C977, 40h mov al, 80h sub al, _bullet_template.BT_angle mov _bullet_template.BT_angle, al jmp short loc_1D257 ; --------------------------------------------------------------------------- loc_1D252: mov byte_2C977, 0C0h loc_1D257: call sub_15A9C inc angle_2D084 inc angle_2D085 call snd_se_play pascal, 3 loc_1D269: pop bp retn sub_1D1C6 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public YUMEKO_UPDATE yumeko_update proc far push bp mov bp, sp push si mov eax, _boss_pos.cur mov _homing_target, eax mov _bullet_template.BT_origin, eax mov _gather_template.GT_center, eax mov knife_template.pos.cur, eax inc _boss_phase_frame mov al, _boss_phase mov ah, 0 mov bx, ax cmp bx, 0Ah ja loc_1D50C add bx, bx jmp cs:off_1D524[bx] loc_1D29C: cmp _boss_phase_frame, 1 jnz short loc_1D2EF mov _boss_hp, 8300 mov _boss_phase_end_hp, 7500 mov _gather_template.GT_radius, (64 shl 4) mov _gather_template.GT_angle_delta, 2 mov _gather_template.GT_ring_points, 8 mov _boss_sprite, 180 mov _boss_pos.velocity.x, (4 shl 4) mov si, 193 jmp short loc_1D2D7 ; --------------------------------------------------------------------------- loc_1D2D0: call super_convert_tiny pascal, si inc si loc_1D2D7: cmp si, 229 jl short loc_1D2D0 mov _boss_sprite_left, 180 mov _boss_sprite_right, 180 mov _boss_sprite_stay, 180 loc_1D2EF: cmp _boss2_pos.cur.y, (-32 shl 4) jl short loc_1D320 sub _boss2_pos.cur.y, (1 shl 4) mov _shot_hitbox_radius.x, (24 shl 4) mov _shot_hitbox_radius.y, (24 shl 4) mov eax, _boss2_pos.cur mov _shot_hitbox_center, eax call sub_126B3 or ax, ax jz short loc_1D320 call snd_se_play pascal, 10 loc_1D320: cmp _boss_phase_frame, 64 jge short loc_1D32D call sub_1FB07 jmp loc_1D513 ; --------------------------------------------------------------------------- loc_1D32D: mov _boss_sprite, 188 add _boss_pos.cur.x, (2 shl 4) cmp _boss_pos.cur.x, (192 shl 4) jl loc_1D513 mov _boss_sprite, 180 inc _boss_phase mov _boss_phase_frame, 0 call snd_se_play pascal, 13 mov fp_23F5A, offset yumeko_bg_render jmp loc_1D513 ; --------------------------------------------------------------------------- loc_1D360: call sub_1FB07 cmp _boss_phase_frame, 64 jl loc_1D513 inc _boss_phase mov _boss_phase_frame, 0 mov _boss_mode, 1 mov _boss_mode_change, 0 mov fp_2CE46, offset sub_1CA42 mov _boss_custombullets_render, offset knives_render jmp loc_1D513 ; --------------------------------------------------------------------------- loc_1D38F: mov al, _boss_mode mov ah, 0 or ax, ax jz short loc_1D39F cmp ax, 1 jz short loc_1D3EF jmp short loc_1D3F3 ; --------------------------------------------------------------------------- loc_1D39F: push 200040h call sub_1C9BE or al, al jz short loc_1D3F3 mov _boss_phase_frame, 0 inc _boss_mode inc _boss_mode_change cmp _boss_mode_change, 20 jnb short loc_1D40A cmp _boss_phase, 2 jnz short loc_1D3DA mov al, _boss_mode_change mov ah, 0 and ax, 1 add ax, ax mov bx, ax mov ax, off_2282A[bx] jmp short loc_1D3EA ; --------------------------------------------------------------------------- loc_1D3DA: mov al, _boss_mode_change mov ah, 0 and ax, 1 add ax, ax mov bx, ax mov ax, off_22832[bx] loc_1D3EA: mov fp_2CE46, ax jmp short loc_1D3F3 ; --------------------------------------------------------------------------- loc_1D3EF: call fp_2CE46 loc_1D3F3: cmp _boss_mode, 0 jz loc_1D513 call sub_1FADD or al, al jz loc_1D513 push 0Ah call sub_17416 loc_1D40A: cmp _boss_phase, 2 jnz short loc_1D41A pushd (0 shl 16) or 5700 jmp loc_1D4B7 ; --------------------------------------------------------------------------- loc_1D41A: push (ET_HORIZONTAL shl 16) or 2700 jmp loc_1D4B7 ; --------------------------------------------------------------------------- loc_1D423: call sub_1FADD push (((PLAYFIELD_W / 2) shl 4) shl 16) or (64 shl 4) call boss_flystep_towards or al, al jz loc_1D513 inc _boss_phase mov _boss_phase_frame, 0 cmp _boss_phase, 4 jnz short loc_1D44F mov fp_2CE46, offset sub_1CB71 jmp loc_1D513 ; --------------------------------------------------------------------------- loc_1D44F: mov fp_2CE46, offset sub_1CED9 jmp loc_1D513 ; --------------------------------------------------------------------------- loc_1D458: call fp_2CE46 cmp _boss_phase_frame, 2000 jge short loc_1D472 call sub_1FADD or al, al jz loc_1D513 push 0Ah call sub_17416 loc_1D472: cmp _boss_phase, 4 jnz short loc_1D48A call boss_phase_end pascal, (ET_NW_SE shl 16) or 4500 mov fp_2CE46, offset sub_1CCD3 jmp short loc_1D493 ; --------------------------------------------------------------------------- loc_1D48A: call boss_phase_end pascal, (ET_NW_SE shl 16) or 1200 loc_1D493: mov _boss_mode, 1 jmp short loc_1D513 ; --------------------------------------------------------------------------- loc_1D49A: call yumeko_1D085 cmp _boss_phase_frame, 2000 jge short loc_1D4B1 call sub_1FADD or al, al jz short loc_1D513 push 0Ah call sub_17416 loc_1D4B1: push (ET_NW_SE shl 16) or 0 loc_1D4B7: call boss_phase_end jmp short loc_1D513 ; --------------------------------------------------------------------------- loc_1D4BC: call sub_1FADD push (((PLAYFIELD_W / 2) shl 4) shl 16) or (96 shl 4) call boss_flystep_towards or al, al jz short loc_1D513 inc _boss_phase mov _boss_phase_frame, 0 mov _boss_mode_change, 0 jmp short loc_1D513 ; --------------------------------------------------------------------------- loc_1D4DD: call sub_1D1C6 cmp _boss_phase_frame, 1200 jge short loc_1D4F4 call sub_1FADD or al, al jz short loc_1D513 mov _boss_mode_change, 1 loc_1D4F4: call boss_explode_small pascal, ET_VERTICAL mov _boss_phase_frame, 0 mov _boss_phase, PHASE_BOSS_EXPLODE_SMALL mov _boss_custombullets_render, offset nullfunc_near jmp short loc_1D513 ; --------------------------------------------------------------------------- loc_1D50C: push 41h ; 'A' call boss_death_sequence_function jmp short loc_1D520 ; --------------------------------------------------------------------------- loc_1D513: call knives_update push _boss_hp push 206Ch call sub_17354 loc_1D520: pop si pop bp retf yumeko_update endp ; --------------------------------------------------------------------------- db 0 off_1D524 dw offset loc_1D29C dw offset loc_1D360 dw offset loc_1D38F dw offset loc_1D423 dw offset loc_1D458 dw offset loc_1D38F dw offset loc_1D423 dw offset loc_1D458 dw offset loc_1D49A dw offset loc_1D4BC dw offset loc_1D4DD include th05/main/bullet/b6balls_add_update.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1D667 proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_1D6B2 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_RING mov _bullet_template.BT_special_motion, 0Ah call randring2_next16 mov _bullet_template.BT_angle, al mov _bullet_template.spread, 16 push 1 call randring2_next16_and or ax, ax jz short loc_1D6A2 mov al, 2 jmp short loc_1D6A4 ; --------------------------------------------------------------------------- loc_1D6A2: mov al, -2 loc_1D6A4: mov angle_2D085, al call _bullet_template_tune call snd_se_play pascal, 15 loc_1D6B2: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1D6D1 call sub_15A70 mov al, _bullet_template.speed add al, 8 mov _bullet_template.speed, al mov al, angle_2D085 add _bullet_template.BT_angle, al loc_1D6D1: cmp _boss_phase_frame, 60 jnz short loc_1D6DD mov ax, 1 jmp short loc_1D6DF ; --------------------------------------------------------------------------- loc_1D6DD: xor ax, ax loc_1D6DF: pop bp retn sub_1D667 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1D6E1 proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_1D719 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_RING call randring2_next16 mov _bullet_template.BT_angle, al mov _bullet_template.spread, 16 push (10h shl 16) or 0Ch push ( 8h shl 16) or 4h call select_for_rank mov angle_2D085, al loc_1D719: mov al, angle_2D085 mov ah, 0 push ax mov ax, _boss_phase_frame cwd pop bx idiv bx or dx, dx jnz short loc_1D766 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, _bullet_template.BT_angle mov ah, 0 push ax call vector2_at mov _bullet_template.speed, (2 shl 4) call sub_15A5C mov _bullet_template.speed, (4 shl 4) mov al, _bullet_template.BT_angle add al, 8 mov _bullet_template.BT_angle, al call sub_15A5C call snd_se_play pascal, 3 loc_1D766: cmp _boss_phase_frame, 96 jnz short loc_1D772 mov ax, 1 jmp short loc_1D774 ; --------------------------------------------------------------------------- loc_1D772: xor ax, ax loc_1D774: pop bp retn sub_1D6E1 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1D776 proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jge short loc_1D7C2 mov ax, _boss_phase_frame add ax, -16 call gather_add_only_3stack pascal, ax, large (7 shl 16) or 6 cmp _boss_phase_frame, 2 jnz short loc_1D7DA mov _boss_sprite, 181 mov _bullet_template.spawn_type, BST_CLOUD_BACKWARDS or BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_N_RED mov _bullet_template.pattern, BP_RING mov _bullet_template.speed, (3 shl 4) + 12 mov _bullet_template.spread, 16 call _bullet_template_tune call snd_se_play pascal, 8 pop bp retn ; --------------------------------------------------------------------------- loc_1D7C2: call fp_2CE48 or al, al jz short loc_1D7DA mov _boss_sprite, 180 mov _boss_phase_frame, 0 mov _boss_mode, 0 loc_1D7DA: pop bp retn sub_1D776 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1D7DC proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_1D805 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.speed, (1 shl 4) + 12 mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED mov _bullet_template.spread, 3 call _bullet_template_tune call snd_se_play pascal, 15 loc_1D805: mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz short loc_1D82E mov _bullet_template.patnum, PAT_BULLET16_D_BLUE sub _bullet_template.BT_origin.x, (16 shl 4) call sub_15A5C mov _bullet_template.patnum, PAT_BULLET16_V_BLUE add _bullet_template.BT_origin.x, (32 shl 4) call sub_15A5C loc_1D82E: mov ax, _boss_phase_frame add ax, -64 call boss_flystep_random pascal, ax pop bp retn sub_1D7DC endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1D83A proc near push bp mov bp, sp cmp _boss_phase_frame, 32 jnz short loc_1D877 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_SPREAD_STACK_AIMED 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 _bullet_template.BT_stack, ax mov _bullet_template.speed, (2 shl 4) loc_1D877: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1D88E call sub_15A5C call snd_se_play pascal, 15 loc_1D88E: mov ax, _boss_phase_frame add ax, -64 call boss_flystep_random pascal, ax pop bp retn sub_1D83A endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1D89A proc near push bp mov bp, sp push si cmp _boss_phase_frame, 16 jnz short loc_1D8F7 mov _laser_template.coords.angle, 80 call lasers_new_fixed_and_manual_in_slot pascal, 0 mov _laser_template.coords.angle, 72 call lasers_new_fixed_and_manual_in_slot pascal, 1 mov _laser_template.coords.angle, 64 call lasers_new_fixed_and_manual_in_slot pascal, 2 mov _laser_template.coords.angle, 64 call lasers_new_fixed_and_manual_in_slot pascal, 3 mov _laser_template.coords.angle, 56 call lasers_new_fixed_and_manual_in_slot pascal, 4 mov _laser_template.coords.angle, 48 call lasers_new_fixed_and_manual_in_slot pascal, 5 call snd_se_play pascal, 8 mov _boss_sprite, 181 mov angle_2D085, 0 mov angle_2D084, 64h loc_1D8F7: cmp _boss_phase_frame, 16 jle loc_1DA17 cmp _lasers[2 * size laser_t].coords.angle, 128 jnb short loc_1D954 cmp _stage_frame_mod2, 0 jz loc_1DA17 mov al, _lasers[0 * size laser_t].coords.angle inc al mov _lasers[0 * size laser_t].coords.angle, al mov al, _lasers[1 * size laser_t].coords.angle inc al mov _lasers[1 * size laser_t].coords.angle, al mov al, _lasers[2 * size laser_t].coords.angle inc al mov _lasers[2 * size laser_t].coords.angle, al mov al, _lasers[3 * size laser_t].coords.angle add al, -1 mov _lasers[3 * size laser_t].coords.angle, al mov al, _lasers[4 * size laser_t].coords.angle add al, -1 mov _lasers[4 * size laser_t].coords.angle, al mov al, _lasers[5 * size laser_t].coords.angle add al, -1 mov _lasers[5 * size laser_t].coords.angle, al mov al, angle_2D084 mov ah, 0 mov PaletteTone, ax mov _palette_changed, 1 inc angle_2D084 jmp loc_1DA17 ; --------------------------------------------------------------------------- loc_1D954: cmp angle_2D085, 0 jnz short loc_1D9D5 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_SINGLE call _bullet_template_tune xor si, si jmp short loc_1D9AE ; --------------------------------------------------------------------------- loc_1D972: call randring2_next16_mod pascal, (256 shl 4) add ax, _boss_pos.cur.x sub ax, (128 shl 4) 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 _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 loc_1D9AE: cmp si, 32h ; '2' jl short loc_1D972 mov _boss_sprite, 184 xor si, si jmp short loc_1D9C1 ; --------------------------------------------------------------------------- loc_1D9BC: call lasers_grow_manual_in_slot pascal, si inc si loc_1D9C1: cmp si, 6 jl short loc_1D9BC call snd_se_play pascal, 15 mov word_2CE06, 8 jmp short loc_1DA13 ; --------------------------------------------------------------------------- loc_1D9D5: cmp _stage_frame_mod2, 0 jz short loc_1D9E4 mov PaletteTone, 150 jmp short loc_1D9EA ; --------------------------------------------------------------------------- loc_1D9E4: mov PaletteTone, 100 loc_1D9EA: mov _palette_changed, 1 cmp angle_2D085, 8 jb short loc_1DA13 mov PaletteTone, 100 mov _palette_changed, 1 xor si, si jmp short loc_1DA0A ; --------------------------------------------------------------------------- loc_1DA05: call lasers_stop_in_slot pascal, si inc si loc_1DA0A: cmp si, 6 jl short loc_1DA05 mov al, 1 jmp short loc_1DA19 ; --------------------------------------------------------------------------- loc_1DA13: inc angle_2D085 loc_1DA17: mov al, 0 loc_1DA19: pop si pop bp retn sub_1D89A endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1DA1C proc near push bp mov bp, sp cmp _boss_phase_frame, 128 jle loc_1DAD0 mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1DA6A call randring2_next16_mod pascal, (PLAYFIELD_W shl 4) mov b6ball_template.pos.cur.x, ax call randring2_next16_mod pascal, (64 shl 4) add ax, (32 shl 4) mov b6ball_template.pos.cur.y, ax mov b6ball_template.B6B_angle, 40h call randring2_next16_and pascal, 1Fh add al, (3 shl 4) mov b6ball_template.B6B_speed, al mov b6ball_template.B6B_patnum_tiny, PAT_B6BALL_BLUE_1 call b6balls_add call snd_se_play pascal, 3 loc_1DA6A: mov ax, _boss_phase_frame mov bx, 24 cwd idiv bx or dx, dx jnz short loc_1DAD0 call randring2_next16_mod pascal, (256 shl 4) add ax, _boss_pos.cur.x sub ax, (128 shl 4) 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 _bullet_template.BT_origin.y, dx mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_N_BLUE mov _bullet_template.pattern, BP_SPREAD_AIMED mov _bullet_template.spread, 5 push (16 shl 16) or 12 push (10 shl 16) or 8 call select_for_rank mov _bullet_template.spread_angle_delta, al mov _bullet_template.BT_angle, 0 mov _bullet_template.speed, (3 shl 4) call _bullet_template_tune call sub_15A5C loc_1DAD0: pop bp retn sub_1DA1C endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1DAD2 proc near push bp mov bp, sp push si cmp _boss_phase_frame, 128 jl loc_1DB78 cmp _boss_phase_frame, 128 jnz short loc_1DB10 push (80h shl 16) or 30h push (20h shl 16) or 18h call select_for_rank mov angle_2D084, al push (20h shl 16) or 28h push (30h shl 16) or 38h call select_for_rank mov angle_2D085, al loc_1DB10: mov al, angle_2D084 mov ah, 0 push ax mov ax, _boss_phase_frame cwd pop bx idiv bx mov si, dx test si, 7 jnz short loc_1DB78 mov _bullet_template.patnum, PAT_BULLET16_N_OUTLINED_BALL_BLUE mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD 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 _bullet_template.BT_angle, 18h call sub_15A5C or si, si jnz short loc_1DB78 mov curvebullet_template.CBTMPL_col, 11 mov curvebullet_template.CBTMPL_speed, (4 shl 4) call randring2_next16_mod pascal, 3 shl al, 6 mov curvebullet_template.CBTMPL_angle, al call curvebullets_add call snd_se_play pascal, 3 loc_1DB78: pop si pop bp retn sub_1DAD2 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1DB7B proc near push bp mov bp, sp push si cmp _boss_phase_frame, 160 jge short loc_1DB8C mov al, 0 jmp loc_1DC2C ; --------------------------------------------------------------------------- loc_1DB8C: cmp _boss_phase_frame, 192 jge short loc_1DBB8 cmp _boss_phase_frame, 128 jnz short loc_1DBA3 call snd_se_play pascal, 8 loc_1DBA3: test byte ptr _boss_phase_frame, 1 jz short loc_1DBB1 add _boss_pos.cur.y, (2 shl 4) jmp short loc_1DC1D ; --------------------------------------------------------------------------- loc_1DBB1: sub _boss_pos.cur.y, (2 shl 4) jmp short loc_1DC1D ; --------------------------------------------------------------------------- loc_1DBB8: cmp _boss_phase_frame, 192 jnz short loc_1DC1D mov b6ball_template.B6B_patnum_tiny, PAT_B6BALL_PURPLE xor si, si jmp short loc_1DC06 ; --------------------------------------------------------------------------- loc_1DBCA: push (256 shl 4) call randring2_next16_mod add ax, _boss_pos.cur.x sub ax, (128 shl 4) mov b6ball_template.pos.cur.x, ax push (64 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y sub dx, ax add dx, (16 shl 4) mov b6ball_template.pos.cur.y, dx call randring2_next16_mod pascal, 40h add al, 20h mov b6ball_template.B6B_angle, al call randring2_next16_and pascal, 3Fh add al, (2 shl 4) mov b6ball_template.B6B_speed, al call b6balls_add inc si loc_1DC06: cmp si, 10h jl short loc_1DBCA mov _boss_sprite, 192 call snd_se_play pascal, 15 mov word_2CE06, 8 loc_1DC1D: cmp _boss_phase_frame, 200 jnz short loc_1DC2A mov ax, 1 jmp short loc_1DC2C ; --------------------------------------------------------------------------- loc_1DC2A: xor ax, ax loc_1DC2C: pop si pop bp retn sub_1DB7B endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1DC2F proc near push bp mov bp, sp push si cmp _boss_phase_frame, 128 jle loc_1DCFD cmp _boss_phase_frame, 129 jnz short loc_1DC59 push (60h shl 16) or 20h push (1Ch shl 16) or 18h call select_for_rank mov angle_2D085, al loc_1DC59: mov ax, _boss_phase_frame mov bx, 128 cwd idiv bx mov si, dx mov al, angle_2D085 mov ah, 0 push ax mov ax, _boss_phase_frame cwd pop bx idiv bx or dx, dx jnz short loc_1DC93 call player_angle_from pascal, b6ball_template.pos.cur.x, b6ball_template.pos.cur.y, 0 mov b6ball_template.B6B_angle, al mov b6ball_template.B6B_speed, (4 shl 4) mov b6ball_template.B6B_patnum_tiny, PAT_B6BALL_PURPLE call b6balls_add loc_1DC93: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1DCFD sub _bullet_template.BT_origin.x, (128 shl 4) mov _bullet_template.pattern, BP_SPREAD mov _bullet_template.BT_special_motion, 0Ah mov word ptr _bullet_template.spread, (2 shl 8) or 3 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN 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 _bullet_template.BT_angle, al jmp short loc_1DCE1 ; --------------------------------------------------------------------------- loc_1DCD4: mov ax, si imul ax, 3 mov dl, 64 sub dl, al mov _bullet_template.BT_angle, dl loc_1DCE1: call sub_15A70 mov al, 80h 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 loc_1DCFD: pop si pop bp retn sub_1DC2F endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1DD00 proc near var_2 = word ptr -2 enter 2, 0 cmp _boss_phase_frame, 192 jl locret_1E020 mov ax, _boss_phase_frame add ax, -192 mov [bp+var_2], ax cmp _boss_hp, 5600 jle short loc_1DD27 cmp _boss_phase_frame, 1800 jl short loc_1DD72 loc_1DD27: cmp word_22852, 0 jnz short loc_1DD72 mov _laser_template.coords.LASER_width, 6 mov _laser_template.coords.angle, 64 mov _laser_template.LASER_color, 14 add _laser_template.coords.origin.x, (96 shl 4) call lasers_new_fixed_and_manual_in_slot pascal, 0 sub _laser_template.coords.origin.x, (64 shl 4) call lasers_new_fixed_and_manual_in_slot pascal, 1 sub _laser_template.coords.origin.x, (64 shl 4) call lasers_new_fixed_and_manual_in_slot pascal, 2 sub _laser_template.coords.origin.x, (64 shl 4) call lasers_new_fixed_and_manual_in_slot pascal, 3 inc word_22852 call boss_explode_small pascal, 0 loc_1DD72: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz loc_1DF48 cmp [bp+var_2], 0 jnz short loc_1DDC3 mov angle_2D084, 20h mov angle_2D085, 0 push (64 shl 16) or 40 push (32 shl 16) or 28 call select_for_rank mov byte_2D083, al mov byte_2D082, 0 mov byte_2D081, 0 mov byte_2D080, 0 mov byte_2D07E, 40h mov byte_2D07F, 40h mov byte_2D07D, 0 loc_1DDC3: mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_V_RED mov _bullet_template.pattern, BP_SPREAD cmp angle_2D085, 40h jnz short loc_1DDE4 cmp byte_2D082, 0 jnz short loc_1DDE4 inc byte_2D082 loc_1DDE4: cmp byte_2D082, 0 jnz short loc_1DDF2 mov _bullet_template.spread, 1 jmp short loc_1DDF7 ; --------------------------------------------------------------------------- loc_1DDF2: mov _bullet_template.spread, 3 loc_1DDF7: 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, angle_2D085 mov _bullet_template.BT_angle, al call sub_15A8E sub _bullet_template.BT_origin.x, (64 shl 4) mov al, angle_2D084 mov _bullet_template.BT_angle, al call sub_15A8E sub _bullet_template.BT_origin.x, (64 shl 4) mov al, 80h sub al, angle_2D084 mov _bullet_template.BT_angle, al call sub_15A8E sub _bullet_template.BT_origin.x, (64 shl 4) mov al, 80h sub al, angle_2D085 mov _bullet_template.BT_angle, al call sub_15A8E cmp byte_2D082, 0 jnz short loc_1DE5D mov al, angle_2D085 add al, 4 mov angle_2D085, al mov al, angle_2D084 add al, 2 mov angle_2D084, al jmp loc_1DEEA ; --------------------------------------------------------------------------- loc_1DE5D: mov _bullet_template.patnum, 0 mov _bullet_template.spawn_type, BST_SLOWDOWN mov word ptr _bullet_template.spread, (48 shl 8) or 3 mov al, angle_2D085 add al, 80h mov _bullet_template.BT_angle, al add _bullet_template.BT_origin.x, (192 shl 4) call sub_15A8E sub _bullet_template.BT_origin.x, (64 shl 4) mov al, angle_2D084 add al, 80h mov _bullet_template.BT_angle, al call sub_15A8E sub _bullet_template.BT_origin.x, (64 shl 4) mov al, 0 sub al, angle_2D084 mov _bullet_template.BT_angle, al call sub_15A8E sub _bullet_template.BT_origin.x, (64 shl 4) mov al, 0 sub al, angle_2D085 mov _bullet_template.BT_angle, al call sub_15A8E cmp byte_2D081, 0 jnz short loc_1DED3 mov al, angle_2D085 add al, -2 mov angle_2D085, al dec angle_2D084 cmp angle_2D085, 30h jnz short loc_1DEEA inc byte_2D081 jmp short loc_1DEEA ; --------------------------------------------------------------------------- loc_1DED3: mov al, angle_2D085 add al, 2 mov angle_2D085, al inc angle_2D084 cmp angle_2D085, 40h jnz short loc_1DEEA dec byte_2D081 loc_1DEEA: cmp byte_2D082, 0 jz short loc_1DF41 mov al, byte_2D083 mov ah, 0 push ax mov ax, _boss_phase_frame cwd pop bx idiv bx or dx, dx jnz short loc_1DF41 push (256 shl 4) call randring2_next16_mod add ax, _boss_pos.cur.x sub ax, (128 shl 4) mov b6ball_template.pos.cur.x, ax push (64 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y sub dx, ax add dx, (16 shl 4) mov b6ball_template.pos.cur.y, dx call player_angle_from pascal, b6ball_template.pos.cur.x, dx, 0 mov b6ball_template.B6B_angle, al mov b6ball_template.B6B_speed, (3 shl 4) + 12 mov b6ball_template.B6B_patnum_tiny, PAT_B6BALL_PURPLE call b6balls_add loc_1DF41: call snd_se_play pascal, 3 loc_1DF48: cmp word_22852, 0 jz locret_1E020 cmp word_22852, 40h jl short loc_1DF73 cmp word_22852, 40h jnz short loc_1DF79 call lasers_grow_manual_in_slot pascal, 0 call lasers_grow_manual_in_slot pascal, 1 call lasers_grow_manual_in_slot pascal, 2 call lasers_grow_manual_in_slot pascal, 3 loc_1DF73: inc word_22852 leave retn ; --------------------------------------------------------------------------- loc_1DF79: cmp byte_2D080, 0 jnz short loc_1DF8F cmp angle_2D085, 30h jnz locret_1E020 inc byte_2D080 leave retn ; --------------------------------------------------------------------------- loc_1DF8F: mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz locret_1E020 mov al, byte_2D07F mov _lasers[0 * size laser_t].coords.angle, al mov al, byte_2D07E mov _lasers[1 * size laser_t].coords.angle, al mov al, 128 sub al, _lasers[1 * size laser_t].coords.angle mov _lasers[2 * size laser_t].coords.angle, al mov al, 128 sub al, _lasers[0 * size laser_t].coords.angle mov _lasers[3 * size laser_t].coords.angle, al cmp byte_2D07D, 0 jnz short loc_1DFD8 inc byte_2D07F dec byte_2D07E cmp byte_2D07E, 38h ; '8' jnz short loc_1DFEB inc byte_2D07D jmp short loc_1DFEB ; --------------------------------------------------------------------------- loc_1DFD8: dec byte_2D07F inc byte_2D07E cmp byte_2D07E, 41h ; 'A' jnz short loc_1DFEB dec byte_2D07D loc_1DFEB: cmp _boss_hp, 3800 jle short loc_1DFFB cmp _boss_phase_frame, 2500 jl short locret_1E020 loc_1DFFB: mov ax, word_22852 inc word_22852 cmp ax, 41h ; 'A' jnz short locret_1E020 push (52 shl 16) or 20 push (16 shl 16) or 12 call select_for_rank mov byte_2D083, al call boss_explode_small pascal, 0 locret_1E020: leave retn sub_1DD00 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1E022 proc near push bp mov bp, sp push si cmp _boss_phase_frame, 128 jl loc_1E15A cmp _boss_phase_frame, 128 jnz short loc_1E047 mov b6ball_template.B6B_angle, 0 mov angle_2D085, 0 mov angle_2D084, 0 loc_1E047: mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1E0A6 mov b6ball_template.B6B_patnum_tiny, PAT_B6BALL_BLUE_1 push offset b6ball_template.pos.cur push _boss_pos.cur.x push _boss_pos.cur.y push (64 shl 4) mov al, b6ball_template.B6B_angle mov ah, 0 push ax call vector2_at call b6balls_add mov al, b6ball_template.B6B_angle add al, 80h mov b6ball_template.B6B_angle, al push offset b6ball_template.pos.cur push _boss_pos.cur.x push _boss_pos.cur.y push (64 shl 4) mov ah, 0 push ax call vector2_at call b6balls_add mov al, b6ball_template.B6B_angle add al, -78h mov b6ball_template.B6B_angle, al call snd_se_play pascal, 3 loc_1E0A6: cmp _boss_phase_frame, 256 jl loc_1E13D mov ax, _boss_phase_frame mov bx, 256 cwd idiv bx mov si, dx mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1E0F8 cmp si, 80h jge short loc_1E0F8 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_RING mov al, angle_2D085 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, angle_2D085 add al, -2 mov angle_2D085, al loc_1E0F8: cmp _boss_phase_frame, 512 jl short loc_1E13D mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1E13D cmp si, 80h jl short loc_1E13D mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_RING mov al, angle_2D084 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, angle_2D084 add al, 4 mov angle_2D084, al loc_1E13D: cmp _boss_phase_frame, 720 jl short loc_1E15A mov ax, _boss_phase_frame add ax, -720 mov bx, 128 cwd idiv bx mov si, dx lea ax, [si-96] call boss_flystep_random pascal, ax loc_1E15A: pop si pop bp retn sub_1E022 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1E15D proc near push bp mov bp, sp cmp _stage_frame_mod4, 0 jnz short loc_1E195 cmp byte_22854, 0 jnz short loc_1E17F inc _boss_pos.velocity.y cmp _boss_pos.velocity.y, (1 shl 4) jl short loc_1E18E inc byte_22854 jmp short loc_1E18E ; --------------------------------------------------------------------------- loc_1E17F: dec _boss_pos.velocity.y cmp _boss_pos.velocity.y, (-1 shl 4) jg short loc_1E18E dec byte_22854 loc_1E18E: mov ax, _boss_pos.velocity.y add _boss_pos.cur.y, ax loc_1E195: pop bp retn sub_1E15D endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public SHINKI_UPDATE shinki_update proc far push bp mov bp, sp push si push di mov eax, _boss_pos.cur mov _homing_target, eax mov _bullet_template.BT_origin, eax mov _gather_template.GT_center, eax mov _laser_template.coords.origin, eax mov b6ball_template.pos.cur, eax inc _boss_phase_frame mov al, _boss_phase mov ah, 0 mov bx, ax cmp bx, 0Ch ja loc_1E522 add bx, bx jmp cs:off_1E53C[bx] loc_1E1CD: cmp _boss_phase_frame, 1 jnz short loc_1E220 mov _boss_hp, 22800 mov _boss_phase_end_hp, 20600 mov _gather_template.GT_radius, (64 shl 4) mov _gather_template.GT_angle_delta, 2 mov _gather_template.GT_ring_points, 8 mov _boss_sprite, 180 mov _boss_pos.velocity.y, 0 mov _boss_sprite_left, 183 mov _boss_sprite_right, 182 mov _boss_sprite_stay, 180 mov si, 200 jmp short loc_1E21A ; --------------------------------------------------------------------------- loc_1E213: call super_convert_tiny pascal, si inc si loc_1E21A: cmp si, 208 jl short loc_1E213 loc_1E220: call sub_1FB07 cmp _boss_phase_frame, 192 jl loc_1E527 mov _boss_phase_frame, 0 inc _boss_phase call snd_se_play pascal, 13 mov fp_23F5A, offset shinki_bg_render jmp loc_1E527 ; --------------------------------------------------------------------------- loc_1E247: call sub_1FB07 cmp _boss_phase_frame, 32 jnz short loc_1E265 mov Palettes, 0 mov Palettes+1, 0 mov Palettes+2, 0 mov _palette_changed, 1 loc_1E265: cmp _boss_phase_frame, 64 jl loc_1E527 inc _boss_phase mov _boss_mode, 1 mov _boss_phase_frame, 0 mov fp_2CE48, offset sub_1D667 jmp loc_1E36F ; --------------------------------------------------------------------------- loc_1E286: mov al, _boss_mode mov ah, 0 or ax, ax jz short loc_1E296 cmp ax, 1 jz short loc_1E2D9 jmp short loc_1E2DC ; --------------------------------------------------------------------------- loc_1E296: mov ax, _boss_phase_frame add ax, -32 call boss_flystep_random pascal, ax or al, al jz short loc_1E2DC mov _boss_phase_frame, 0 inc _boss_mode_change inc _boss_mode mov al, byte_2D080 mov ah, 0 shl ax, 2 mov dl, _boss_mode_change mov dh, 0 and dx, 1 add dx, dx add ax, dx mov bx, ax mov ax, off_2284A[bx] mov fp_2CE48, ax cmp _boss_mode_change, 16 jb short loc_1E2DC jmp short loc_1E2EA ; --------------------------------------------------------------------------- loc_1E2D9: call sub_1D776 loc_1E2DC: call sub_1FADD or al, al jz loc_1E527 push 0Ah call sub_17416 loc_1E2EA: cmp byte_2D080, 0 jnz short loc_1E308 call boss_phase_end pascal, (ET_NW_SE shl 16) or 18400 mov _boss_mode, 1 mov fp_2CE48, offset sub_1D7DC jmp loc_1E481 ; --------------------------------------------------------------------------- loc_1E308: call boss_phase_end pascal, (ET_NW_SE shl 16) or 14600 jmp loc_1E481 ; --------------------------------------------------------------------------- loc_1E314: call sub_1FADD push (((PLAYFIELD_W / 2) shl 4) shl 16) or (80 shl 4) call boss_flystep_towards or al, al jz loc_1E527 inc _boss_phase mov _boss_phase_frame, 0 jmp loc_1E527 ; --------------------------------------------------------------------------- loc_1E333: call sub_1FADD call sub_1D89A or al, al jz loc_1E527 inc _boss_phase mov _boss_phase_frame, 0 mov _boss_pos.velocity.y, 0 mov _boss_custombullets_render, offset b6balls_render push ((50 shl 4) shl 16) or (35 shl 4) push ((45 shl 4) shl 16) or (50 shl 4) call select_for_playchar mov _boss_hitbox_radius.x, ax mov fp_2CE4A, offset sub_1DA1C loc_1E36F: mov byte_2D080, 0 jmp loc_1E527 ; --------------------------------------------------------------------------- loc_1E377: cmp Palettes+2, 80h jnb short loc_1E38E cmp _stage_frame_mod16, 0 jnz short loc_1E389 inc Palettes+2 loc_1E389: mov _palette_changed, 1 loc_1E38E: call sub_1E15D call fp_2CE4A cmp _boss_phase_frame, 3000 jge short loc_1E3AB call sub_1FADD or al, al jz loc_1E527 push 19h call sub_17416 loc_1E3AB: cmp byte_2D080, 0 jnz short loc_1E3C4 call boss_phase_end pascal, (ET_SW_NE shl 16) or 11600 mov fp_2CE4A, offset sub_1DAD2 jmp loc_1E47B ; --------------------------------------------------------------------------- loc_1E3C4: call boss_phase_end pascal, (ET_HORIZONTAL shl 16) or 8600 jmp loc_1E527 ; --------------------------------------------------------------------------- loc_1E3D0: cmp Palettes+2, 0 jbe short loc_1E3E7 cmp _stage_frame_mod8, 0 jnz short loc_1E3E2 dec Palettes+2 loc_1E3E2: mov _palette_changed, 1 loc_1E3E7: call sub_1FADD call sub_1DB7B or al, al jz loc_1E527 inc _boss_phase mov _boss_phase_frame, 0 mov fp_2CE4A, offset sub_1DC2F jmp loc_1E36F ; --------------------------------------------------------------------------- loc_1E406: cmp Palettes+2, 0 jbe short loc_1E41A cmp _stage_frame_mod8, 0 jnz short loc_1E42C dec Palettes+2 jmp short loc_1E42C ; --------------------------------------------------------------------------- loc_1E41A: cmp Palettes, 80h jnb short loc_1E431 cmp _stage_frame_mod16, 0 jnz short loc_1E42C inc Palettes loc_1E42C: mov _palette_changed, 1 loc_1E431: call sub_1E15D call fp_2CE4A cmp _boss_phase_frame, 3000 jge short loc_1E465 call sub_1FADD mov ah, 0 mov di, ax cmp _bombing, 0 jz short loc_1E45A mov al, _boss_damage_this_frame mov ah, 0 dec ax add _boss_hp, ax xor di, di loc_1E45A: or di, di jz loc_1E527 push 19h call sub_17416 loc_1E465: cmp byte_2D080, 0 jnz short loc_1E488 call boss_phase_end pascal, (ET_SW_NE shl 16) or 2800 mov fp_2CE4A, offset sub_1DD00 loc_1E47B: mov _boss_phase_frame, 0 loc_1E481: inc byte_2D080 jmp loc_1E527 ; --------------------------------------------------------------------------- loc_1E488: call boss_phase_end pascal, (ET_HORIZONTAL shl 16) or 0 mov word_2CE06, 10h call lasers_stop_in_slot pascal, 0 call lasers_stop_in_slot pascal, 1 call lasers_stop_in_slot pascal, 2 call lasers_stop_in_slot pascal, 3 jmp short loc_1E527 ; --------------------------------------------------------------------------- loc_1E4AD: call sub_1FADD mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz short loc_1E4C5 mov PaletteTone, 150 jmp short loc_1E4CB ; --------------------------------------------------------------------------- loc_1E4C5: mov PaletteTone, 100 loc_1E4CB: mov _palette_changed, 1 cmp _boss_phase_frame, 16 jle short loc_1E527 inc _boss_phase mov _boss_sprite, 180 mov _boss_hitbox_radius.x, (24 shl 4) mov Palettes, 60h mov Palettes+2, 0 call snd_se_play pascal, 13 jmp short loc_1E527 ; --------------------------------------------------------------------------- loc_1E4F9: call sub_1E022 cmp _boss_phase_frame, 3000 jge short loc_1E510 call sub_1FADD or al, al jz short loc_1E527 mov _boss_mode_change, 1 loc_1E510: call boss_explode_small pascal, ET_VERTICAL mov _boss_phase_frame, 0 mov _boss_phase, PHASE_BOSS_EXPLODE_SMALL jmp short loc_1E527 ; --------------------------------------------------------------------------- loc_1E522: push 41h ; 'A' call boss_death_sequence_function loc_1E527: call b6balls_update call curvebullets_update push _boss_hp push 22800 call sub_17354 pop di pop si pop bp retf shinki_update endp ; --------------------------------------------------------------------------- db 0 off_1E53C dw offset loc_1E1CD dw offset loc_1E247 dw offset loc_1E286 dw offset loc_1E286 dw offset loc_1E314 dw offset loc_1E333 dw offset loc_1E377 dw offset loc_1E377 dw offset loc_1E3D0 dw offset loc_1E406 dw offset loc_1E406 dw offset loc_1E4AD dw offset loc_1E4F9 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1E556 proc near arg_0 = word ptr 4 push bp mov bp, sp push si mov si, [bp+arg_0] cmp si, 0FFF8h jl loc_1E5F5 or si, si jge short loc_1E570 mov _midboss_sprite, 221 jmp loc_1E5F5 ; --------------------------------------------------------------------------- loc_1E570: cmp si, 1Eh jge short loc_1E5C6 or si, si jnz short loc_1E580 call snd_se_play pascal, 8 loc_1E580: mov ax, 2 imul si mov si, ax push offset _midboss_pos.velocity push word ptr _midboss_angle mov ax, (4 shl 4) sub ax, si push ax call vector2_near push offset _midboss_pos call _motion_update_2 cmp si, 10h jge short loc_1E5A7 mov ax, 1 jmp short loc_1E5A9 ; --------------------------------------------------------------------------- loc_1E5A7: xor ax, ax loc_1E5A9: push ax cmp si, 30h ; '0' jle short loc_1E5B4 mov ax, 1 jmp short loc_1E5B6 ; --------------------------------------------------------------------------- loc_1E5B4: xor ax, ax loc_1E5B6: pop dx or dx, ax jz short loc_1E5BF mov al, 222 jmp short loc_1E5C1 ; --------------------------------------------------------------------------- loc_1E5BF: mov al, 223 loc_1E5C1: mov _midboss_sprite, al jmp short loc_1E5F5 ; --------------------------------------------------------------------------- loc_1E5C6: cmp si, 28h ; '(' jge short loc_1E5EA cmp si, 1Eh jnz short loc_1E5D7 call snd_se_play pascal, 15 loc_1E5D7: mov eax, _midboss_pos.cur mov _midboss_pos.prev, eax mov _midboss_sprite, 221 call off_2285A jmp short loc_1E5F5 ; --------------------------------------------------------------------------- loc_1E5EA: mov _midboss_sprite, 220 call off_2285A jmp short loc_1E5F7 ; --------------------------------------------------------------------------- loc_1E5F5: mov al, 0 loc_1E5F7: pop si pop bp retn 2 sub_1E556 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1E5FC proc near push bp mov bp, sp cmp _midboss_phase_frame, 112 jl short loc_1E60A mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1E60A: mov al, 0 pop bp retn sub_1E5FC endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1E60E proc near push bp mov bp, sp cmp _midboss_phase_frame, 94 jnz short loc_1E62A push 1 call randring2_next16_and or ax, ax jz short loc_1E625 mov al, 1 jmp short loc_1E627 ; --------------------------------------------------------------------------- loc_1E625: mov al, 0FFh loc_1E627: mov byte_2D083, al loc_1E62A: cmp _midboss_phase_frame, 114 jg short loc_1E65F mov _bullet_template.spawn_type, BST_SLOWDOWN mov byte_2C976, 2 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 _bullet_template.speed, 8 mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_BLUE mov al, byte_2D083 add _bullet_template.BT_angle, al call sub_15A70 loc_1E65F: cmp _midboss_phase_frame, 128 jl short loc_1E66B mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1E66B: mov al, 0 pop bp retn sub_1E60E endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1E66F proc near push bp mov bp, sp cmp _page_back, 0 jz short loc_1E696 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_RANDOM_ANGLE_AND_SPEED 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: cmp _midboss_phase_frame, 128 jl short loc_1E6A2 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1E6A2: mov al, 0 pop bp retn sub_1E66F endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1E6A6 proc near push bp mov bp, sp mov ax, _midboss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1E6FE mov _bullet_template.spawn_type, BST_CLOUD_BACKWARDS or BST_SLOWDOWN mov byte_2C976, 1 mov _bullet_template.BT_special_motion, 2 mov _bullet_template.pattern, BP_SPREAD_STACK 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 _bullet_template.BT_angle, 0 mov byte_2C977, 38h ; '8' call sub_15A70 call snd_se_play pascal, 3 loc_1E6FE: cmp _midboss_phase_frame, 128 jl short loc_1E70A mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1E70A: mov al, 0 pop bp retn sub_1E6A6 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MIDBOSSX_UPDATE midbossx_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur mov _bullet_template.BT_origin, eax mov _gather_template.GT_center, eax inc _midboss_phase_frame mov al, _midboss_phase mov ah, 0 or ax, ax jz short loc_1E732 cmp ax, 1 jz short loc_1E776 jmp loc_1E855 ; --------------------------------------------------------------------------- loc_1E732: call sub_1FA9D pascal, (24 shl 4) or ((24 shl 4) shl 16), 10 mov _midboss_angle, 64 push _midboss_phase_frame call sub_1E556 or al, al jz loc_1E864 inc _midboss_phase mov _midboss_phase_frame, 0 mov _midboss_angle, 0 mov angle_2D085, 0 mov angle_2D084, 0 mov byte_2D082, 0 mov off_2285A, offset sub_1E60E jmp loc_1E864 ; --------------------------------------------------------------------------- loc_1E776: mov ax, _midboss_phase_frame add ax, -64 push ax call sub_1E556 or al, al jz short loc_1E7F2 cmp byte_2D082, 0 jnz short loc_1E7AF cmp _midboss_hp, 1000 jge short loc_1E7AF push 0Ah call sub_173AC cmp _bullet_clear_time, 20 jnb short loc_1E7A4 mov _bullet_clear_time, 20 loc_1E7A4: call snd_se_play pascal, 15 inc byte_2D082 loc_1E7AF: mov angle_2D085, 1 mov _midboss_phase_frame, 0 mov al, angle_2D084 mov ah, 0 and ax, 7 mov bx, ax mov al, byte_22868[bx] mov _midboss_angle, al inc angle_2D084 mov al, byte_2D082 mov ah, 0 shl ax, 2 mov dl, angle_2D084 mov dh, 0 mov bx, 2 push ax mov ax, dx cwd idiv bx add dx, dx pop bx add bx, dx mov ax, off_2285C[bx] mov off_2285A, ax loc_1E7F2: call sub_1FA9D pascal, (24 shl 4) or ((24 shl 4) shl 16), 4 mov _midboss_damage_this_frame, al mov ah, 0 sub _midboss_hp, ax cmp angle_2D084, 14h jnb short loc_1E82B cmp _midboss_hp, 0 jg short loc_1E864 mov _bullet_clear_trigger, 1 push 1Eh call sub_173AC call items_add pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, IT_1UP loc_1E82B: mov _midboss_phase, PHASE_EXPLODE_BIG mov _midboss_sprite, 4 mov _midboss_phase_frame, 0 call sparks_add_circle pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, large (((8 shl 4) shl 16) or 48) call snd_se_play pascal, 12 jmp short loc_1E864 ; --------------------------------------------------------------------------- loc_1E855: call sub_17486 push _midboss_hp push 3000 call sub_17354 pop bp retf ; --------------------------------------------------------------------------- loc_1E864: push _midboss_hp push 3000 call sub_17354 mov ax, _midboss_pos.cur.x mov _homing_target.x, ax mov ax, _midboss_pos.cur.y mov _homing_target.y, ax pop bp retf midbossx_update endp FIREWAVES_ADD procdesc pascal near \ amp:word, is_right:byte FIREWAVES_UPDATE procdesc pascal near main_034_TEXT ends main_035_TEXT segment byte public 'CODE' use16 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1E8DA proc near push bp mov bp, sp mov ax, _boss_phase_frame add ax, -48 call gather_add_only_3stack pascal, ax, large (6 shl 16) or 7 cmp _boss_phase_frame, 48 jnz short loc_1E900 mov _boss_sprite, 181 call snd_se_play pascal, 8 loc_1E900: cmp _boss_phase_frame, 64 jl short loc_1E91E call fp_2CE66 or al, al jz short loc_1E91E mov _boss_phase_frame, 0 mov _boss_mode, 0 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1E91E: mov al, 0 pop bp retn sub_1E8DA endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1E922 proc near push bp mov bp, sp mov _bullet_template.spawn_type, BST_SLOWDOWN 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 _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_SPREAD_AIMED 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 cwd idiv bx or dx, dx jnz short loc_1E967 call snd_se_play pascal, 3 loc_1E967: cmp _boss_phase_frame, 128 jnz short loc_1E974 mov ax, 1 jmp short loc_1E976 ; --------------------------------------------------------------------------- loc_1E974: xor ax, ax loc_1E976: pop bp retn sub_1E922 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1E978 proc near push bp mov bp, sp cmp _boss_phase_frame, 64 jnz short loc_1E98B mov al, 1 sub al, angle_2D085 mov angle_2D085, al loc_1E98B: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1E9F9 mov _bullet_template.spawn_type, BST_CLOUD_BACKWARDS or BST_SLOWDOWN mov _bullet_template.speed, (4 shl 4) cmp angle_2D085, 0 jz short loc_1E9B0 mov al, _bullet_template.BT_angle add al, 2 jmp short loc_1E9B5 ; --------------------------------------------------------------------------- loc_1E9B0: mov al, _bullet_template.BT_angle add al, -2 loc_1E9B5: mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_RING mov _bullet_template.BT_special_motion, 1 mov byte_2C976, 1 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 idiv bx or dx, dx jnz short loc_1E9E4 call sub_15A5C jmp short loc_1E9F2 ; --------------------------------------------------------------------------- loc_1E9E4: mov word ptr _bullet_template.spread, (10 shl 8) or 8 mov _bullet_template.patnum, PAT_BULLET16_V_RED call sub_15A70 loc_1E9F2: call snd_se_play pascal, 3 loc_1E9F9: mov ax, _boss_phase_frame add ax, -100 call boss_flystep_random pascal, ax cmp _boss_phase_frame, 128 jnz short loc_1EA10 mov ax, 1 jmp short loc_1EA12 ; --------------------------------------------------------------------------- loc_1EA10: xor ax, ax loc_1EA12: pop bp retn sub_1E978 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1EA14 proc near push bp mov bp, sp cmp _boss_phase_frame, 64 jnz short loc_1EA2E mov angle_2D084, 40h mov byte_2D083, 0 mov _pellet_bottom_col, GC_I loc_1EA2E: mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz loc_1EB0C mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz loc_1EAE3 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.patnum, 0 mov _bullet_template.pattern, BP_SPREAD_AIMED mov word ptr _bullet_template.spread, (6 shl 8) or 5 mov _bullet_template.speed, (5 shl 4) mov al, angle_2D084 mov _bullet_template.BT_angle, al call sub_15A5C mov al, _bullet_template.BT_angle neg al mov _bullet_template.BT_angle, al call sub_15A5C cmp byte_2D083, 0 jnz short loc_1EA96 mov al, angle_2D084 add al, -3 mov angle_2D084, al cmp angle_2D084, 14h ja short loc_1EAA9 inc byte_2D083 jmp short loc_1EAA9 ; --------------------------------------------------------------------------- loc_1EA96: mov al, angle_2D084 add al, 3 mov angle_2D084, al cmp angle_2D084, 40h jb short loc_1EAA9 dec byte_2D083 loc_1EAA9: mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1EAE3 call randring2_next16_mod pascal, (96 shl 4) add ax, _bullet_template.BT_origin.x sub ax, (48 shl 4) 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 point_2CE52.y, ax call player_angle_from pascal, point_2CE52.x, ax, 0 mov angle_2D085, al loc_1EAE3: 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, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov al, angle_2D085 mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_SINGLE mov _bullet_template.speed, (6 shl 4) mov _bullet_template.patnum, PAT_BULLET16_V_RED call sub_15A5C loc_1EB0C: mov ax, _boss_phase_frame mov bx, 128 cwd idiv bx or dx, dx jnz short loc_1EB39 push bx mov ax, _boss_phase_frame mov bx, 256 ; amp cwd idiv bx or dx, dx jnz short loc_1EB2C mov ax, 1 jmp short loc_1EB2E ; --------------------------------------------------------------------------- loc_1EB2C: xor ax, ax loc_1EB2E: push ax ; is_right call firewaves_add call snd_se_play pascal, 13 loc_1EB39: cmp _boss_phase_frame, 256 jl short loc_1EB4E mov ax, _boss_phase_frame and ax, 7Fh add ax, -96 call boss_flystep_random pascal, ax loc_1EB4E: mov al, 0 pop bp retn sub_1EA14 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1EB52 proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz loc_1EBF0 mov _bullet_template.spawn_type, BST_SLOWDOWN call randring2_next16_and pascal, 1Fh add al, 12 mov _bullet_template.speed, al call randring2_next16_and pascal, 7Fh add al, 80h mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_SPREAD mov _bullet_template.BT_special_motion, 9 mov byte_2C976, 1 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 cwd idiv bx or dx, dx jnz short loc_1EBF0 call snd_se_play pascal, 3 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN call randring2_next16_mod pascal, (96 shl 4) sub ax, (48 shl 4) 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 mov _bullet_template.patnum, 0 mov _bullet_template.pattern, BP_STACK_AIMED 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: cmp _boss_phase_frame, 128 jnz short loc_1EBFD mov ax, 1 jmp short loc_1EBFF ; --------------------------------------------------------------------------- loc_1EBFD: xor ax, ax loc_1EBFF: pop bp retn sub_1EB52 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1EC01 proc near push bp mov bp, sp cmp _boss_phase_frame, 64 jnz short loc_1EC14 mov al, 1 sub al, angle_2D085 mov angle_2D085, al loc_1EC14: mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1EC5B mov _bullet_template.spawn_type, BST_CLOUD_BACKWARDS or BST_SLOWDOWN mov _bullet_template.speed, (5 shl 4) + 8 cmp angle_2D085, 0 jz short loc_1EC39 mov al, _bullet_template.BT_angle add al, 3 jmp short loc_1EC3E ; --------------------------------------------------------------------------- loc_1EC39: mov al, _bullet_template.BT_angle add al, -3 loc_1EC3E: mov _bullet_template.BT_angle, al mov _bullet_template.pattern, BP_RING 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 loc_1EC5B: cmp _boss_phase_frame, 128 jnz short loc_1EC68 mov ax, 1 jmp short loc_1EC6A ; --------------------------------------------------------------------------- loc_1EC68: xor ax, ax loc_1EC6A: pop bp retn sub_1EC01 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1EC6C proc near push bp mov bp, sp cmp _boss_phase_frame, 64 jnz short loc_1EC7B mov _bullet_template.spread, 8 loc_1EC7B: mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1ECD0 mov _bullet_template.patnum, PAT_BULLET16_D_BLUE mov _bullet_template.spawn_type, BST_CLOUD_BACKWARDS or BST_SLOWDOWN mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_RING 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 _bullet_template.spread, 14 jnb short loc_1ECB9 inc _bullet_template.spread loc_1ECB9: mov byte_2C976, 1 mov al, _bullet_template.BT_angle add al, 2 mov _bullet_template.BT_angle, al call sub_15A70 call snd_se_play pascal, 3 loc_1ECD0: mov al, 0 pop bp retn sub_1EC6C endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1ECD4 proc near push bp mov bp, sp push si push di mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx mov di, dx mov _laser_template.LASER_color, 3 mov _laser_template.coords.LASER_width, 8 mov _laser_template.grow_at_age, 47 mov _laser_template.shrink_at_age, 80 cmp _boss_phase_frame, 144 jge short loc_1ED67 or di, di jnz short loc_1ED46 call player_angle_from pascal, _laser_template.coords.origin.x, _laser_template.coords.origin.y, 30h mov _laser_template.coords.angle, al mov ax, word_22870 inc word_22870 call lasers_new_fixed_in_slot pascal, ax mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_D_GREEN mov _bullet_template.pattern, BP_RING call randring2_next16 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 ; --------------------------------------------------------------------------- loc_1ED46: cmp di, 8 jnz short loc_1ED67 call player_angle_from pascal, _laser_template.coords.origin.x, _laser_template.coords.origin.y, (-30h and 255) mov _laser_template.coords.angle, al mov ax, word_22870 inc word_22870 call lasers_new_fixed_in_slot pascal, ax loc_1ED67: and word_22870, 0Fh xor si, si jmp short loc_1EDA4 ; --------------------------------------------------------------------------- loc_1ED70: mov bx, si imul bx, size laser_t cmp _lasers[bx].mode, LM_FIXED_WAIT_TO_GROW jnz short loc_1EDA3 test si, 1 jz short loc_1ED8F mov bx, si imul bx, size laser_t mov al, _lasers[bx].coords.angle inc al jmp short loc_1ED9A ; --------------------------------------------------------------------------- loc_1ED8F: mov bx, si imul bx, size laser_t mov al, _lasers[bx].coords.angle add al, -1 loc_1ED9A: mov bx, si imul bx, size laser_t mov _lasers[bx].coords.angle, al loc_1EDA3: inc si loc_1EDA4: cmp si, 10h jl short loc_1ED70 cmp _boss_phase_frame, 208 jnz short loc_1EDBB mov word_22870, 0 mov al, 1 jmp short loc_1EDBD ; --------------------------------------------------------------------------- loc_1EDBB: mov al, 0 loc_1EDBD: pop di pop si pop bp retn sub_1ECD4 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1EDC1 proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz short loc_1EE14 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD_AIMED mov _bullet_template.BT_special_motion, 3 mov byte_2C976, 2 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, _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 loc_1EE14: mov ax, _boss_phase_frame add ax, -100 call boss_flystep_random pascal, ax cmp _boss_phase_frame, 128 jnz short loc_1EE2B mov ax, 1 jmp short loc_1EE2D ; --------------------------------------------------------------------------- loc_1EE2B: xor ax, ax loc_1EE2D: pop bp retn sub_1EDC1 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1EE2F proc near push bp mov bp, sp cmp _boss_phase_frame, 64 jnz short loc_1EE59 mov _laser_template.LASER_color, 2 mov _laser_template.coords.LASER_width, 6 mov _laser_template.coords.angle, 0 mov _laser_template.grow_at_age, 30 mov _laser_template.shootout_speed, (5 shl 4) + 8 mov angle_2D085, 0 loc_1EE59: mov ax, _boss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1EEA1 cmp angle_2D085, 0 jnz short loc_1EE83 mov al, _laser_template.coords.angle add al, 8 mov _laser_template.coords.angle, al cmp _laser_template.coords.angle, 128 jb short loc_1EE9E mov angle_2D085, 1 jmp short loc_1EE9E ; --------------------------------------------------------------------------- loc_1EE83: cmp angle_2D085, 1 jnz short loc_1EEA1 mov al, _laser_template.coords.angle add al, -8 mov _laser_template.coords.angle, al cmp _laser_template.coords.angle, 0 jnz short loc_1EE9E mov angle_2D085, 0 loc_1EE9E: call lasers_add_shoutout loc_1EEA1: cmp _boss_phase_frame, 256 jl short loc_1EEED mov ax, _boss_phase_frame and ax, 3Fh add ax, -32 call boss_flystep_random pascal, ax cmp _boss_phase_frame, 512 jl short loc_1EEED mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1EEED mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.pattern, BP_RING_AIMED 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: mov al, 0 pop bp retn sub_1EE2F endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1EEF1 proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1EF6F mov _bullet_template.speed, (3 shl 4) + 8 mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD_AIMED 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 cwd idiv bx or dx, dx jnz short loc_1EF6F mov curvebullet_template.CBTMPL_col, 11 mov curvebullet_template.CBTMPL_speed, (3 shl 4) mov ax, _boss_phase_frame mov bx, 128 cwd idiv bx or dx, dx jnz short loc_1EF54 push curvebullet_template.pos.cur.x push curvebullet_template.pos.cur.y push 20h jmp short loc_1EF5F ; --------------------------------------------------------------------------- loc_1EF54: push curvebullet_template.pos.cur.x push curvebullet_template.pos.cur.y push (-20h and 255) loc_1EF5F: call player_angle_from mov curvebullet_template.CBTMPL_angle, al call curvebullets_add call snd_se_play pascal, 15 loc_1EF6F: cmp _boss_phase_frame, 256 jnz short loc_1EF7C mov ax, 1 jmp short loc_1EF7E ; --------------------------------------------------------------------------- loc_1EF7C: xor ax, ax loc_1EF7E: pop bp retn sub_1EEF1 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1EF80 proc near push bp mov bp, sp mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz short loc_1EFCF mov curvebullet_template.CBTMPL_col, 11 mov curvebullet_template.CBTMPL_speed, (4 shl 4) mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1EFB4 push curvebullet_template.pos.cur.x push curvebullet_template.pos.cur.y push 40h jmp short loc_1EFBF ; --------------------------------------------------------------------------- loc_1EFB4: push curvebullet_template.pos.cur.x push curvebullet_template.pos.cur.y push (-40h and 255) loc_1EFBF: call player_angle_from mov curvebullet_template.CBTMPL_angle, al call curvebullets_add call snd_se_play pascal, 15 loc_1EFCF: mov ax, _boss_phase_frame mov bx, 32 cwd idiv bx call boss_flystep_random pascal, dx cmp _boss_phase_frame, 128 jnz short loc_1EFE9 mov ax, 1 jmp short loc_1EFEB ; --------------------------------------------------------------------------- loc_1EFE9: xor ax, ax loc_1EFEB: pop bp retn sub_1EF80 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1EFED proc near push bp mov bp, sp add _bullet_template.BT_origin.y, (104 shl 4) mov ax, word_22872 mov _bullet_template.BT_origin.x, ax mov _gather_template.GT_center.x, ax cmp _boss_phase_frame, 64 jnz short loc_1F045 mov curvebullet_template.CBH_angle, -3Ch mov _bullet_template.BT_angle, 20h mov curvebullet_template.CBH_speed, (5 shl 4) mov _bullet_template.speed, (3 shl 4) mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.pattern, BP_SPREAD mov word ptr _bullet_template.spread, (8 shl 8) or 3 mov _bullet_template.patnum, PAT_BULLET16_N_CROSS_BLUE mov angle_2D085, 0 mov angle_2D084, 0 mov byte_2D083, 0 call snd_se_play pascal, 8 loc_1F045: cmp _boss_phase_frame, 128 jge short loc_1F08C mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz loc_1F137 mov _gather_template.GT_col, 14 mov ax, _bullet_template.BT_origin.y mov _gather_template.GT_center.y, ax mov _gather_template.GT_radius, (256 shl 4) mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1F081 mov _gather_template.GT_angle_delta, 2 jmp short loc_1F086 ; --------------------------------------------------------------------------- loc_1F081: mov _gather_template.GT_angle_delta, -2 loc_1F086: call _gather_add_only jmp loc_1F137 ; --------------------------------------------------------------------------- loc_1F08C: mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz loc_1F137 mov ax, _boss_phase_frame mov bx, 16 cwd idiv bx or dx, dx jnz short loc_1F0D0 mov ax, _bullet_template.BT_origin.y mov _gather_template.GT_center.y, ax mov _gather_template.GT_radius, (128 shl 4) mov ax, _boss_phase_frame mov bx, 32 cwd idiv bx or dx, dx jnz short loc_1F0C8 mov _gather_template.GT_angle_delta, 2 jmp short loc_1F0CD ; --------------------------------------------------------------------------- loc_1F0C8: mov _gather_template.GT_angle_delta, -2 loc_1F0CD: call _gather_add_only loc_1F0D0: mov al, 80h sub al, _bullet_template.BT_angle mov _bullet_template.BT_angle, al call sub_15A8E mov al, 80h sub al, _bullet_template.BT_angle mov _bullet_template.BT_angle, al call sub_15A8E call snd_se_play pascal, 3 mov al, angle_2D085 sub _bullet_template.BT_angle, al mov ax, _boss_phase_frame mov bx, 32 cwd idiv bx or dx, dx jnz short loc_1F137 mov al, angle_2D084 add angle_2D085, al cmp byte_2D083, 0 jnz short loc_1F122 inc angle_2D084 cmp angle_2D084, 10h jb short loc_1F137 inc byte_2D083 jmp short loc_1F137 ; --------------------------------------------------------------------------- loc_1F122: dec angle_2D084 cmp angle_2D084, 0 jnz short loc_1F137 mov ax, _player_pos.cur.x mov word_22872, ax mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1F137: mov al, 0 pop bp retn sub_1EFED endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1F13B proc near push bp mov bp, sp mov ax, _boss_phase_frame add ax, -64 call gather_add_only_3stack pascal, ax, large (6 shl 16) or 7 cmp _boss_phase_frame, 64 jnz short loc_1F182 mov _boss_sprite, 181 call snd_se_play pascal, 8 mov _bullet_template.patnum, PAT_BULLET16_V_BLUE mov _bullet_template.pattern, BP_SPREAD call randring2_next16 mov _bullet_template.BT_angle, al mov word ptr _bullet_template.spread, (21 shl 8) or 5 mov angle_2D085, 0 mov _boss_pos.velocity.x, 0 loc_1F182: cmp _boss_phase_frame, 128 jl loc_1F218 mov ax, _boss_phase_frame mov bx, 2 cwd idiv bx or dx, dx jnz short loc_1F1D4 mov ax, 3400 sub ax, _boss_hp cwde shl eax, 6 mov ebx, 3400 xor edx, edx div ebx add al, (2 shl 4) + 8 mov _bullet_template.speed, al call sub_15A5C mov al, _bullet_template.BT_angle add al, 80h mov _bullet_template.BT_angle, al call sub_15A5C mov al, _bullet_template.BT_angle add al, 87h mov _bullet_template.BT_angle, al call snd_se_play pascal, 9 loc_1F1D4: push (192 shl 4) push _boss_pos.velocity.x mov al, angle_2D085 mov ah, 0 add ax, ax mov bx, ax push _SinTable8[bx] call vector1_at mov _boss_pos.cur.x, ax mov al, angle_2D085 add al, 2 mov angle_2D085, al mov ax, 0D48h sub ax, _boss_hp cwde shl eax, 6 shl eax, 4 mov ebx, 0D48h xor edx, edx div ebx mov _boss_pos.velocity.x, ax loc_1F218: pop bp retn sub_1F13B endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1F21A proc far push bp mov bp, sp cmp _bombing, 0 jz short loc_1F229 mov byte_2CE56, 27h ; ''' loc_1F229: cmp byte_2CE56, 0 jnz short loc_1F237 call sub_1FADD mov ah, 0 pop bp retf ; --------------------------------------------------------------------------- loc_1F237: xor ax, ax pop bp retf sub_1F21A endp include th05/main/boss/bx.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public EXALICE_UPDATE exalice_update proc far push bp mov bp, sp push si cmp byte_2CE56, 0 jz short loc_1F298 dec byte_2CE56 loc_1F298: mov eax, _boss_pos.cur mov _homing_target, eax mov _bullet_template.BT_origin, eax mov _gather_template.GT_center, eax mov _laser_template.coords.origin, eax mov curvebullet_template.pos.cur, eax inc _boss_phase_frame mov al, _boss_phase mov ah, 0 mov bx, ax cmp bx, 11h ja loc_1F660 add bx, bx jmp cs:off_1F689[bx] loc_1F2C9: cmp _boss_phase_frame, 1 jnz short loc_1F333 mov _boss_hp, 26500 mov _boss_phase_end_hp, 23800 mov _gather_template.GT_radius, (128 shl 4) mov _gather_template.GT_angle_delta, 2 mov _gather_template.GT_ring_points, 8 mov _boss_sprite, 180 mov _boss_sprite_left, 186 mov _boss_sprite_right, 184 mov _boss_sprite_stay, 180 mov byte_2CE56, 0 mov _boss_flystep_random_clamp.A_left, (BOSS_W shl 4) mov _boss_flystep_random_clamp.A_right, ((PLAYFIELD_W - BOSS_W) shl 4) mov _boss_flystep_random_clamp.A_top, (48 shl 4) mov _boss_flystep_random_clamp.A_bottom, (96 shl 4) mov si, 204 jmp short loc_1F32D ; --------------------------------------------------------------------------- loc_1F326: call super_convert_tiny pascal, si inc si loc_1F32D: cmp si, 220 jl short loc_1F326 loc_1F333: call sub_1FB07 cmp _boss_phase_frame, 192 jl loc_1F666 mov _boss_phase_frame, 0 inc _boss_phase call snd_se_play pascal, 13 mov Palettes, 0 mov Palettes+1, 0 mov Palettes+2, 0 mov _palette_changed, 1 mov patnum_2CE64, 196 mov fp_23F5A, offset exalice_bg_render jmp loc_1F666 ; --------------------------------------------------------------------------- loc_1F374: call sub_1FB07 cmp _boss_phase_frame, 64 jl loc_1F666 inc _boss_phase mov _boss_mode, 1 mov _boss_mode_change, 0 mov _boss_phase_frame, 0 mov _boss_custombullets_render, offset exalice_custombullets_render mov angle_2D085, 0 mov fp_2CE66, offset sub_1E922 mov byte_2D07F, 0 jmp loc_1F666 ; --------------------------------------------------------------------------- loc_1F3AD: mov al, _boss_mode mov ah, 0 or ax, ax jz short loc_1F3BD cmp ax, 1 jz short loc_1F400 jmp short loc_1F403 ; --------------------------------------------------------------------------- loc_1F3BD: mov ax, _boss_phase_frame add ax, -32 call boss_flystep_random pascal, ax or al, al jz short loc_1F403 mov _boss_phase_frame, 0 inc _boss_mode_change inc _boss_mode mov al, byte_2D07F mov ah, 0 shl ax, 2 mov dl, _boss_mode_change mov dh, 0 and dx, 1 add dx, dx add ax, dx mov bx, ax mov ax, off_22874[bx] mov fp_2CE66, ax cmp _boss_mode_change, 32 jb short loc_1F403 jmp short loc_1F412 ; --------------------------------------------------------------------------- loc_1F400: call sub_1E8DA loc_1F403: call sub_1F21A or ax, ax jz loc_1F666 push 14h call sub_17416 loc_1F412: mov al, byte_2D07F mov ah, 0 mov bx, ax cmp bx, 3 ja loc_1F666 add bx, bx jmp cs:off_1F681[bx] loc_1F427: call exalice_phase_end pascal, large (0 shl 16) or 21000 mov fp_2CE66, offset sub_1EA14 jmp loc_1F666 ; --------------------------------------------------------------------------- loc_1F439: call exalice_phase_end pascal, (ET_NW_SE shl 16) or 15100 mov fp_2CE66, offset sub_1EC6C jmp loc_1F666 ; --------------------------------------------------------------------------- loc_1F44B: call exalice_phase_end pascal, (ET_SW_NE shl 16) or 9600 mov fp_2CE66, offset sub_1EE2F jmp loc_1F666 ; --------------------------------------------------------------------------- loc_1F45D: call exalice_phase_end pascal, (ET_HORIZONTAL shl 16) or 3400 mov fp_2CE66, offset sub_1EFED jmp loc_1F666 ; --------------------------------------------------------------------------- loc_1F46F: cmp Palettes, 60h jnb short loc_1F483 mov al, Palettes add al, 2 mov Palettes, al mov _palette_changed, 1 loc_1F483: push (((PLAYFIELD_W / 2) shl 4) shl 16) or (64 shl 4) call boss_flystep_towards or al, al jz short loc_1F49F mov _boss_phase_frame, 0 inc _boss_phase mov _boss_mode, 1 loc_1F49F: call sub_1F21A jmp loc_1F666 ; --------------------------------------------------------------------------- loc_1F4A6: cmp Palettes, 60h jnb short loc_1F4BA mov al, Palettes add al, 2 mov Palettes, al mov _palette_changed, 1 loc_1F4BA: call sub_1E8DA cmp _boss_phase_frame, 4000 jg short loc_1F4D4 loc_1F4C5: call sub_1F21A or ax, ax jz loc_1F666 push 14h call sub_17416 loc_1F4D4: mov al, byte_2D07F mov ah, 0 mov bx, ax cmp bx, 3 ja short loc_1F523 add bx, bx jmp cs:off_1F679[bx] loc_1F4E7: call exalice_phase_end pascal, (ET_NW_SE shl 16) or 18100 mov fp_2CE66, offset sub_1EB52 jmp short loc_1F523 ; --------------------------------------------------------------------------- loc_1F4F8: call exalice_phase_end pascal, (ET_SW_NE shl 16) or 12600 mov fp_2CE66, offset sub_1ECD4 jmp short loc_1F523 ; --------------------------------------------------------------------------- loc_1F509: call exalice_phase_end pascal, (ET_HORIZONTAL shl 16) or 6800 mov fp_2CE66, offset sub_1EEF1 jmp short loc_1F523 ; --------------------------------------------------------------------------- loc_1F51A: call exalice_phase_end pascal, (ET_VERTICAL shl 16) or 0 loc_1F523: mov _pellet_bottom_col, GC_RG mov patnum_2CE64, 200 inc byte_2D07F jmp loc_1F666 ; --------------------------------------------------------------------------- loc_1F536: cmp Palettes+2, 60h jnb short loc_1F552 mov al, Palettes+2 add al, 2 mov Palettes+2, al mov al, Palettes add al, 0FEh mov Palettes, al mov _palette_changed, 1 loc_1F552: cmp _boss_phase, 5 jnz loc_1F3AD jmp loc_1F483 ; --------------------------------------------------------------------------- loc_1F55E: cmp Palettes, 30h ; '0' jnb short loc_1F572 inc Palettes dec Palettes+2 mov _palette_changed, 1 loc_1F572: cmp _boss_phase, 9 jnz loc_1F3AD jmp loc_1F483 ; --------------------------------------------------------------------------- loc_1F57E: cmp Palettes+1, 40h jnb short loc_1F5A4 cmp Palettes, 0 jbe short loc_1F590 dec Palettes loc_1F590: inc Palettes+1 cmp Palettes+2, 0 jbe short loc_1F59F dec Palettes+2 loc_1F59F: mov _palette_changed, 1 loc_1F5A4: cmp _boss_phase, 0Dh jnz loc_1F3AD jmp loc_1F483 ; --------------------------------------------------------------------------- loc_1F5B0: call sub_1E8DA or al, al jz loc_1F4C5 inc _boss_mode_change cmp _boss_mode_change, 8 jbe loc_1F4C5 jmp loc_1F4D4 ; --------------------------------------------------------------------------- loc_1F5C9: cmp byte_2D080, 0 jnz short loc_1F5DD cmp Palettes+1, 0 jbe short loc_1F621 dec Palettes+1 jmp short loc_1F626 ; --------------------------------------------------------------------------- loc_1F5DD: cmp byte_2D080, 1 jnz short loc_1F606 mov al, Palettes add al, 2 mov Palettes, al inc Palettes+1 mov al, Palettes+2 add al, 2 mov Palettes+2, al cmp Palettes, 80h jb short loc_1F626 mov byte_2D080, 2 jmp short loc_1F626 ; --------------------------------------------------------------------------- loc_1F606: mov al, Palettes add al, 0FEh mov Palettes, al dec Palettes+1 mov al, Palettes+2 add al, 0FEh mov Palettes+2, al cmp Palettes, 0 jnz short loc_1F626 loc_1F621: mov byte_2D080, 1 loc_1F626: mov _palette_changed, 1 call sub_1F13B cmp _boss_phase_frame, 5000 jg short loc_1F643 call sub_1F21A or ax, ax jz short loc_1F666 mov _boss_mode_change, 1 loc_1F643: call boss_explode_small pascal, ET_VERTICAL mov _boss_phase_frame, 0 mov _boss_phase, PHASE_BOSS_EXPLODE_SMALL mov _boss_custombullets_render, offset nullfunc_near mov _bullet_clear_drop_point_items, 0 jmp short loc_1F666 ; --------------------------------------------------------------------------- loc_1F660: push 0C8h call boss_death_sequence_function loc_1F666: call curvebullets_update call firewaves_update push _boss_hp push 6784h call sub_17354 pop si pop bp retf exalice_update endp ; --------------------------------------------------------------------------- off_1F679 dw offset loc_1F4E7 dw offset loc_1F4F8 dw offset loc_1F509 dw offset loc_1F51A off_1F681 dw offset loc_1F427 dw offset loc_1F439 dw offset loc_1F44B dw offset loc_1F45D off_1F689 dw offset loc_1F2C9 dw offset loc_1F374 dw offset loc_1F3AD dw offset loc_1F46F dw offset loc_1F4A6 dw offset loc_1F536 dw offset loc_1F536 dw offset loc_1F483 dw offset loc_1F4BA dw offset loc_1F55E dw offset loc_1F55E dw offset loc_1F483 dw offset loc_1F4BA dw offset loc_1F57E dw offset loc_1F57E dw offset loc_1F483 dw offset loc_1F5B0 dw offset loc_1F5C9 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1F6AD proc near push bp mov bp, sp cmp _midboss_phase_frame, 1 jnz short loc_1F6DC cmp angle_2D085, 0 jz short loc_1F6C5 cmp angle_2D085, 3 jnz short loc_1F6CD loc_1F6C5: mov _midboss_pos.velocity.x, (-2 shl 4) jmp short loc_1F6D3 ; --------------------------------------------------------------------------- loc_1F6CD: mov _midboss_pos.velocity.x, (2 shl 4) loc_1F6D3: inc angle_2D085 and angle_2D085, 3 loc_1F6DC: push offset _midboss_pos call _motion_update_2 cmp _midboss_phase_frame, 32 jl short loc_1F6ED mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1F6ED: mov al, 0 pop bp retn sub_1F6AD endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1F6F1 proc near push bp mov bp, sp cmp _midboss_phase_frame, 32 jge short loc_1F744 mov ax, _midboss_phase_frame add ax, -16 call gather_add_only_3stack pascal, ax, large (3 shl 16) or 2 cmp _midboss_phase_frame, 16 jnz short loc_1F719 call snd_se_play pascal, 8 loc_1F719: cmp _midboss_phase_frame, 20 jz short loc_1F72E cmp _midboss_phase_frame, 24 jz short loc_1F72E cmp _midboss_phase_frame, 28 jnz short loc_1F732 loc_1F72E: inc _midboss_sprite loc_1F732: call player_angle_from pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, 0 mov _bullet_template.BT_angle, al pop bp retn ; --------------------------------------------------------------------------- loc_1F744: cmp _midboss_sprite, 219 jnb short loc_1F75C mov ax, _midboss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1F75C inc _midboss_sprite loc_1F75C: call fp_2CE68 or al, al jz short loc_1F774 mov _midboss_phase_frame, 0 mov angle_2D084, 0 mov _midboss_sprite, 212 loc_1F774: pop bp retn sub_1F6F1 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1F776 proc near push bp mov bp, sp mov ax, _midboss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1F7AA mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN 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 _bullet_template.spread, (7 shl 8) or 13 call sub_15A5C call snd_se_play pascal, 3 loc_1F7AA: cmp _midboss_phase_frame, 96 jl short loc_1F7B6 mov ax, 1 jmp short loc_1F7B8 ; --------------------------------------------------------------------------- loc_1F7B6: xor ax, ax loc_1F7B8: pop bp retn sub_1F776 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1F7BA proc near push bp mov bp, sp mov ax, _midboss_phase_frame mov bx, 4 cwd idiv bx or dx, dx jnz short loc_1F813 mov _bullet_template.spawn_type, BST_SLOWDOWN mov _bullet_template.patnum, PAT_BULLET16_D_GREEN mov _bullet_template.speed, (2 shl 4) mov _bullet_template.pattern, BP_RING mov _bullet_template.spread, 16 call randring2_next16_mod pascal, (64 shl 4) sub ax, (32 shl 4) 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 _bullet_template.BT_angle, al call sub_15A5C call snd_se_play pascal, 3 loc_1F813: cmp _midboss_phase_frame, 96 jl short loc_1F81F mov ax, 1 jmp short loc_1F821 ; --------------------------------------------------------------------------- loc_1F81F: xor ax, ax loc_1F821: pop bp retn sub_1F7BA endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1F823 proc near push bp mov bp, sp cmp _midboss_phase_frame, 32 jnz short loc_1F86B mov _bullet_template.spawn_type, BST_CLOUD_FORWARDS or BST_SLOWDOWN mov _bullet_template.patnum, 0 mov _bullet_template.pattern, BP_SPREAD_STACK_AIMED 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 _bullet_template.stack_speed_delta, 4 mov _bullet_template.spread, 32 call sub_15A5C call snd_se_play pascal, 15 loc_1F86B: cmp _midboss_phase_frame, 64 jl short loc_1F877 mov ax, 1 jmp short loc_1F879 ; --------------------------------------------------------------------------- loc_1F877: xor ax, ax loc_1F879: pop bp retn sub_1F823 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MIDBOSS5_UPDATE midboss5_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur mov _bullet_template.BT_origin, eax mov _gather_template.GT_center, eax inc _midboss_phase_frame mov al, _midboss_phase mov ah, 0 or ax, ax jz short loc_1F89F cmp ax, 1 jz short loc_1F8E7 jmp loc_1F992 ; --------------------------------------------------------------------------- loc_1F89F: push offset _midboss_pos call _motion_update_2 call sub_1FA9D pascal, (24 shl 4) or ((24 shl 4) shl 16), 10 cmp _midboss_phase_frame, 192 jl loc_1F9A1 inc _midboss_phase mov _midboss_phase_frame, 0 mov _midboss_angle, 0 mov angle_2D085, 0 mov angle_2D084, 1 mov byte_2D083, 0 mov _midboss_pos.velocity.y, 0 mov fp_2CE68, offset sub_1F776 jmp loc_1F9A1 ; --------------------------------------------------------------------------- loc_1F8E7: mov eax, _midboss_pos.cur mov _midboss_pos.prev, eax mov al, angle_2D084 mov ah, 0 or ax, ax jz short loc_1F8FF cmp ax, 1 jz short loc_1F933 jmp short loc_1F936 ; --------------------------------------------------------------------------- loc_1F8FF: call sub_1F6AD or al, al jz short loc_1F936 mov _midboss_phase_frame, 0 inc byte_2D083 mov al, byte_2D083 mov ah, 0 mov bx, 3 cwd idiv bx add dx, dx mov bx, dx mov ax, off_22884[bx] mov fp_2CE68, ax inc angle_2D084 cmp byte_2D083, 10h jb short loc_1F936 jmp short loc_1F968 ; --------------------------------------------------------------------------- loc_1F933: call sub_1F6F1 loc_1F936: call sub_1FA9D pascal, (24 shl 4) or ((24 shl 4) shl 16), 4 mov _midboss_damage_this_frame, al mov ah, 0 sub _midboss_hp, ax cmp _midboss_hp, 0 jg short loc_1F9A1 mov _bullet_clear_trigger, 1 push 1Eh call sub_173AC call items_add pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, IT_1UP loc_1F968: mov _midboss_phase, PHASE_EXPLODE_BIG mov _midboss_sprite, 4 mov _midboss_phase_frame, 0 call sparks_add_circle pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, large (((8 shl 4) shl 16) or 48) call snd_se_play pascal, 12 jmp short loc_1F9A1 ; --------------------------------------------------------------------------- loc_1F992: call sub_17486 push _midboss_hp push 1550 call sub_17354 pop bp retf ; --------------------------------------------------------------------------- loc_1F9A1: push _midboss_hp push 1550 call sub_17354 mov ax, _midboss_pos.cur.x mov _homing_target.x, ax mov ax, _midboss_pos.cur.y mov _homing_target.y, ax pop bp retf midboss5_update endp ; --------------------------------------------------------------------------- db 0 include th05/main/pointnum/digits.asm include th05/main/hud/number_put.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1FA5E proc near @@se = word ptr 4 @@radius_y = word ptr 6 @@radius_x = word ptr 8 push bp mov bp, sp push si mov byte_2297E, 1 mov ax, [bp+@@radius_x] mov _shot_hitbox_radius.x, ax mov ax, [bp+@@radius_y] mov _shot_hitbox_radius.y, ax mov eax, _boss_pos.cur mov _shot_hitbox_center, eax call sub_126B3 mov si, ax or si, si jz short loc_1FA8E call snd_se_play pascal, [bp+@@se] loc_1FA8E: mov byte_2297E, 0 call sub_1FD62 mov ax, si pop si pop bp retn 6 sub_1FA5E endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1FA9D proc near @@se = word ptr 4 @@radius_y = word ptr 6 @@radius_x = word ptr 8 push bp mov bp, sp push si mov byte_2297E, 1 mov ax, [bp+@@radius_x] mov _shot_hitbox_radius.x, ax mov ax, [bp+@@radius_y] mov _shot_hitbox_radius.y, ax mov ax, _midboss_pos.cur.x mov _shot_hitbox_center.x, ax mov ax, _midboss_pos.cur.y mov _shot_hitbox_center.y, ax call sub_126B3 mov si, ax or si, si jz short loc_1FAD1 call snd_se_play pascal, [bp+@@se] loc_1FAD1: mov byte_2297E, 0 mov ax, si pop si pop bp retn 6 sub_1FA9D endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1FADD proc near push bp mov bp, sp call sub_1FA5E pascal, _boss_hitbox_radius.x, _boss_hitbox_radius.y, 4 mov _boss_damage_this_frame, al mov ah, 0 sub _boss_hp, ax mov ax, _boss_hp cmp ax, _boss_phase_end_hp jg short loc_1FB03 mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_1FB03: mov al, 0 pop bp retn sub_1FADD endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1FB07 proc near push bp mov bp, sp call sub_1FA5E pascal, _boss_hitbox_radius.x, _boss_hitbox_radius.y, 10 pop bp retn sub_1FB07 endp include th04/main/boss/end.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame boss_death_sequence_function proc near n1000 = word ptr 4 push bp mov bp, sp push si cmp _boss_phase, PHASE_BOSS_EXPLODE_SMALL jnz short loc_1FC23 cmp _boss_phase_frame, 1 jnz short loc_1FBE1 mov _boss_damage_this_frame, 0;m_bHitThisFrame? call boss_explode_small pascal, 0 call snd_se_play pascal, 13 loc_1FBE1: cmp _boss_phase_frame, 16 jnz short loc_1FBED call boss_explode_small pascal, ET_VERTICAL loc_1FBED: cmp _boss_phase_frame, 32 jnz loc_1FD51 call boss_explode_big inc _boss_phase mov al, _boss_mode_change mov _bullet_clear_trigger, al cmp _boss_mode_change, 0;m_bSuccessDefeat jz short loc_1FC10 push [bp+n1000] call sub_17416 loc_1FC10: mov _boss_sprite, 4 mov _boss_phase_frame, 0 mov _player_invincibility_time, BOSS_DEFEAT_INVINCIBILITY_FRAMES jmp loc_1FD51 ; --------------------------------------------------------------------------- loc_1FC23: cmp _boss_phase, PHASE_BOSS_EXPLODE_BIG jnz short loc_1FC95 cmp _boss_phase_frame, 12 jge short loc_1FC55 cmp _stage_frame_mod2, 0 jnz short loc_1FC3D mov ax, 0FFFCh jmp short loc_1FC40 ; --------------------------------------------------------------------------- loc_1FC3D: mov ax, 4 loc_1FC40: mov word_2CE02, ax cmp _stage_frame_mod4, 1 ja short loc_1FC4F mov ax, 0FFFCh jmp short loc_1FC52 ; --------------------------------------------------------------------------- loc_1FC4F: mov ax, 4 loc_1FC52: mov word_2CE04, ax loc_1FC55: mov fp_23F5A, offset tiles_render_all mov word_25FE6, 2 mov ax, _boss_phase_frame mov bx, 8 cwd idiv bx or dx, dx jnz loc_1FD5D inc _boss_sprite cmp _boss_sprite, 12 jb loc_1FD5D inc _boss_phase mov _boss_phase_frame, 0 mov _bombing_disabled, 1 mov _boss_fg_render, offset nullfunc_near jmp loc_1FD5D ; --------------------------------------------------------------------------- loc_1FC95: mov PaletteTone, 60 mov _palette_changed, 1 cmp _boss_phase_frame, 1 jnz short loc_1FCD6 les bx, _resident assume es:nothing mov ax, _stage_graze add es:[bx+resident_t.graze], ax cmp _stage_id, 5 jz short loc_1FCD1 call sub_F2B4 cmp _stage_id, 6 jz short loc_1FCCB call sub_16510 jmp loc_1FD51 ; --------------------------------------------------------------------------- loc_1FCCB: call sub_1673E jmp loc_1FD51 ; --------------------------------------------------------------------------- loc_1FCD1: call sub_1673E jmp short loc_1FD51 ; --------------------------------------------------------------------------- loc_1FCD6: cmp _boss_phase_frame, 416;stuck at frame 416 until all score has been added jnz short loc_1FD35 call score_delta_commit cmp _stage_id, 6 jnb short loc_1FD0B xor si, si jmp short loc_1FD06 ; --------------------------------------------------------------------------- loc_1FCEE: mov al, _score_lebcd[si] mov dl, _stage_id mov dh, 0 shl dx, 3 les bx, _resident add bx, dx mov es:[bx+si+resident_t.stage_score], al inc si loc_1FD06: cmp si, SCORE_DIGITS jl short loc_1FCEE loc_1FD0B: cmp _stage_id, 5 jnz short loc_1FD19 call end_game jmp short loc_1FD25 ; --------------------------------------------------------------------------- loc_1FD19: cmp _stage_id, 6 jnz short loc_1FD25 call end_extra loc_1FD25: mov _overlay_text, offset sub_119B1 kajacall KAJA_SONG_FADE, 10 jmp short loc_1FD51 ; --------------------------------------------------------------------------- loc_1FD35: cmp _boss_phase_frame, 488 jnz short loc_1FD51 les bx, _resident inc es:[bx+resident_t.stage] mov byte_25FE8, 2 push 1 call frame_delay loc_1FD51: mov _homing_target.x, SUBPIXEL_NONE mov _homing_target.y, SUBPIXEL_NONE loc_1FD5D: pop si pop bp retn 2 boss_death_sequence_function endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_1FD62 proc near push bp mov bp, sp mov ax, _boss_pos.cur.x mov dx, _boss_pos.cur.y sub ax, _player_pos.cur.x sub dx, _player_pos.cur.y add dx, 16 * 16 cmp dx, 32 * 16 ja short loc_1FD8B add ax, 16 * 16 cmp ax, 32 * 16 ja short loc_1FD8B mov _player_is_hit, 1 loc_1FD8B: pop bp retn sub_1FD62 endp main_035_TEXT ends .data byte_20A70 db 0 byte_20A71 db 0 dd aVersion1_01 ; "version 1.01" include th04/strings/pause[data].asm db 0 off_20A80 dd aEye_cdg ; "eye.cdg" word_20A84 dw 0 off_20A86 dd aSt00 ; "ST00" bbname dd aBb0_cdg_0 ; ZUN symbol [MAGNet2010] aVersion1_01 db 'version 1.01',0 aEye_cdg db 'eye.cdg',0 aKAIKIDAN2_DAT db '怪綺談2.dat',0 aMiko db 'miko',0 ; char arg0[] arg0 db 'op',0 aSt00 db 'ST00',0 aEye_rgb db 'eye.rgb',0 aReimu_bft db 'reimu.bft',0 aMari_bft db 'mari.bft',0 aMima_bft db 'mima.bft',0 aYuka_bft db 'yuka.bft',0 aMikod_bft db 'mikod.bft',0 aMiko32_bft db 'miko32.bft',0 aReimu16_bft db 'reimu16.bft',0 aMari16_bft db 'mari16.bft',0 aMima16_bft db 'mima16.bft',0 aYuka16_bft db 'yuka16.bft',0 aMiko16_bft db 'miko16.bft',0 aBomb3_bft db 'bomb3.bft',0 aBomb0_bft db 'bomb0.bft',0 aBss0_cd2 db 'BSS0.CD2',0 aSt00_bft db 'st00.bft',0 aSt00_mpn db 'st00.mpn',0 aBss1_cd2 db 'BSS1.CD2',0 aSt01_bft db 'st01.bft',0 aSt01_mpn db 'st01.mpn',0 aBss2_cd2 db 'BSS2.CD2',0 aSt02_bft db 'st02.bft',0 aSt02_mpn db 'st02.mpn',0 aBss3_cd2 db 'BSS3.CD2',0 aSt03_bft db 'st03.bft',0 aSt03_mpn db 'st03.mpn',0 aBss4_cd2 db 'BSS4.CD2',0 aSt04_bft db 'st04.bft',0 aSt04_mpn db 'st04.mpn',0 aBss4_cd2_0 db 'BSS4.CD2',0 aSt04_bft_0 db 'st04.bft',0 aBss6_cd2 db 'BSS6.CD2',0 aSt06_bft db 'st06.bft',0 aSt06_mpn db 'st06.mpn',0 include th04/main/pause[data].asm aDemo0_rec db 'DEMO0.REC',0 aOp_1 db 'op',0 aKaikiems db 'KAIKIEMS',0 aBb0_cdg_0 db 'BB0.CDG',0 aKao0_cd2 db 'KAO0.cd2',0 aKao1_cd2 db 'KAO1.cd2',0 aKao2_cd2 db 'KAO2.cd2',0 aKao3_cd2 db 'KAO3.cd2',0 db 0 include libs/master.lib/atan8[data].asm include libs/master.lib/atrtcmod[data].asm include libs/master.lib/bfnt_id[data].asm include libs/master.lib/clip[data].asm include libs/master.lib/edges[data].asm include libs/master.lib/fil[data].asm include libs/master.lib/dos_ropen[data].asm include libs/master.lib/get_machine_98[data].asm include libs/master.lib/get_machine_at[data].asm include libs/master.lib/grp[data].asm include libs/master.lib/js[data].asm include libs/master.lib/machine[data].asm include libs/master.lib/pal[data].asm include libs/master.lib/pf[data].asm include libs/master.lib/rand[data].asm include libs/master.lib/sin8[data].asm include libs/master.lib/tx[data].asm include libs/master.lib/vs[data].asm include libs/master.lib/wordmask[data].asm include libs/master.lib/mem[data].asm include libs/master.lib/super_entry_bfnt[data].asm include libs/master.lib/superpa[data].asm include libs/master.lib/bgm_timerhook[data].asm include libs/master.lib/bgm[data].asm include th04/snd/se_priority[data].asm include th03/snd/se_state[data].asm include th05/mem[data].asm include th05/snd/load[data].asm include th04/snd/snd[data].asm include th05/hardware/vram_planes[data].asm include th03/formats/cdg[data].asm include th04/formats/cfg_lres[data].asm db 0 aSt00_map db 'st00.map',0 evendata include th04/main/tile_section[data].asm include th04/formats/std[data].asm off_2129C dw offset sub_15A5C dw offset sub_15A8E dw offset sub_15A70 include th02/sprites/pellet.asp include th04/sprites/pelletbt.asp include th02/sprites/sparks.asp byte_21762 db 0 db 0 include th04/sprites/pointnum.asp include th05/formats/bb_playchar[data].asm byte_21D6C db 0 db 0 word_21D6E dw 0FFh byte_21D70 db 0 db 0 word_21D72 dw 0 byte_21D74 db 0 byte_21D75 db 0 byte_21D76 db 0 db 0 db 18h db 3Ch ; < db 7Eh ; ~ db 0BDh db 0FFh include th05/formats/bb_curvebullet[data].asm ; char aMaine[] aMaine db 'maine',0 ; char aMaine_0[] aMaine_0 db 'maine',0 include th04/main/player/shot_levels[data].asm include th05/formats/bb_txt_load[data].asm include th04/main/player/shot_velocity[data].asm aGENSOU_SCR db 'GENSOU.SCR',0 gCONTINUE db 0ACh, 0B8h, 0B7h, 0BDh, 0B2h, 0B7h, 0BEh, 0AEh, 0 byte_221C0 db 0 db 0 _enemies_gone dw 0 _enemies_killed dw 0 include th04/main/frames[data].asm off_221D0 dd a_dm00_tx2 ; "_DM00.TX2" include th04/formats/dialog[data].asm byte_221EC db 0 a_dm00_tx2 db '_DM00.TX2',0 public _dialog_kanji_buf _dialog_kanji_buf db ' ',0 aSt06_bb1 db 'st06.bb1',0 aSt06_bb2 db 'st06.bb2',0 aSt06b db 'st06b',0 aDemo5_rec db 'DEMO5.REC',0 ; char aOp_0[] aOp_0 db 'op',0 aBss0_cd2_0 db 'BsS0.cD2',0 aKao0_cd2_0 db 'KaO0.cD2',0 aBb0_cdg db 'bb0.cdg',0 aBb1_cdg db 'bb1.cdg',0 aBb2_cdg db 'bb2.cdg',0 aBb3_cdg db 'bb3.cdg',0 aSt06_16_bft db 'st06_16.bft',0 aBomb3_bft_0 db 'bomb3.bft',0 aBomb0_bft_0 db 'bomb0.bft',0 db 0 include th04/main/boss/explosions_big[data].asm byte_22274 db 0 byte_22275 db 0 public _STAGE_CLEAR_BONUS_DESC _STAGE_CLEAR_BONUS_DESC label word dw offset aBOSS_FINAL_TIMEOUT dw offset aPENALTY_6 dw offset aPENALTY_5 dw offset aPENALTY_4 dw offset aPENALTY_CONT_1 dw offset aPENALTY_CONT_2 dw offset aPENALTY_CONT_3 dw offset aBONUS_EASY dw offset aBONUS_NORMAL dw offset aBONUS_HARD dw offset aBONUS_LUNATIC BONUS_STAGE dw offset aBONUS_STAGE BONUS_DREAM dw offset aBONUS_DREAM GRAZEX50 dw offset aGRAZEX50 POINT_ITEMS dw offset aPOINT_ITEMS BONUS_NOMISS dw offset aBONUS_NOMISS BONUS_NOBOMB dw offset aBONUS_NOBOMB BONUS_TOTAL dw offset aBONUS_TOTAL ALL_CLEAR dw offset aALL_CLEAR PLAYER_REM dw offset aPLAYER_REM POINT_TOTAL dw offset aPOINT_TOTAL gpCLEAR_BONUS db 4Dh, 4Eh, 4Fh, 2, 58h, 59h, 5Ah, 5Bh, 0 gpCONGRATULATION db 5Ch, 5Dh, 5Eh, 5Fh, 60h, 61h, 62h, 63h, 64h, 0 aBOSS_FINAL_TIMEOUT db '悪霊ボス退治失敗!!       × 0.0',0 aPENALTY_6 db 'プレイヤー数ペナルティ(初期6人)× 0.3',0 aPENALTY_5 db 'プレイヤー数ペナルティ(初期5人)× 0.5',0 aPENALTY_4 db 'プレイヤー数ペナルティ(初期4人)× 0.7',0 aPENALTY_CONT_1 db 'コンティニューペナルティ(1回) × 0.8',0 aPENALTY_CONT_2 db 'コンティニューペナルティ(2回) × 0.6',0 aPENALTY_CONT_3 db 'コンティニューペナルティ(3回) × 0.4',0 aBONUS_EASY db '難易度ボーナス(Easy)    × 0.5',0 aBONUS_NORMAL db '難易度ボーナス(Normal)  × 1.0',0 aBONUS_HARD db '難易度ボーナス(Hard)    × 1.2',0 aBONUS_LUNATIC db '難易度ボーナス(Lunatic) × 1.4',0 aBONUS_STAGE db 'STAGE Bonus',0 aBONUS_DREAM db 'DREAM Bonus',0 aGRAZEX50 db 'カスリ弾数 ×  50',0 aPOINT_ITEMS db ' × 得点アイテム数 ',0 aBONUS_NOMISS db ' + ノーミスボーナス',0 aBONUS_NOBOMB db ' + ノーボムボーナス',0 aBONUS_TOTAL db '   TOTAL',0 aALL_CLEAR db 'ALL Clear  ',0 aPLAYER_REM db '残り人数 ×10000',0 aPOINT_TOTAL db '総得点アイテムボーナス',0 include th05/main/boss/move[data].asm include th05/main/item/enemy_drops[data].asm include th04/main/item/items[data].asm word_2268C dw 0 angle_2268E db 0 db 0 include th04/strings/gameover[data].asm asc_226B3 db ' ',0 asc_226B6 db ' ',0 ; char aMaine_1[] aMaine_1 db 'maine',0 db 0 public _bullet_clear_drop_point_items _bullet_clear_drop_point_items db 0 db 0 byte_226C2 db 0 db 0 include th04/score[data].asm include th04/strings/hud[data].asm gsRUIKEI db 0EDh, 0EEh, 0, 0, 0 byte_22720 db 0 include th05/main/hud/dream[data].asm include th04/main/hud/power[data].asm word_22734 dw 202h word_22736 dw 202h word_22738 dw 202h word_2273A dw 202h byte_2273C db 0 include th04/main/hud/hp[data].asm aB@b@bB@b@ db '  ×  ',0 aB@b@bB@b@_0 db '  ×  ',0 off_22758 dw offset sub_1823B dw offset sub_18276 dw offset sub_182B1 off_2275E dw offset sub_182ED dw offset sub_183F5 dw offset sub_1847D dw offset sub_184BC dw offset sub_18526 off_22768 dw offset sub_198B7 dw offset sub_19928 dw offset sub_1999A dw offset sub_19A0F off_22770 dw offset sub_19B9E dw offset sub_19BB8 dw offset sub_19C34 dw offset sub_19BB8 dw offset sub_19C34 dw offset sub_19EDA dw offset sub_19C34 dw offset sub_19E12 dw offset sub_19EDA dw offset sub_19E12 dw offset sub_19EDA dw offset sub_19F75 off_22788 dw offset sub_1A5EB dw offset sub_1A6AB dw offset sub_1A651 dw offset sub_1A719 off_22790 dw offset mai_yuki_1AB76 dw offset sub_1A6AB dw offset sub_1A82F dw offset sub_1A82F dw 0 dw 0 dw 0 dw 0 off_227A0 dw offset mai_yuki_1A8C9 dw offset sub_1A96A dw offset sub_1A921 dw offset mai_yuki_1A9B3 off_227A8 dw offset sub_1A921 dw offset mai_yuki_1AA4C dw offset mai_yuki_1AA03 dw offset mai_yuki_1A8C9 off_227B0 dw offset mai_yuki_1AB1F dw offset mai_yuki_1AA9B dw offset mai_yuki_1AA9B dw offset sub_1A96A a_dm09_tx2 db '_DM09.TX2',0 aTH05_10 db '真紅の少女 〜 Crimson Dead!!',0 a_dm08_tx2 db '_DM08.TX2',0 aTH05_11 db '裏切りの少女 〜 Judas Kiss',0 off_22806 dw offset sub_1B557 dw offset sub_1B628 off_2280A dw offset sub_1B6C4 dw offset sub_1B754 off_2280E dw offset sub_1B832 dw offset sub_1B8C8 dw offset sub_1B8C8 dw offset sub_1B8C8 dw offset sub_1B8C8 off_22818 dw offset sub_1BE96 dw offset sub_1BEF4 dw offset sub_1BF4D off_2281E dw offset sub_1BFDA dw offset sub_1C0E4 off_22822 dw offset sub_1C194 dw offset sub_1C23D off_22826 dw offset sub_1BD2C dw offset sub_1BDD0 off_2282A dw offset sub_1CA42 dw offset sub_1CAD7 dw 0 dw 0 off_22832 dw offset sub_1CCD3 dw offset sub_1CE0D dw 0 dw 0 dw 0 dw 0 dw 0 dw 0 dw 0 dw 0 dw 0 dw 0 off_2284A dw offset sub_1D667 dw offset sub_1D6E1 dw offset sub_1D7DC dw offset sub_1D83A word_22852 dw 0 byte_22854 db 0 db 0 word_22856 dw 0 byte_22858 db 0 byte_22859 db 0 off_2285A dw offset sub_1E5FC off_2285C dw offset sub_1E60E dw offset sub_1E66F dw offset sub_1E6A6 dw offset sub_1E6A6 dw 0 dw 0 byte_22868 db 10h db 70h ; p db 80h db 80h db 90h db 0F0h db 0 db 0 word_22870 dw 0 word_22872 dw (192 shl 4) off_22874 dw offset sub_1E922 dw offset sub_1E978 dw offset sub_1EB52 dw offset sub_1EC01 dw offset sub_1ECD4 dw offset sub_1EDC1 dw offset sub_1EEF1 dw offset sub_1EF80 off_22884 dw offset sub_1F776 dw offset sub_1F7BA dw offset sub_1F823 byte_2288A db 0 public _popup_frame, _popup_boss_bgm_frame _popup_boss_bgm_frame db 0 _popup_frame db 0 db 0 include th04/formats/bb_txt[data].asm include th04/main/hud/popup[data].asm public _PLAYFIELD_BLANK_ROW _PLAYFIELD_BLANK_ROW dd aPLAYFIELD_BLANK_ROW include th04/strings/demoplay[data].asm aPLAYFIELD_BLANK_ROW db ' ',0 db 0 _SHOT_FUNCS label word ; Reimu dw shot_l0 dw shot_l1 dw shot_reimu_l2 dw shot_reimu_l3 dw shot_reimu_l4 dw shot_reimu_l5 dw shot_reimu_l6 dw shot_reimu_l7 dw shot_reimu_l8 dw shot_reimu_l9 ; Marisa dw shot_l0 dw shot_l1 dw shot_marisa_l2 dw shot_marisa_l3 dw shot_marisa_l4 dw shot_marisa_l5 dw shot_marisa_l6 dw shot_marisa_l7 dw shot_marisa_l8 dw shot_marisa_l9 ; Mima dw shot_l0 dw shot_l1 dw shot_mima_l2 dw shot_mima_l3 dw shot_mima_l4 dw shot_mima_l5 dw shot_mima_l6 dw shot_mima_l7 dw shot_mima_l8 dw shot_mima_l9 ; Yuuka dw shot_l0 dw shot_l1 dw shot_yuuka_l2 dw shot_yuuka_l3 dw shot_yuuka_l4 dw shot_yuuka_l5 dw shot_yuuka_l6 dw shot_yuuka_l7 dw shot_yuuka_l8 dw shot_yuuka_l9 byte_2297E db 0 db 0 include th02/main/hud/score_put[data].asm include th03/main/5_powers_of_10[data].asm include th04/main/hud/gaiji_row[data].asm extern _BOSS_ITEM_DROPS:byte extern _boss_phase_timed_out:byte .data? db ? db ? fp_2300E dw ? include libs/master.lib/clip[bss].asm include libs/master.lib/fil[bss].asm include libs/master.lib/grcg_circle[bss].asm include libs/master.lib/js[bss].asm include libs/master.lib/pal[bss].asm include libs/master.lib/vs[bss].asm include libs/master.lib/vsync[bss].asm include libs/master.lib/mem[bss].asm include libs/master.lib/superpa[bss].asm include libs/master.lib/super_put_rect[bss].asm include th03/formats/hfliplut[bss].asm include th04/snd/interrupt[bss].asm include libs/master.lib/bgm[bss].asm include th02/snd/load[bss].asm include th04/hardware/input[bss].asm word_23A5A dw ? word_23A5C dw ? include th04/formats/cdg[bss].asm include libs/master.lib/pfint21[bss].asm include th05/formats/cfg_lres[bss].asm public _resident _resident dd ? map_header map_header_t ? byte_23EFC db ? word_23EFD dw ? word_23EFF dw ? word_23F01 dw ? db ? byte_23F04 db ? db ? word_23F06 dw ? include th04/formats/std[bss].asm include th04/main/tiles_invalidate[bss].asm _boss_bg_render dw ? fp_23F58 dw ? fp_23F5A dw ? db 2 dup(?) byte_23F5E db ? db ? ; word_23F60 dw ? include th02/math/randring[bss].asm include th04/main/pointnum/render[bss].asm include th04/main/player/bomb[bss].asm include th04/formats/bb_playchar[bss].asm include th05/main/player/bombanim[bss].asm point_24490 Point point_24494 Point byte_24498 db ? db ? include th04/main/boss/backdrop[bss].asm word_2449C dw ? dw ? include th05/main/boss/render[bss].asm include th05/formats/bb_curvebullet[bss].asm include th05/formats/bb_load[bss].asm _invalidate_left_x_tile dw ? include th04/main/sparks_add[bss].asm include th04/main/drawpoint[bss].asm include th04/formats/scoredat[bss].asm byte_25342 db ? db ? include th04/main/bullet/tune[bss].asm byte_25346 db ? angle_25347 db ? byte_25348 db ? angle_25349 db ? byte_2534A db ? point_2534B Point db ? public _lives, _bombs _lives db ? _bombs db ? include th02/hardware/pages[bss].asm map_seg dw ? include th04/main/tiles[bss].asm include th04/main/frames[bss].asm word_25FE6 dw ? byte_25FE8 db ? include th03/hardware/palette_changed[bss].asm include th04/main/play[bss].asm include th04/main/ems[bss].asm _turbo_mode db ? db ? include th02/main/demo[bss].asm byte_25FF8 db ? db ? include th04/main/bullet/template[bss].asm include th05/main/lasers[bss].asm include th04/main/midboss/vars[bss].asm include th04/main/boss/vars[bss].asm include th05/main/boss/vars2[bss].asm include th04/main/sparks[bss].asm include th04/main/bullet/bullets[bss].asm include th04/main/enemy/enemies[bss].asm include th04/main/gather[bss].asm include th04/main/circles[bss].asm include th04/main/pointnum/pointnum[bss].asm include th04/main/item/items[bss].asm include th05/main/custom[bss].asm include th04/main/player/shots[bss].asm db 72 dup(?) include th05/main/player/hitshots[bss].asm include th04/main/homing_target[bss].asm public _stage_vm, _enemy_cur _stage_vm dd ? _enemy_cur dw ? include th04/main/circles_color[bss].asm fp_2C92E dw ? dword_2C930 dd ? word_2C934 dw ? word_2C936 dw ? word_2C938 dw ? db 2 dup(?) include th04/main/boss/explosions[bss].asm public _bombing_disabled _bombing_disabled db ? evendata include th05/main/boss/sprites[bss].asm byte_2C976 db ? byte_2C977 db ? include th04/main/bullet/clear[bss].asm public _stage_graze _stage_graze dw ? score_2C97C dw ? include th04/main/bullet/pellet_r[bss].asm db 6 dup(?) word_2C986 dw ? word_2C988 dw ? byte_2C98A db ? db ? include th04/main/midboss/funcs[bss].asm byte_2C99C db ? db ? include th05/main/lasers_render[bss].asm include th05/main/bullet/curve[bss].asm include th04/main/item/splashes[bss].asm include th05/main/bullet/pellet_r[bss].asm include th04/main/scroll[bss].asm word_2CE02 dw ? word_2CE04 dw ? word_2CE06 dw ? db 2 dup(?) include th04/main/score[bss].asm db 2 dup(?) fp_2CE24 dw ? sppoint_2CE26 Point fp_2CE2A dw ? fp_2CE2C dw ? word_2CE2E dw ? word_2CE30 dw ? fp_2CE32 dw ? include th05/main/boss/b4_both[bss].asm fp_2CE36 dw ? fp_2CE38 dw ? word_2CE3A dw ? word_2CE3C dw ? word_2CE3E dw ? word_2CE40 dw ? fp_2CE42 dw ? fp_2CE44 dw ? fp_2CE46 dw ? fp_2CE48 dw ? fp_2CE4A dw ? byte_2CE4C db ? db ? include th04/main/stage/funcs[bss].asm point_2CE52 Point byte_2CE56 db ? evendata include th05/main/boss/bx[bss].asm patnum_2CE64 dw ? fp_2CE66 dw ? fp_2CE68 dw ? include th04/main/hud/popup[bss].asm public _stage_title, _stage_bgm_title, _boss_bgm_title _stage_title dd ? _stage_bgm_title dd ? _boss_bgm_title dd ? word_2CE9E dw ? include th04/main/player/pos[bss].asm include th05/main/player/speed[bss].asm include th04/main/player/option[bss].asm public _player_invincibility_time, _power, _shot_level, _shot_time _player_invincibility_time db ? byte_2CEBD db ? _power db ? _shot_level db ? _shot_time db ? include th01/main/player_is_hit[bss].asm public _miss_time, _dream, _miss_explosion_radius _miss_time db ? _dream db ? _miss_explosion_radius dw ? public _stage_point_items_collected _stage_point_items_collected dw ? public _miss_explosion_angle, _playchar_shot_func, _playchar_shot_funcs _miss_explosion_angle db ? db 5 dup(?) _playchar_shot_func dw ? _playchar_shot_funcs dw ? include th04/main/player/shots_alive[bss].asm include th05/main/player/hitshot_from[bss].asm word_2D05E dw ? byte_2D060 db ? db ? include th04/main/player/shots_add[bss].asm include th04/main/boss/funcs[bss].asm include th05/main/boss/b5_intervals[bss].asm db 5 dup(?) byte_2D07D db ? byte_2D07E db ? byte_2D07F db ? byte_2D080 db ? byte_2D081 db ? byte_2D082 db ? byte_2D083 db ? angle_2D084 db ? angle_2D085 db ? include th04/formats/bb_stage[bss].asm include th04/main/boss/hitbox[bss].asm end