; ; +-------------------------------------------------------------------------+ ; | This file has been generated by The Interactive Disassembler (IDA) | ; | Copyright (c) 2009 by Hex-Rays, | ; +-------------------------------------------------------------------------+ ; ; Input MD5 : 492DA6ACEE8714C252630BCE0D3C12FD ; File Name : th04/OP.EXE ; Format : MS-DOS executable (EXE) ; Base Address: 0h Range: 0h-133E0h Loaded length: 11A40h ; 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 op_02_TEXT __LARGE__ equ 1 .386 ; ... then switch to what we actually need. ; And yes, we can't move this to an include file for some reason. BINARY = 'O' include ReC98.inc include th04/th04.inc include th04/music/music.inc extern SCOPY@:proc extern _execl:proc extern _getch:proc extern _memcpy:proc extern _strlen:proc ; =========================================================================== ; 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_extend_header_skip.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/dos_axdx.asm include libs/master.lib/dos_keyclear.asm include libs/master.lib/dos_puts2.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/file_append.asm include libs/master.lib/file_close.asm include libs/master.lib/file_create.asm include libs/master.lib/file_exist.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/file_write.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_hline.asm include libs/master.lib/grcg_polygon_c.asm include libs/master.lib/grcg_round_boxfill.asm include libs/master.lib/grcg_setcolor.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_backup.asm include libs/master.lib/gaiji_entry_bfnt.asm include libs/master.lib/gaiji_read.asm include libs/master.lib/gaiji_write.asm include libs/master.lib/graph_400line.asm include libs/master.lib/graph_clear.asm include libs/master.lib/graph_copy_page.asm include libs/master.lib/graph_extmode.asm include libs/master.lib/graph_pi_free.asm include libs/master.lib/graph_pi_load_pack.asm include libs/master.lib/graph_pack_put_8.asm include libs/master.lib/graph_show.asm include libs/master.lib/graph_start.asm include libs/master.lib/js_end.asm include libs/master.lib/keybeep.asm include libs/master.lib/make_linework.asm include libs/master.lib/palette_init.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/rottbl.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_clear.asm include libs/master.lib/txesc.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/hmem_lallocate.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_entry_at.asm include libs/master.lib/super_entry_bfnt.asm include libs/master.lib/super_cancel_pat.asm include libs/master.lib/super_put_rect.asm include libs/master.lib/super_put.asm include libs/master.lib/respal_exist.asm include libs/master.lib/respal_free.asm include libs/master.lib/pfint21.asm db 0 include libs/master.lib/js_start.asm include libs/master.lib/draw_trapezoid.asm include th03/formats/pfopen.asm include libs/master.lib/pf_str_ieq.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/graph_gaiji_puts.asm include libs/master.lib/graph_gaiji_putc.asm _TEXT ends ; =========================================================================== ; Segment type: Pure code op_01_TEXT segment byte public 'CODE' use16 assume cs:op_01_TEXT ;org 0Ch 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 public CFG_LOAD cfg_load proc near var_C = word ptr -0Ch var_A = byte ptr -0Ah var_9 = byte ptr -9 var_8 = byte ptr -8 var_7 = byte ptr -7 var_6 = byte ptr -6 var_5 = byte ptr -5 var_4 = word ptr -4 enter 0Ch, 0 push ds push offset aMiko_cfg ; "MIKO.CFG" call file_ropen push ss lea ax, [bp+var_A] push ax push 0Ah call file_read call file_close mov ax, [bp+var_4] mov [bp+var_C], ax mov word ptr _resident+2, ax mov word ptr _resident, 0 les bx, _resident mov al, [bp+var_A] mov es:[bx+resident_t.rank], al mov al, [bp+var_9] mov es:[bx+resident_t.cfg_lives], al mov al, [bp+var_8] mov es:[bx+resident_t.cfg_bombs], al mov al, [bp+var_7] mov es:[bx+resident_t.bgm_mode], al mov al, [bp+var_6] mov es:[bx+resident_t.se_mode], al mov al, [bp+var_5] mov es:[bx+resident_t.turbo_mode], al cmp es:[bx+resident_t.cfg_lives], 6 ja short loc_A7B5 cmp es:[bx+resident_t.cfg_lives], 0 jnz short loc_A7BE loc_A7B5: les bx, _resident mov es:[bx+resident_t.cfg_lives], 3 loc_A7BE: les bx, _resident cmp es:[bx+resident_t.cfg_bombs], 2 jbe short loc_A7CE mov es:[bx+resident_t.cfg_bombs], 2 loc_A7CE: les bx, _resident cmp es:[bx+resident_t.bgm_mode], SND_BGM_MODE_COUNT jb short loc_A7DE mov es:[bx+resident_t.bgm_mode], SND_BGM_OFF loc_A7DE: les bx, _resident cmp es:[bx+resident_t.se_mode], SND_SE_MODE_COUNT jb short locret_A7EE mov es:[bx+resident_t.se_mode], SND_SE_OFF locret_A7EE: leave retn cfg_load endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public CFG_SAVE cfg_save proc near var_8 = byte ptr -8 var_7 = byte ptr -7 var_6 = byte ptr -6 var_5 = byte ptr -5 var_4 = byte ptr -4 var_3 = byte ptr -3 var_2 = byte ptr -2 enter 8, 0 push ds push offset aMiko_cfg ; "MIKO.CFG" call file_append pushd 0 push 0 call file_seek les bx, _resident mov al, es:[bx+resident_t.rank] mov [bp+var_8], al mov al, es:[bx+resident_t.cfg_lives] mov [bp+var_7], al mov al, es:[bx+resident_t.cfg_bombs] mov [bp+var_6], al mov al, es:[bx+resident_t.bgm_mode] mov [bp+var_5], al mov al, es:[bx+resident_t.se_mode] mov [bp+var_4], al mov al, es:[bx+resident_t.turbo_mode] mov [bp+var_3], al push ss lea ax, [bp+var_8] push ax push 6 call file_write pushd 9 push 0 call file_seek mov al, [bp+var_8] add al, [bp+var_7] add al, [bp+var_6] add al, [bp+var_5] add al, [bp+var_4] add al, [bp+var_3] mov [bp+var_2], al push ss lea ax, [bp+var_2] push ax push 1 call file_write call file_close leave retn cfg_save endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public CFG_SAVE_EXIT cfg_save_exit proc near var_A = byte ptr -0Ah var_9 = byte ptr -9 var_8 = byte ptr -8 var_7 = byte ptr -7 var_6 = byte ptr -6 var_5 = byte ptr -5 var_1 = byte ptr -1 enter 0Ah, 0 lea ax, [bp+var_A] push ss push ax push ds push offset unk_F3D1 mov cx, 0Ah call SCOPY@ push ds push offset aMiko_cfg ; "MIKO.CFG" call file_append pushd 0 push 0 call file_seek les bx, _resident mov al, es:[bx+resident_t.rank] mov [bp+var_A], al mov al, es:[bx+resident_t.cfg_lives] mov [bp+var_9], al mov al, es:[bx+resident_t.cfg_bombs] mov [bp+var_8], al mov al, es:[bx+resident_t.bgm_mode] mov [bp+var_7], al mov al, es:[bx+resident_t.se_mode] mov [bp+var_6], al mov al, es:[bx+resident_t.turbo_mode] mov [bp+var_5], al mov al, [bp+var_A] add al, [bp+var_9] add al, [bp+var_8] add al, [bp+var_7] add al, [bp+var_6] add al, [bp+var_5] mov [bp+var_1], al push ss lea ax, [bp+var_A] push ax push 0Ah call file_write call file_close leave retn cfg_save_exit endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public START_GAME start_game proc near push bp mov bp, sp les bx, _resident mov es:[bx+resident_t.stage], 0 mov al, es:[bx+resident_t.cfg_lives] mov es:[bx+resident_t.credit_lives], al mov al, es:[bx+resident_t.cfg_bombs] mov es:[bx+resident_t.credit_bombs], al mov es:[bx+resident_t.playchar_ascii], '0' + PLAYCHAR_REIMU mov es:[bx+resident_t.stage_ascii], '0' call playchar_menu or ax, ax jnz short loc_A96A les bx, _resident mov es:[bx+resident_t.demo_num], 0 call main_cdg_free call cfg_save call gaiji_restore kajacall KAJA_SONG_FADE, 10 call game_exit les bx, _resident cmp es:[bx+resident_t.debug_mode], 0 jnz short loc_A957 pushd 0 push ds push offset aMain ; "main" push ds push offset aMain ; "main" jmp short loc_A962 ; --------------------------------------------------------------------------- loc_A957: pushd 0 push ds push offset path ; "deb" push ds push offset path ; "deb" loc_A962: call _execl add sp, 0Ch loc_A96A: pop bp retn start_game endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public START_EXTRA start_extra proc near push bp mov bp, sp les bx, _resident mov es:[bx+resident_t.stage], STAGE_EXTRA mov es:[bx+resident_t.credit_lives], 3 mov es:[bx+resident_t.credit_bombs], 2 mov es:[bx+resident_t.playchar_ascii], '0' + PLAYCHAR_REIMU mov es:[bx+resident_t.stage_ascii], '6' call playchar_menu or ax, ax jnz short loc_A9C7 les bx, _resident mov es:[bx+resident_t.demo_num], 0 call main_cdg_free call cfg_save call gaiji_restore kajacall KAJA_SONG_FADE, 10 call game_exit pushd 0 push ds push offset aMain ; "main" push ds push offset aMain ; "main" call _execl add sp, 0Ch loc_A9C7: pop bp retn start_extra endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public START_DEMO start_demo proc near push bp mov bp, sp les bx, _resident mov es:[bx+resident_t.stage], 0 mov es:[bx+resident_t.credit_lives], 3 mov es:[bx+resident_t.credit_bombs], 3 inc es:[bx+resident_t.demo_num] cmp es:[bx+resident_t.demo_num], 4 jbe short loc_A9EF mov es:[bx+resident_t.demo_num], 1 loc_A9EF: les bx, _resident mov al, es:[bx+resident_t.demo_num] mov ah, 0 dec ax mov bx, ax cmp bx, 3 ja short loc_AA6E add bx, bx jmp cs:off_AAAD[bx] loc_AA08: les bx, _resident mov es:[bx+resident_t.playchar_ascii], '0' + PLAYCHAR_REIMU mov es:[bx+resident_t.stage_ascii], '3' mov es:[bx+resident_t.shottype], SHOTTYPE_A mov es:[bx+resident_t.demo_stage], 3 jmp short loc_AA6E ; --------------------------------------------------------------------------- loc_AA22: les bx, _resident mov es:[bx+resident_t.playchar_ascii], '0' + PLAYCHAR_MARISA mov es:[bx+resident_t.stage_ascii], '0' mov es:[bx+resident_t.shottype], SHOTTYPE_A mov es:[bx+resident_t.demo_stage], 0 jmp short loc_AA6E ; --------------------------------------------------------------------------- loc_AA3C: les bx, _resident mov es:[bx+resident_t.playchar_ascii], '0' + PLAYCHAR_REIMU mov es:[bx+resident_t.stage_ascii], '2' mov es:[bx+resident_t.shottype], SHOTTYPE_B mov es:[bx+resident_t.demo_stage], 2 jmp short loc_AA6E ; --------------------------------------------------------------------------- loc_AA56: les bx, _resident mov es:[bx+resident_t.playchar_ascii], '0' + PLAYCHAR_MARISA mov es:[bx+resident_t.stage_ascii], '1' mov es:[bx+resident_t.shottype], SHOTTYPE_B mov es:[bx+resident_t.demo_stage], 1 loc_AA6E: push 1 call palette_black_out call super_free freePISlotLarge 0 call main_cdg_free call cfg_save call gaiji_restore call game_exit pushd 0 push ds push offset aMain ; "main" push ds push offset aMain ; "main" call _execl add sp, 0Ch pop bp retn start_demo endp ; --------------------------------------------------------------------------- off_AAAD dw offset loc_AA08 dw offset loc_AA22 dw offset loc_AA3C dw offset loc_AA56 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MAIN_PUT main_put 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 si, [bp+arg_2] mov ax, si imul ax, 20 add ax, 224 mov di, ax call egc_copy_rect_1_to_0 pascal, 256, ax, (128 shl 16) or 16 call grcg_setcolor pascal, GC_RMW, [bp+arg_0] mov [bp+var_2], si mov bx, si cmp bx, 5 ja short loc_AB59 add bx, bx jmp cs:off_ABCB[bx] loc_AAF3: push (272 shl 16) or 224 push 10 call cdg_put_nocolors les bx, _resident mov al, es:[bx+resident_t.rank] mov ah, 0 add ax, 16h mov [bp+var_2], ax jmp short loc_AB59 ; --------------------------------------------------------------------------- loc_AB12: cmp _extra_unlocked, 0 jnz short loc_AB24 call grcg_setcolor pascal, (GC_RMW shl 16) + 12 loc_AB24: push (272 shl 16) or 244 push 11 jmp short loc_AB54 ; --------------------------------------------------------------------------- loc_AB2E: push (272 shl 16) or 264 push 12 jmp short loc_AB54 ; --------------------------------------------------------------------------- loc_AB38: push (272 shl 16) or 284 push 13 jmp short loc_AB54 ; --------------------------------------------------------------------------- loc_AB42: push (272 shl 16) or 304 push 14 jmp short loc_AB54 ; --------------------------------------------------------------------------- loc_AB4C: push (272 shl 16) or 324 push 15 loc_AB54: call cdg_put_nocolors loc_AB59: GRCG_OFF_CLOBBERING dx cmp [bp+arg_0], 8 jnz short loc_ABC4 call cdg_put pascal, 256, di, 35 call cdg_put pascal, 352, di, 36 call egc_copy_rect_1_to_0 pascal, large (0 shl 16) or 384, (RES_X shl 16) or 16 mov _graph_putsa_fx_func, 2 mov bx, [bp+var_2] shl bx, 2 pushd _MENU_DESC[bx] call _strlen add sp, 4 shl ax, 3 mov dx, 624 sub dx, ax push dx push (384 shl 16) or 15 mov bx, [bp+var_2] shl bx, 2 pushd _MENU_DESC[bx] call graph_putsa_fx loc_ABC4: pop di pop si leave retn 4 main_put endp ; --------------------------------------------------------------------------- db 0 off_ABCB dw offset loc_AAF3 dw offset loc_AB12 dw offset loc_AB2E dw offset loc_AB38 dw offset loc_AB42 dw offset loc_AB4C ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public OPTION_PUT option_put proc near @@y = word ptr -4 var_2 = word ptr -2 arg_0 = word ptr 4 arg_2 = word ptr 6 enter 4, 0 push si push di mov di, 224 mov ax, [bp+arg_2] shl ax, 4 add ax, 224 mov [bp+@@y], ax cmp [bp+arg_2], 7 jnz short loc_ABF7 mov [bp+@@y], 340 loc_ABF7: call egc_copy_rect_1_to_0 pascal, 224, [bp+@@y], (192 shl 16) or 16 loc_AC08: call grcg_setcolor pascal, GC_RMW, [bp+arg_0] mov bx, [bp+arg_2] cmp bx, 7 ja loc_AD9A add bx, bx jmp cs:off_AE18[bx] loc_AC24: push (224 shl 16) or 224 push 16 call cdg_put_nocolors push (320 shl 16) or 224 les bx, _resident mov al, es:[bx+resident_t.rank] mov ah, 0 add ax, 21 push ax call cdg_put_nocolors les bx, _resident mov al, es:[bx+resident_t.rank] mov ah, 0 add ax, 6 loc_AC57: mov si, ax jmp loc_AD9A ; --------------------------------------------------------------------------- loc_AC5C: push (224 shl 16) or 240 push 17 call cdg_put_nocolors push (320 shl 16) or 240 les bx, _resident mov al, es:[bx+resident_t.cfg_lives] mov ah, 0 push ax call cdg_put_nocolors mov si, 0Ah jmp loc_AD9A ; --------------------------------------------------------------------------- loc_AC85: push (224 shl 16) or 256 push 18 call cdg_put_nocolors push (320 shl 16) or 256 les bx, _resident mov al, es:[bx+resident_t.cfg_bombs] mov ah, 0 push ax call cdg_put_nocolors mov si, 0Bh jmp loc_AD9A ; --------------------------------------------------------------------------- loc_ACAE: push (224 shl 16) or 272 push 19 call cdg_put_nocolors les bx, _resident cmp es:[bx+resident_t.bgm_mode], SND_BGM_OFF jnz short loc_ACCB mov ax, 1Ch jmp short loc_ACD8 ; --------------------------------------------------------------------------- loc_ACCB: les bx, _resident mov al, es:[bx+resident_t.bgm_mode] mov ah, 0 add ax, 18h loc_ACD8: mov [bp+var_2], ax push (320 shl 16) or 272 push ax call cdg_put_nocolors les bx, _resident mov al, es:[bx+resident_t.bgm_mode] mov ah, 0 add ax, 0Ch jmp loc_AC57 ; --------------------------------------------------------------------------- loc_ACF7: push (224 shl 16) or 288 push 20 call cdg_put_nocolors les bx, _resident cmp es:[bx+resident_t.se_mode], SND_SE_OFF jnz short loc_AD14 mov ax, 1Ch jmp short loc_AD25 ; --------------------------------------------------------------------------- loc_AD14: les bx, _resident mov al, es:[bx+resident_t.se_mode] mov ah, 0 push ax mov ax, 1Fh pop dx sub ax, dx loc_AD25: mov [bp+var_2], ax push (320 shl 16) or 288 push ax call cdg_put_nocolors les bx, _resident mov al, es:[bx+resident_t.se_mode] mov ah, 0 add ax, 0Fh jmp loc_AC57 ; --------------------------------------------------------------------------- loc_AD44: push (272 shl 16) or 304 les bx, _resident mov al, es:[bx+resident_t.turbo_mode] mov ah, 0 mov dx, 21h ; '!' sub dx, ax push dx call cdg_put_nocolors mov di, 256 les bx, _resident mov al, es:[bx+resident_t.turbo_mode] mov ah, 0 add ax, 12h jmp loc_AC57 ; --------------------------------------------------------------------------- loc_AD72: push (272 shl 16) or 320 push 31 call cdg_put_nocolors mov di, 256 mov si, 14h jmp short loc_AD9A ; --------------------------------------------------------------------------- loc_AD87: push (272 shl 16) or 340 push 15 call cdg_put_nocolors mov di, 256 mov si, 15h loc_AD9A: GRCG_OFF_CLOBBERING dx cmp [bp+arg_0], 8 jnz short loc_AE11 call cdg_put pascal, di, [bp+@@y], 35 cmp di, 256 jnz short loc_ADBD lea ax, [di+96] push ax jmp short loc_ADC0 ; --------------------------------------------------------------------------- loc_ADBD: push 384 loc_ADC0: push [bp+@@y] push 36 call cdg_put call egc_copy_rect_1_to_0 pascal, large (0 shl 16) or 384, (RES_X shl 16) or 16 mov _graph_putsa_fx_func, 2 mov bx, si shl bx, 2 pushd _MENU_DESC[bx] call _strlen add sp, 4 shl ax, 3 mov dx, 624 sub dx, ax push dx push (384 shl 16) or 15 mov bx, si shl bx, 2 pushd _MENU_DESC[bx] call graph_putsa_fx loc_AE11: pop di pop si leave retn 4 option_put endp ; --------------------------------------------------------------------------- db 0 off_AE18 dw offset loc_AC24 dw offset loc_AC5C dw offset loc_AC85 dw offset loc_ACAE dw offset loc_ACF7 dw offset loc_AD44 dw offset loc_AD72 dw offset loc_AD87 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MENU_SEL_MOVE menu_sel_move proc near arg_0 = byte ptr 4 arg_2 = byte ptr 6 push bp mov bp, sp mov al, _menu_sel cbw push ax push 1 call _putfunc mov al, [bp+arg_0] add _menu_sel, al mov al, _menu_sel cbw or ax, ax jge short loc_AE4B mov al, [bp+arg_2] mov _menu_sel, al loc_AE4B: mov al, _menu_sel cmp al, [bp+arg_2] jle short loc_AE58 mov _menu_sel, 0 loc_AE58: cmp _extra_unlocked, 0 jnz short loc_AE76 mov al, _menu_sel cbw cmp ax, 1 jnz short loc_AE76 cmp _in_option, 0 jnz short loc_AE76 mov al, [bp+arg_0] add _menu_sel, al loc_AE76: mov al, _menu_sel cbw push ax push 8 call _putfunc call snd_se_reset call snd_se_play pascal, 1 call snd_se_update pop bp retn 4 menu_sel_move endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MAIN_UPDATE_AND_RENDER main_update_and_render proc near push bp mov bp, sp push si cmp _main_menu_initialized, 0 jnz short loc_AEEB mov _main_menu_unused_1, 0 mov _main_input_allowed, 0 call egc_copy_rect_1_to_0 pascal, (192 shl 16) or 224, (288 shl 16) or 160 xor si, si jmp short loc_AED6 ; --------------------------------------------------------------------------- loc_AEC0: push si mov al, _menu_sel cbw cmp ax, si jnz short loc_AECE mov ax, 8 jmp short loc_AED1 ; --------------------------------------------------------------------------- loc_AECE: mov ax, 1 loc_AED1: push ax call main_put inc si loc_AED6: cmp si, 6 jl short loc_AEC0 mov _putfunc, offset main_put mov _main_menu_initialized, 1 mov _main_input_allowed, 0 loc_AEEB: cmp _key_det, INPUT_NONE jnz short loc_AEF7 mov _main_input_allowed, 1 loc_AEF7: cmp _main_input_allowed, 0 jz loc_B043 test _key_det.lo, low INPUT_UP jz short loc_AF0E call menu_sel_move pascal, 5, -1 loc_AF0E: test _key_det.lo, low INPUT_DOWN jz short loc_AF1C call menu_sel_move pascal, 5, 1 loc_AF1C: test _key_det.hi, high INPUT_OK jnz short loc_AF2C test _key_det.lo, low INPUT_SHOT jz loc_B02B loc_AF2C: call snd_se_reset call snd_se_play pascal, 11 call snd_se_update mov al, _menu_sel cbw mov bx, ax cmp bx, 5 ja loc_B02B add bx, bx jmp cs:off_B046[bx] loc_AF51: call start_game jmp short loc_AFBD ; --------------------------------------------------------------------------- loc_AF56: call start_extra graph_accesspage 1 call pi_slot_load pascal, 0, ds, offset aOp1_pi call pi_slot_palette_apply pascal, 0 call pi_slot_put pascal, large 0, 0 freePISlotLarge 0 call graph_copy_page pascal, 0 mov PaletteTone, 100 call far ptr palette_show mov _main_menu_initialized, 0 mov _in_option, 0 mov _menu_sel, 1 jmp loc_B043 ; --------------------------------------------------------------------------- loc_AFAD: call sub_CA94 mov _main_menu_initialized, 0 jmp short loc_B02B ; --------------------------------------------------------------------------- loc_AFB7: call musicroom call main_cdg_load loc_AFBD: graph_accesspage 1 call pi_slot_load pascal, 0, ds, offset aOp1_pi call pi_slot_palette_apply pascal, 0 call pi_slot_put pascal, large 0, 0 freePISlotLarge 0 call graph_copy_page pascal, 0 mov PaletteTone, 100 call far ptr palette_show mov _main_menu_initialized, 0 mov _in_option, 0 mov _menu_sel, 0 jmp short loc_B043 ; --------------------------------------------------------------------------- loc_B010: mov _main_menu_initialized, 0 mov _in_option, 1 mov _menu_sel, 0 jmp short loc_B02B ; --------------------------------------------------------------------------- loc_B021: mov _main_menu_initialized, 0 mov _quit, 1 loc_B02B: test _key_det.hi, high INPUT_CANCEL jz short loc_B037 mov _quit, 1 loc_B037: cmp _key_det, INPUT_NONE jz short loc_B043 mov _main_input_allowed, 0 loc_B043: pop si pop bp retn main_update_and_render endp ; --------------------------------------------------------------------------- off_B046 dw offset loc_AF51 dw offset loc_AF56 dw offset loc_AFAD dw offset loc_AFB7 dw offset loc_B010 dw offset loc_B021 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public OPTION_UPDATE_AND_RENDER option_update_and_render proc near push bp mov bp, sp push si cmp _option_initialized, 0 jnz short loc_B0A2 mov _option_input_allowed, 0 call egc_copy_rect_1_to_0 pascal, (272 shl 16) or 224, (160 shl 16) or 144 xor si, si jmp short loc_B08D ; --------------------------------------------------------------------------- loc_B077: push si mov al, _menu_sel cbw cmp ax, si jnz short loc_B085 mov ax, 8 jmp short loc_B088 ; --------------------------------------------------------------------------- loc_B085: mov ax, 1 loc_B088: push ax call option_put inc si loc_B08D: cmp si, 8 jl short loc_B077 mov _putfunc, offset option_put mov _option_initialized, 1 mov _option_input_allowed, 0 loc_B0A2: cmp _key_det, INPUT_NONE jnz short loc_B0AE mov _option_input_allowed, 1 loc_B0AE: cmp _option_input_allowed, 0 jz loc_B35B test _key_det.lo, low INPUT_UP jz short loc_B0C5 call menu_sel_move pascal, 7, -1 loc_B0C5: test _key_det.lo, low INPUT_DOWN jz short loc_B0D3 call menu_sel_move pascal, 7, 1 loc_B0D3: test _key_det.hi, high INPUT_OK jnz short loc_B0E3 test _key_det.lo, low INPUT_SHOT jz loc_B16F loc_B0E3: mov al, _menu_sel cbw cmp ax, 6 jz short loc_B0F4 cmp ax, 7 jz short loc_B14F jmp loc_B178 ; --------------------------------------------------------------------------- loc_B0F4: les bx, _resident mov es:[bx+resident_t.rank], RANK_NORMAL mov es:[bx+resident_t.cfg_lives], 3 mov es:[bx+resident_t.cfg_bombs], 2 mov es:[bx+resident_t.bgm_mode], SND_BGM_FM86 mov es:[bx+resident_t.se_mode], SND_SE_FM mov es:[bx+resident_t.turbo_mode], 1 kajacall KAJA_SONG_STOP 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 aOp, SND_LOAD_SONG kajacall KAJA_SONG_PLAY mov _option_initialized, 0 jmp short loc_B16F ; --------------------------------------------------------------------------- loc_B14F: call snd_se_reset call snd_se_play pascal, 11 call snd_se_update mov _option_initialized, 0 mov _menu_sel, 4 mov _in_option, 0 loc_B16F: test _key_det.lo, low INPUT_RIGHT jz loc_B250 loc_B178: mov al, _menu_sel cbw mov bx, ax cmp bx, 5 ja loc_B246 add bx, bx jmp cs:off_B36B[bx] loc_B18C: les bx, _resident inc es:[bx+resident_t.rank] cmp es:[bx+resident_t.rank], RANK_LUNATIC jbe loc_B246 mov es:[bx+resident_t.rank], RANK_EASY jmp loc_B246 ; --------------------------------------------------------------------------- loc_B1A5: les bx, _resident inc es:[bx+resident_t.cfg_lives] cmp es:[bx+resident_t.cfg_lives], 6 jbe loc_B246 mov es:[bx+resident_t.cfg_lives], 1 jmp loc_B246 ; --------------------------------------------------------------------------- loc_B1BE: les bx, _resident inc es:[bx+resident_t.cfg_bombs] cmp es:[bx+resident_t.cfg_bombs], 2 jbe short loc_B246 mov es:[bx+resident_t.cfg_bombs], 0 jmp short loc_B246 ; --------------------------------------------------------------------------- loc_B1D4: les bx, _resident inc es:[bx+resident_t.bgm_mode] cmp es:[bx+resident_t.bgm_mode], SND_BGM_MODE_COUNT jb short loc_B1E8 mov es:[bx+resident_t.bgm_mode], SND_BGM_OFF loc_B1E8: kajacall KAJA_SONG_STOP 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 aOp, SND_LOAD_SONG kajacall KAJA_SONG_PLAY jmp short loc_B246 ; --------------------------------------------------------------------------- loc_B21C: les bx, _resident cmp es:[bx+resident_t.se_mode], SND_SE_OFF jnz short loc_B22E mov es:[bx+resident_t.se_mode], SND_SE_BEEP jmp short loc_B246 ; --------------------------------------------------------------------------- loc_B22E: les bx, _resident dec es:[bx+resident_t.se_mode] jmp short loc_B246 ; --------------------------------------------------------------------------- loc_B238: les bx, _resident mov al, 1 sub al, es:[bx+resident_t.turbo_mode] mov es:[bx+resident_t.turbo_mode], al loc_B246: mov al, _menu_sel cbw push ax push 8 call option_put loc_B250: test _key_det.lo, low INPUT_LEFT jz loc_B339 mov al, _menu_sel cbw mov bx, ax cmp bx, 5 ja loc_B32F add bx, bx jmp cs:off_B35F[bx] loc_B26D: les bx, _resident cmp es:[bx+resident_t.rank], RANK_EASY jnz short loc_B27D mov es:[bx+resident_t.rank], RANK_EXTRA loc_B27D: les bx, _resident dec es:[bx+resident_t.rank] jmp loc_B32F ; --------------------------------------------------------------------------- loc_B288: les bx, _resident cmp es:[bx+resident_t.cfg_lives], 1 jnz short loc_B298 mov es:[bx+resident_t.cfg_lives], 7 loc_B298: les bx, _resident dec es:[bx+resident_t.cfg_lives] jmp loc_B32F ; --------------------------------------------------------------------------- loc_B2A3: les bx, _resident cmp es:[bx+resident_t.cfg_bombs], 0 jnz short loc_B2B3 mov es:[bx+resident_t.cfg_bombs], 3 loc_B2B3: les bx, _resident dec es:[bx+resident_t.cfg_bombs] jmp short loc_B32F ; --------------------------------------------------------------------------- loc_B2BD: les bx, _resident cmp es:[bx+resident_t.bgm_mode], SND_BGM_OFF jnz short loc_B2CF mov es:[bx+resident_t.bgm_mode], SND_BGM_FM86 jmp short loc_B2D7 ; --------------------------------------------------------------------------- loc_B2CF: les bx, _resident dec es:[bx+resident_t.bgm_mode] loc_B2D7: kajacall KAJA_SONG_STOP 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 aOp, SND_LOAD_SONG kajacall KAJA_SONG_PLAY jmp short loc_B32F ; --------------------------------------------------------------------------- loc_B30B: les bx, _resident inc es:[bx+resident_t.se_mode] cmp es:[bx+resident_t.se_mode], SND_SE_MODE_COUNT jb short loc_B32F mov es:[bx+resident_t.se_mode], SND_SE_OFF jmp short loc_B32F ; --------------------------------------------------------------------------- loc_B321: les bx, _resident mov al, 1 sub al, es:[bx+resident_t.turbo_mode] mov es:[bx+resident_t.turbo_mode], al loc_B32F: mov al, _menu_sel cbw push ax push 8 call option_put loc_B339: test _key_det.hi, high INPUT_CANCEL jz short loc_B34F mov _option_initialized, 0 mov _menu_sel, 4 mov _in_option, 0 loc_B34F: cmp _key_det, INPUT_NONE jz short loc_B35B mov _option_input_allowed, 0 loc_B35B: pop si pop bp retn option_update_and_render endp ; --------------------------------------------------------------------------- db 0 off_B35F dw offset loc_B26D dw offset loc_B288 dw offset loc_B2A3 dw offset loc_B2BD dw offset loc_B30B dw offset loc_B321 off_B36B dw offset loc_B18C dw offset loc_B1A5 dw offset loc_B1BE dw offset loc_B1D4 dw offset loc_B21C dw offset loc_B238 ; =============== 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 push si xor si, si call text_clear call respal_create mov _mem_assign_paras, MEM_ASSIGN_PARAS_OP call _game_init_op c, offset aMSzlEd_dat, ds or ax, ax jz short loc_B3AB push ds push offset asc_F7F7 ; "\n空きメモリ不足です。メモリ空きを増やし"... call dos_puts2 call _getch loc_B3AB: call gaiji_backup push ds push offset aGameft_bft ; "GAMEFT.bft" call gaiji_entry_bfnt call cfg_load les bx, _resident cmp es:[bx+resident_t.rank], RANK_DEFAULT jnz short loc_B3D3 call sub_B9CE les bx, _resident mov es:[bx+resident_t.rank], RANK_NORMAL loc_B3D3: 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 les bx, _resident cmp es:[bx+resident_t.zunsoft_shown], 0 jnz short loc_B40D call zunsoft les bx, _resident mov es:[bx+resident_t.zunsoft_shown], 1 loc_B40D: les bx, _resident cmp es:[bx+resident_t.demo_num], 0 jnz short loc_B420 kajacall KAJA_SONG_STOP loc_B420: call op_animate call scoredat_cleared_load call main_cdg_load mov _in_option, 0 mov _quit, 0 mov _menu_sel, 0 jmp short loc_B47B ; --------------------------------------------------------------------------- loc_B43A: call far ptr _input_reset_sense mov al, _in_option cbw or ax, ax jz short loc_B44E cmp ax, 1 jz short loc_B45C jmp short loc_B45F ; --------------------------------------------------------------------------- loc_B44E: call main_update_and_render cmp si, 640 jl short loc_B45F call start_demo jmp short loc_B45F ; --------------------------------------------------------------------------- loc_B45C: call option_update_and_render loc_B45F: cmp _key_det, INPUT_NONE jnz short loc_B469 inc si jmp short loc_B46B ; --------------------------------------------------------------------------- loc_B469: xor si, si loc_B46B: les bx, _resident inc es:[bx+resident_t.rand] push 1 call frame_delay loc_B47B: cmp _quit, 0 jz short loc_B43A call main_cdg_free call cfg_save_exit call gaiji_restore call text_clear call game_exit_to_dos call respal_free pop si pop bp retf _main endp include th04/setup.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B794 proc near var_2 = word ptr -2 enter 2, 0 mov _window_tiles.x, (448 / WINDOW_TILE_W) call window_singleline pascal, (96 shl 16) or 80 call graph_putsa_fx pascal, (112 shl 16) or 88, 15, ds, offset aSETUP_BGM_HEAD mov _window_tiles.x, (160 / WINDOW_TILE_W) mov _window_tiles.y, 1 + 3 call window_dropdown_animate pascal, ( 32 shl 16) or 128 mov [bp+var_2], 0 jmp short loc_B7EB ; --------------------------------------------------------------------------- loc_B7D4: push [bp+var_2] cmp [bp+var_2], 2 jnz short loc_B7E2 mov ax, 15 jmp short loc_B7E4 ; --------------------------------------------------------------------------- loc_B7E2: xor ax, ax loc_B7E4: push ax call setup_bgm_choice_put inc [bp+var_2] loc_B7EB: cmp [bp+var_2], 3 jl short loc_B7D4 mov _window_tiles.x, (400 / WINDOW_TILE_W) mov _window_tiles.y, 1 + 9 call window_dropdown_animate pascal, (192 shl 16) or 128 call setup_bgm_help_put mov [bp+var_2], 2 loc_B80E: call input_wait_for_change pascal, 0 push 1 call frame_delay test _key_det.hi, high INPUT_OK jnz short loc_B87A test _key_det.lo, low INPUT_SHOT jnz short loc_B87A test _key_det.lo, low INPUT_UP jz short loc_B851 call setup_bgm_choice_put pascal, [bp+var_2], 0 cmp [bp+var_2], 2 jnz short loc_B846 mov [bp+var_2], 0 jmp short loc_B849 ; --------------------------------------------------------------------------- loc_B846: inc [bp+var_2] loc_B849: call setup_bgm_choice_put pascal, [bp+var_2], 15 loc_B851: test _key_det.lo, low INPUT_DOWN jz short loc_B80E call setup_bgm_choice_put pascal, [bp+var_2], 0 cmp [bp+var_2], 0 jnz short loc_B86D mov [bp+var_2], 2 jmp short loc_B870 ; --------------------------------------------------------------------------- loc_B86D: dec [bp+var_2] loc_B870: call setup_bgm_choice_put pascal, [bp+var_2], 15 jmp short loc_B80E ; --------------------------------------------------------------------------- loc_B87A: mov _window_tiles.x, (400 / WINDOW_TILE_W) mov _window_tiles.y, 1 + 9 call window_rollup_animate pascal, (192 shl 16) or 128 mov _window_tiles.x, (160 / WINDOW_TILE_W) mov _window_tiles.y, 1 + 3 call window_rollup_animate pascal, ( 32 shl 16) or 128 les bx, _resident mov al, byte ptr [bp+var_2] mov es:[bx+resident_t.bgm_mode], al leave retn sub_B794 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B8B1 proc near var_2 = word ptr -2 enter 2, 0 mov _window_tiles.x, (448 / WINDOW_TILE_W) call window_singleline pascal, (96 shl 16) or 80 call graph_putsa_fx pascal, (112 shl 16) or 88, 15, ds, offset aSETUP_SE_HEAD mov _window_tiles.x, (160 / WINDOW_TILE_W) mov _window_tiles.y, 1 + 3 call window_dropdown_animate pascal, ( 32 shl 16) or 128 mov [bp+var_2], 0 jmp short loc_B908 ; --------------------------------------------------------------------------- loc_B8F1: push [bp+var_2] cmp [bp+var_2], 1 jnz short loc_B8FF mov ax, 15 jmp short loc_B901 ; --------------------------------------------------------------------------- loc_B8FF: xor ax, ax loc_B901: push ax call setup_se_choice_put inc [bp+var_2] loc_B908: cmp [bp+var_2], 3 jl short loc_B8F1 mov _window_tiles.x, (400 / WINDOW_TILE_W) mov _window_tiles.y, 1 + 9 call window_dropdown_animate pascal, (192 shl 16) or 128 call setup_se_help_put mov [bp+var_2], 1 loc_B92B: call input_wait_for_change pascal, 0 push 1 call frame_delay test _key_det.hi, high INPUT_OK jnz short loc_B997 test _key_det.lo, low INPUT_SHOT jnz short loc_B997 test _key_det.lo, low INPUT_DOWN jz short loc_B96E call setup_se_choice_put pascal, [bp+var_2], 0 cmp [bp+var_2], 2 jnz short loc_B963 mov [bp+var_2], 0 jmp short loc_B966 ; --------------------------------------------------------------------------- loc_B963: inc [bp+var_2] loc_B966: call setup_se_choice_put pascal, [bp+var_2], 15 loc_B96E: test _key_det.lo, low INPUT_UP jz short loc_B92B call setup_se_choice_put pascal, [bp+var_2], 0 cmp [bp+var_2], 0 jnz short loc_B98A mov [bp+var_2], 2 jmp short loc_B98D ; --------------------------------------------------------------------------- loc_B98A: dec [bp+var_2] loc_B98D: call setup_se_choice_put pascal, [bp+var_2], 15 jmp short loc_B92B ; --------------------------------------------------------------------------- loc_B997: mov _window_tiles.x, (400 / WINDOW_TILE_W) mov _window_tiles.y, 1 + 9 call window_rollup_animate pascal, (192 shl 16) or 128 mov _window_tiles.x, (160 / WINDOW_TILE_W) mov _window_tiles.y, 1 + 3 call window_rollup_animate pascal, ( 32 shl 16) or 128 les bx, _resident mov al, byte ptr [bp+var_2] mov es:[bx+resident_t.se_mode], al leave retn sub_B8B1 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_B9CE proc near push bp mov bp, sp mov PaletteTone, 0 call far ptr palette_show call super_entry_bfnt pascal, ds, offset aMswin_bft ; "mswin.bft" graph_accesspage 1 call pi_slot_load pascal, 0, ds, offset aMs_pi call pi_slot_palette_apply pascal, 0 call pi_slot_put pascal, large 0, 0 freePISlotLarge 0 call graph_copy_page pascal, 0 push 1 call palette_black_in call sub_B794 push 1 call frame_delay call graph_copy_page pascal, 0 call sub_B8B1 push 1 call palette_black_out call super_free pop bp retn sub_B9CE endp include th04/zunsoft.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public DRAW_TRACK draw_track proc near var_1 = byte ptr -1 @@color = byte ptr 4 @@sel = byte ptr 6 enter 2, 0 mov al, 1 sub al, _music_page mov [bp+var_1], al graph_accesspage al push 16 mov al, [bp+@@sel] mov ah, 0 shl ax, 4 add ax, 8 push ax mov al, [bp+@@color] mov ah, 0 push ax mov al, [bp+@@sel] mov ah, 0 shl ax, 2 mov bx, ax pushd _MUSIC_TITLES[bx] call graph_putsa_fx graph_accesspage _music_page push 16 mov al, [bp+@@sel] mov ah, 0 shl ax, 4 add ax, 8 push ax mov al, [bp+@@color] mov ah, 0 push ax mov al, [bp+@@sel] mov ah, 0 shl ax, 2 mov bx, ax pushd _MUSIC_TITLES[bx] call graph_putsa_fx leave retn 4 draw_track endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public DRAW_TRACKS draw_tracks proc near @@sel = byte ptr 4 push bp mov bp, sp push si xor si, si jmp short loc_BF5E ; --------------------------------------------------------------------------- loc_BF49: push si mov al, [bp+@@sel] mov ah, 0 cmp ax, si jnz short loc_BF57 mov al, 3 jmp short loc_BF59 ; --------------------------------------------------------------------------- loc_BF57: mov al, 5 loc_BF59: push ax call draw_track inc si loc_BF5E: cmp si, 18h jl short loc_BF49 pop si pop bp retn 2 draw_tracks endp include th02/music/music.asm include th02/music/music_cmt_load.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public DRAW_CMT_LINES draw_cmt_lines proc near push bp mov bp, sp push si call graph_putsa_fx pascal, (320 shl 16) or 64, 7, ds, offset _music_cmt mov si, 1 jmp short loc_C306 ; --------------------------------------------------------------------------- loc_C2DE: mov bx, si imul bx, MUSIC_CMT_LINE_LEN cmp _music_cmt[bx], ';' jz short loc_C305 push 320 lea ax, [si+4] shl ax, 4 push ax push 7 push ds mov ax, si imul ax, MUSIC_CMT_LINE_LEN add ax, offset _music_cmt push ax call graph_putsa_fx loc_C305: inc si loc_C306: cmp si, MUSIC_CMT_LINE_COUNT jl short loc_C2DE pop si pop bp retn draw_cmt_lines endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C30E proc near push bp mov bp, sp push si mov si, 4 jmp short loc_C328 ; --------------------------------------------------------------------------- loc_C317: mov _graph_putsa_fx_func, si call draw_cmt_lines call music_flip call draw_cmt_lines call music_flip inc si loc_C328: cmp si, 8 jl short loc_C317 mov _graph_putsa_fx_func, 2 call draw_cmt_lines call music_flip call draw_cmt_lines pop si pop bp retn sub_C30E endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C33F proc near push bp mov bp, sp mov _graph_putsa_fx_func, 2 call bgimage_put_rect pascal, (320 shl 16) or 64, (320 shl 16) or 320 call music_flip call bgimage_put_rect pascal, (320 shl 16) or 64, (320 shl 16) or 320 pop bp retn sub_C33F endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public DRAW_CMT draw_cmt proc near @@track = word ptr 4 push bp mov bp, sp cmp byte_12DBE, 0 jz short loc_C37C call sub_C33F loc_C37C: call music_cmt_load pascal, [bp+@@track] call screen_back_B_put call bgimage_put_rect pascal, (320 shl 16) or 64, (320 shl 16) or 320 cmp byte_12DBE, 0 jz short loc_C3A2 call sub_C30E jmp short loc_C3B0 ; --------------------------------------------------------------------------- loc_C3A2: mov byte_12DBE, 1 call draw_cmt_lines call music_flip call draw_cmt_lines loc_C3B0: call screen_back_B_put pop bp retn 2 draw_cmt endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public MUSICROOM musicroom proc near push bp mov bp, sp mov byte_12DBE, 0 call cdg_freeall call text_clear mov _music_page, 1 mov PaletteTone, 0 call far ptr palette_show graph_showpage 0 graph_accesspage al call graph_clear graph_accesspage 1 call pi_slot_load pascal, 0, ds, offset aMusic_pi call pi_slot_palette_apply pascal, 0 call pi_slot_put pascal, large 0, 0 freePISlotLarge 0 mov al, music_track_playing mov _music_sel, al call draw_tracks pascal, word ptr _music_sel call graph_copy_page pascal, 0 call bgimage_snap graph_accesspage 1 graph_showpage 0 call screen_back_B_snap mov al, music_track_playing mov ah, 0 call draw_cmt pascal, ax mov PaletteTone, 100 call far ptr palette_show loc_C454: call far ptr _input_reset_sense cmp _key_det, INPUT_NONE jz short loc_C465 call music_flip jmp short loc_C454 ; --------------------------------------------------------------------------- loc_C465: call far ptr _input_reset_sense test _key_det.lo, low INPUT_UP jz short loc_C4A0 call draw_track pascal, word ptr _music_sel, 5 cmp _music_sel, 0 jbe short loc_C487 dec _music_sel jmp short loc_C48C ; --------------------------------------------------------------------------- loc_C487: mov _music_sel, 17h loc_C48C: cmp _music_sel, 16h jnz short loc_C497 dec _music_sel loc_C497: call draw_track pascal, word ptr _music_sel, 3 loc_C4A0: test _key_det.lo, low INPUT_DOWN jz short loc_C4D6 call draw_track pascal, word ptr _music_sel, 5 cmp _music_sel, 17h jnb short loc_C4BD inc _music_sel jmp short loc_C4C2 ; --------------------------------------------------------------------------- loc_C4BD: mov _music_sel, 0 loc_C4C2: cmp _music_sel, 16h jnz short loc_C4CD inc _music_sel loc_C4CD: call draw_track pascal, word ptr _music_sel, 3 loc_C4D6: test _key_det.lo, low INPUT_SHOT jnz short loc_C4E4 test _key_det.hi, high INPUT_OK jz short loc_C51D loc_C4E4: cmp _music_sel, 17h jz short loc_C533 kajacall KAJA_SONG_FADE, 32 mov al, _music_sel mov music_track_playing, al mov ah, 0 call draw_cmt pascal, ax mov al, _music_sel mov ah, 0 shl ax, 2 mov bx, ax call snd_load pascal, dword ptr _MUSIC_FILES[bx], SND_LOAD_SONG kajacall KAJA_SONG_PLAY loc_C51D: test _key_det.hi, high INPUT_CANCEL jnz short loc_C533 cmp _key_det, INPUT_NONE jnz loc_C454 call music_flip jmp loc_C465 ; --------------------------------------------------------------------------- loc_C533: call far ptr _input_reset_sense cmp _key_det, INPUT_NONE jz short loc_C544 call music_flip jmp short loc_C533 ; --------------------------------------------------------------------------- loc_C544: kajacall KAJA_SONG_FADE, 16 call screen_back_B_free graph_showpage 0 graph_accesspage al push 1 call palette_black_out call bgimage_free call snd_load pascal, ds, offset aOp_2, SND_LOAD_SONG kajacall KAJA_SONG_PLAY pop bp retn musicroom endp include th04/formats/scoredat_decode_both.asm include th04/formats/scoredat_encode.asm include th04/formats/scoredat_recreate.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public SCOREDAT_LOAD scoredat_load proc near push bp mov bp, sp push ds push offset aGensou_scr ; "GENSOU.SCR" call file_exist or ax, ax jz short loc_C793 push ds push offset aGensou_scr ; "GENSOU.SCR" call file_ropen mov al, _rank mov ah, 0 imul ax, size scoredat_section_t movzx eax, ax call file_seek pascal, large eax, 0 call file_read pascal, ds, offset _hi, size scoredat_section_t call file_seek pascal, large (RANK_COUNT - 1) * size scoredat_section_t, 1 call file_read pascal, ds, offset _hi2, size scoredat_section_t call file_close call scoredat_decode_func or al, al jz short loc_C79A loc_C793: call scoredat_recreate mov al, 1 pop bp retn ; --------------------------------------------------------------------------- loc_C79A: mov al, 0 pop bp retn scoredat_load endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C79E proc near var_4 = word ptr -4 var_2 = word ptr -2 arg_0 = word ptr 4 arg_2 = word ptr 6 enter 4, 0 push si push di mov di, [bp+arg_2] mov si, [bp+arg_0] mov [bp+var_4], 16 mov bx, si shl bx, 3 mov al, _hi_reimu.score.g_points[bx][SCORE_DIGITS - 1] mov ah, 0 add ax, -gb_0_ cmp ax, 10 jl short loc_C7E0 push 140 push di mov bx, si shl bx, 3 mov al, _hi_reimu.score.g_points[bx][SCORE_DIGITS - 1] mov ah, 0 add ax, -gb_0_ mov bx, 10 cwd idiv bx push ax call super_put loc_C7E0: mov bx, si shl bx, 3 mov al, _hi_marisa.score.g_points[bx][SCORE_DIGITS - 1] mov ah, 0 add ax, -gb_0_ cmp ax, 10 jl short loc_C811 push 448 push di mov bx, si shl bx, 3 mov al, _hi_marisa.score.g_points[bx][SCORE_DIGITS - 1] mov ah, 0 add ax, -gb_0_ mov bx, 10 cwd idiv bx push ax call super_put loc_C811: push 156 push di mov bx, si shl bx, 3 mov al, _hi_reimu.score.g_points[bx][SCORE_DIGITS - 1] mov ah, 0 add ax, -gb_0_ mov bx, 10 cwd idiv bx push dx call super_put push 464 push di mov bx, si shl bx, 3 mov al, _hi_marisa.score.g_points[bx][SCORE_DIGITS - 1] mov ah, 0 add ax, -gb_0_ mov bx, 10 cwd idiv bx push dx call super_put mov [bp+var_2], 6 jmp short loc_C899 ; --------------------------------------------------------------------------- loc_C854: mov ax, [bp+var_4] add ax, 156 push ax push di mov bx, si shl bx, 3 add bx, [bp+var_2] mov al, _hi_reimu.score.g_points[bx] mov ah, 0 add ax, -gb_0_ push ax call super_put mov ax, [bp+var_4] add ax, 464 push ax push di mov bx, si shl bx, 3 add bx, [bp+var_2] mov al, _hi_marisa.score.g_points[bx] mov ah, 0 add ax, -gb_0_ push ax call super_put dec [bp+var_2] add [bp+var_4], 16 loc_C899: cmp [bp+var_2], 0 jge short loc_C854 pop di pop si leave retn 4 sub_C79E endp include th04/hiscore/hiscore_stage_put.asm ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_C8F5 proc near arg_0 = word ptr 4 push bp mov bp, sp push si push di mov si, [bp+arg_0] or si, si jnz loc_C989 push (10 shl 16) or 98 push GAIJI_W mov ax, si imul ax, (SCOREDAT_NAME_LEN + 1) add ax, offset _hi_reimu.score.g_name push ds push ax push 14 call graph_gaiji_puts push (8 shl 16) or 96 push GAIJI_W mov ax, si imul ax, (SCOREDAT_NAME_LEN + 1) add ax, offset _hi_reimu.score.g_name push ds push ax push 7 call graph_gaiji_puts push (322 shl 16) or 98 push GAIJI_W mov ax, si imul ax, (SCOREDAT_NAME_LEN + 1) add ax, offset _hi_marisa.score.g_name push ds push ax push 14 call graph_gaiji_puts push (320 shl 16) or 96 push GAIJI_W mov ax, si imul ax, (SCOREDAT_NAME_LEN + 1) add ax, offset _hi_marisa.score.g_name push ds push ax push 7 call graph_gaiji_puts push 600000h call sub_C79E push (292 shl 16) or 96 mov al, _hi_reimu.score.g_stage[si] mov ah, 0 push ax call hiscore_stage_put push (600 shl 16) or 96 jmp loc_CA0A ; --------------------------------------------------------------------------- loc_C989: mov ax, si shl ax, 4 add ax, 112 mov di, ax push 10 add ax, 2 push ax push GAIJI_W mov ax, si imul ax, (SCOREDAT_NAME_LEN + 1) add ax, offset _hi_reimu.score.g_name push ds push ax push 14 call graph_gaiji_puts push 8 push di push GAIJI_W mov ax, si imul ax, (SCOREDAT_NAME_LEN + 1) add ax, offset _hi_reimu.score.g_name push ds push ax push 2 call graph_gaiji_puts push 322 lea ax, [di+2] push ax push GAIJI_W mov ax, si imul ax, (SCOREDAT_NAME_LEN + 1) add ax, offset _hi_marisa.score.g_name push ds push ax push 14 call graph_gaiji_puts push 320 push di push GAIJI_W mov ax, si imul ax, (SCOREDAT_NAME_LEN + 1) add ax, offset _hi_marisa.score.g_name push ds push ax push 2 call graph_gaiji_puts push di push si call sub_C79E push 292 push di mov al, _hi_reimu.score.g_stage[si] mov ah, 0 push ax call hiscore_stage_put push 600 push di loc_CA0A: mov al, _hi_marisa.score.g_stage[si] mov ah, 0 push ax call hiscore_stage_put pop di pop si pop bp retn 2 sub_C8F5 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public SCORE_MENU score_menu proc near push bp mov bp, sp push si graph_accesspage 1 call pi_slot_palette_apply pascal, 0 call pi_slot_put pascal, large 0, 0 graph_accesspage 0 call pi_slot_palette_apply pascal, 0 call pi_slot_put pascal, large 0, 0 push 0 call sub_C8F5 mov si, 1 jmp short loc_CA5B ; --------------------------------------------------------------------------- loc_CA56: push si call sub_C8F5 inc si loc_CA5B: cmp si, 9 jl short loc_CA56 push 9 call sub_C8F5 push (496 shl 16) or 376 mov al, _rank mov ah, 0 add ax, ax add ax, 10 push ax call super_put push (560 shl 16) or 376 mov al, _rank mov ah, 0 add ax, ax add ax, 11 push ax call super_put pop si pop bp retn score_menu endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_CA94 proc near push bp mov bp, sp kajacall KAJA_SONG_STOP call snd_load pascal, ds, offset aName, SND_LOAD_SONG kajacall KAJA_SONG_PLAY kajacall KAJA_SONG_FADE, -128 push 1 call palette_black_out les bx, _resident assume es:nothing mov al, es:[bx+resident_t.rank] mov _rank, al call scoredat_load call pi_slot_load pascal, 0, ds, offset aHi01_pi loc_CADA: call score_menu push 1 call palette_black_in loc_CAE4: call far ptr _input_reset_sense push 1 call frame_delay test _key_det.hi, high INPUT_OK jnz short loc_CB58 test _key_det.lo, low INPUT_SHOT jnz short loc_CB58 test _key_det.hi, high INPUT_CANCEL jnz short loc_CB58 test _key_det.hi, high INPUT_OK jnz short loc_CB58 test _key_det.lo, low INPUT_LEFT jz short loc_CB36 cmp _rank, RANK_EASY jz short loc_CB36 dec _rank mov PaletteTone, 0 call far ptr palette_show call scoredat_load call score_menu push 1 call palette_black_in loc_CB36: test _key_det.lo, low INPUT_RIGHT jz short loc_CAE4 cmp _rank, RANK_EXTRA jnb short loc_CAE4 inc _rank mov PaletteTone, 0 call far ptr palette_show call scoredat_load jmp short loc_CADA ; --------------------------------------------------------------------------- loc_CB58: kajacall KAJA_SONG_FADE, 1 push 1 call palette_black_out freePISlotLarge 0 graph_accesspage 1 call pi_slot_load pascal, 0, ds, offset aOp1_pi_0 call pi_slot_palette_apply pascal, 0 call pi_slot_put pascal, large 0, 0 freePISlotLarge 0 call graph_copy_page pascal, 0 push 1 call palette_black_in loc_CBB3: call far ptr _input_reset_sense push 1 call frame_delay cmp _key_det, INPUT_NONE jnz short loc_CBB3 kajacall KAJA_SONG_STOP call snd_load pascal, ds, offset aOp_0, SND_LOAD_SONG kajacall KAJA_SONG_PLAY pop bp retn sub_CA94 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame public SCOREDAT_CLEARED_LOAD scoredat_cleared_load proc near push bp mov bp, sp mov _rank, RANK_EASY jmp loc_CC6F ; --------------------------------------------------------------------------- loc_CBEE: call scoredat_load or al, al jnz loc_CC78 mov al, _rank mov ah, 0 mov dl, _hi_reimu.score.cleared mov bx, ax mov _cleared_with_reimu[bx], dl mov al, _rank mov ah, 0 mov dl, _hi_marisa.score.cleared mov bx, ax mov _cleared_with_marisa[bx], dl mov al, _rank mov ah, 0 mov bx, ax cmp _cleared_with_reimu[bx], SCOREDAT_CLEARED_BOTH jbe short loc_CC2F mov al, _rank mov ah, 0 mov bx, ax mov _cleared_with_reimu[bx], 0 loc_CC2F: mov al, _rank mov ah, 0 mov bx, ax cmp _cleared_with_marisa[bx], SCOREDAT_CLEARED_BOTH jbe short loc_CC49 mov al, _rank mov ah, 0 mov bx, ax mov _cleared_with_marisa[bx], 0 loc_CC49: cmp _rank, RANK_EASY jz short loc_CC6B mov al, _rank mov ah, 0 mov bx, ax mov al, _cleared_with_reimu[bx] mov dl, _rank mov dh, 0 mov bx, dx or al, _cleared_with_marisa[bx] or _extra_unlocked, al loc_CC6B: inc _rank loc_CC6F: cmp _rank, RANK_COUNT jb loc_CBEE loc_CC78: les bx, _resident mov al, es:[bx+resident_t.rank] mov _rank, al call super_entry_bfnt pascal, ds, offset aScnum_bft ; "scnum.bft" call super_entry_bfnt pascal, ds, offset aHi_m_bft ; "hi_m.bft" pop bp retn scoredat_cleared_load endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame main_cdg_load proc near push bp mov bp, sp call cdg_load_all pascal, 0, ds, offset aSft1_cd2 call cdg_load_all pascal, 10, ds, offset aSft2_cd2 call cdg_load_all pascal, 35, ds, offset aCar_cd2 call cdg_load_all_noalpha pascal, 40, ds, offset aSl_cd2 pop bp retn main_cdg_load endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame main_cdg_free proc near push bp mov bp, sp call cdg_freeall pop bp retn main_cdg_free endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame op_animate proc near @@page = byte ptr -4 var_3 = byte ptr -3 @@component = word ptr -2 enter 4, 0 push si push di mov PaletteTone, 0 call far ptr palette_show graph_accesspage 1 call grcg_setcolor pascal, (GC_RMW shl 16) + 15 call grcg_byteboxfill_x pascal, large 0, (((RES_X - 1) / 8) shl 16) or (RES_Y - 1) GRCG_OFF_CLOBBERING dx call graph_copy_page pascal, 0 call pi_slot_load pascal, 0, ds, offset aOp5b_pi call pi_slot_load pascal, 1, ds, offset aOp4b_pi call pi_slot_load pascal, 2, ds, offset aOp3b_pi call pi_slot_load pascal, 3, ds, offset aOp2b_pi call pi_slot_load pascal, 4, ds, offset aOp1b_pi call pi_slot_load pascal, 5, ds, offset aOp0b_pi call pi_slot_palette_apply pascal, 0 push 4 call palette_black_in graph_showpage 0 graph_accesspage 1 xor si, si mov [bp+var_3], 0 mov di, 100 mov [bp+@@page], 0 jmp short loc_CDC4 ; --------------------------------------------------------------------------- loc_CD7A: mov ax, si mov bx, 4 cwd idiv bx or dx, dx jnz short loc_CDB0 cmp [bp+var_3], 6 jnb short loc_CDB0 pushd 38 mov al, [bp+var_3] mov ah, 0 push ax call pi_slot_put inc [bp+var_3] graph_accesspage [bp+@@page] mov al, 1 sub al, [bp+@@page] mov [bp+@@page], al graph_showpage al loc_CDB0: mov PaletteTone, di call far ptr palette_show add di, 2 push 1 call frame_delay inc si loc_CDC4: cmp si, 1Ch jl short loc_CD7A mov PaletteTone, 200 call far ptr palette_show graph_showpage 0 graph_accesspage al freePISlotLarge 0 freePISlotLarge 1 freePISlotLarge 2 freePISlotLarge 3 freePISlotLarge 4 freePISlotLarge 5 les bx, _resident cmp es:[bx+resident_t.demo_num], 0 jnz short loc_CE50 call snd_load pascal, ds, offset aOp_1, SND_LOAD_SONG kajacall KAJA_SONG_PLAY loc_CE50: graph_accesspage 1 call pi_slot_load pascal, 0, ds, offset aOp1_pi_1 call pi_slot_palette_apply pascal, 0 call pi_slot_put pascal, large 0, 0 freePISlotLarge 0 call graph_copy_page pascal, 0 xor si, si jmp short loc_CEAA ; --------------------------------------------------------------------------- loc_CE8B: mov bx, si imul bx, size rgb_t mov Palettes[bx].r, 255 mov bx, si imul bx, size rgb_t mov Palettes[bx].g, 255 mov bx, si imul bx, size rgb_t mov Palettes[bx].b, 255 inc si loc_CEAA: cmp si, PALETTE_COLORS jl short loc_CE8B call far ptr palette_show mov PaletteTone, 100 call far ptr palette_show xor si, si mov [bp+var_3], 240 jmp short loc_CEE8 ; --------------------------------------------------------------------------- loc_CEC7: mov al, [bp+var_3] mov Palettes[0 * size rgb_t].r, al mov Palettes[0 * size rgb_t].g, al mov Palettes[0 * size rgb_t].b, al call far ptr palette_show push 1 call frame_delay inc si mov al, [bp+var_3] add al, -16 mov [bp+var_3], al loc_CEE8: cmp si, 15 jl short loc_CEC7 xor si, si mov [bp+var_3], 252 jmp short loc_CF4E ; --------------------------------------------------------------------------- loc_CEF5: mov di, 1 jmp short loc_CF34 ; --------------------------------------------------------------------------- loc_CEFA: mov [bp+@@component], 0 jmp short loc_CF2D ; --------------------------------------------------------------------------- loc_CF01: mov bx, di imul bx, size rgb_t add bx, [bp+@@component] mov al, _pi_slot_headers._palette[bx] mov bx, di imul bx, size rgb_t add bx, [bp+@@component] cmp al, Palettes[bx].r jnb short loc_CF2A mov bx, di imul bx, size rgb_t add bx, [bp+@@component] mov al, [bp+var_3] mov Palettes[bx].r, al loc_CF2A: inc [bp+@@component] loc_CF2D: cmp [bp+@@component], size rgb_t jl short loc_CF01 inc di loc_CF34: cmp di, PALETTE_COLORS jl short loc_CEFA call far ptr palette_show push 1 call frame_delay inc si mov al, [bp+var_3] add al, -4 mov [bp+var_3], al loc_CF4E: cmp si, 63 jl short loc_CEF5 call pi_slot_palette_apply pascal, 0 pop di pop si leave retn op_animate endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_CF5E proc near var_A = word ptr -0Ah var_8 = word ptr -8 var_6 = word ptr -6 var_4 = word ptr -4 var_2 = word ptr -2 enter 0Ah, 0 push si push di call hmem_allocbyte pascal, (((256 / 8) * 8) + ((8 / 8) * 244)) * 4 mov word ptr dword_132BA+2, ax mov word ptr dword_132BA, 0 call hmem_allocbyte pascal, (((256 / 8) * 8) + ((8 / 8) * 244)) * 4 mov word ptr dword_132BE+2, ax mov word ptr dword_132BE, 0 mov di, (44 * ROW_SIZE) + (40 / 8) mov [bp+var_8], (44 * ROW_SIZE) + (328 / 8) mov [bp+var_2], 0 xor si, si jmp loc_D050 ; --------------------------------------------------------------------------- loc_CF98: mov [bp+var_4], 0 mov [bp+var_6], di mov ax, [bp+var_8] mov [bp+var_A], ax jmp loc_D03E ; --------------------------------------------------------------------------- loc_CFA9: les bx, _VRAM_PLANE_B add bx, [bp+var_6] mov al, es:[bx] les bx, dword_132BA mov es:[bx+si], al les bx, _VRAM_PLANE_B add bx, [bp+var_A] mov al, es:[bx] les bx, dword_132BE mov es:[bx+si], al inc si les bx, _VRAM_PLANE_R add bx, [bp+var_6] mov al, es:[bx] les bx, dword_132BA mov es:[bx+si], al les bx, _VRAM_PLANE_R add bx, [bp+var_A] mov al, es:[bx] les bx, dword_132BE mov es:[bx+si], al inc si les bx, _VRAM_PLANE_G add bx, [bp+var_6] mov al, es:[bx] les bx, dword_132BA mov es:[bx+si], al les bx, _VRAM_PLANE_G add bx, [bp+var_A] mov al, es:[bx] les bx, dword_132BE mov es:[bx+si], al inc si les bx, _VRAM_PLANE_E add bx, [bp+var_6] mov al, es:[bx] les bx, dword_132BA mov es:[bx+si], al les bx, _VRAM_PLANE_E add bx, [bp+var_A] mov al, es:[bx] les bx, dword_132BE mov es:[bx+si], al inc si inc [bp+var_4] inc [bp+var_6] inc [bp+var_A] loc_D03E: cmp [bp+var_4], (256 / 8) jl loc_CFA9 inc [bp+var_2] add di, ROW_SIZE add [bp+var_8], ROW_SIZE loc_D050: cmp [bp+var_2], 8 jl loc_CF98 mov [bp+var_2], 0 jmp loc_D0F2 ; --------------------------------------------------------------------------- loc_D060: les bx, _VRAM_PLANE_B add bx, di mov al, es:[bx] les bx, dword_132BA mov es:[bx+si], al les bx, _VRAM_PLANE_B add bx, [bp+var_8] mov al, es:[bx] les bx, dword_132BE mov es:[bx+si], al inc si les bx, _VRAM_PLANE_R add bx, di mov al, es:[bx] les bx, dword_132BA mov es:[bx+si], al les bx, _VRAM_PLANE_R add bx, [bp+var_8] mov al, es:[bx] les bx, dword_132BE mov es:[bx+si], al inc si les bx, _VRAM_PLANE_G add bx, di mov al, es:[bx] les bx, dword_132BA mov es:[bx+si], al les bx, _VRAM_PLANE_G add bx, [bp+var_8] mov al, es:[bx] les bx, dword_132BE mov es:[bx+si], al inc si les bx, _VRAM_PLANE_E add bx, di mov al, es:[bx] les bx, dword_132BA mov es:[bx+si], al les bx, _VRAM_PLANE_E add bx, [bp+var_8] mov al, es:[bx] les bx, dword_132BE mov es:[bx+si], al inc si inc [bp+var_2] add di, ROW_SIZE add [bp+var_8], ROW_SIZE loc_D0F2: cmp [bp+var_2], 244 jl loc_D060 pop di pop si leave retn sub_CF5E endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D0FF proc near var_6 = dword ptr -6 var_2 = word ptr -2 arg_0 = byte ptr 4 enter 6, 0 push si push di cmp [bp+arg_0], 0 jnz short loc_D114 mov dx, (44 * ROW_SIZE) + ( 40 / 8) mov eax, dword_132BA jmp short loc_D11B ; --------------------------------------------------------------------------- loc_D114: mov dx, (44 * ROW_SIZE) + (328 / 8) mov eax, dword_132BE loc_D11B: mov [bp+var_6], eax xor cx, cx jmp short loc_D18A ; --------------------------------------------------------------------------- loc_D123: mov [bp+var_2], 0 mov di, dx jmp short loc_D180 ; --------------------------------------------------------------------------- loc_D12C: les bx, _VRAM_PLANE_B add bx, di push es les si, [bp+var_6] mov al, es:[si] pop es mov es:[bx], al inc word ptr [bp+var_6] les bx, _VRAM_PLANE_R add bx, di push es les si, [bp+var_6] mov al, es:[si] pop es mov es:[bx], al inc word ptr [bp+var_6] les bx, _VRAM_PLANE_G add bx, di push es les si, [bp+var_6] mov al, es:[si] pop es mov es:[bx], al inc word ptr [bp+var_6] les bx, _VRAM_PLANE_E add bx, di push es les si, [bp+var_6] mov al, es:[si] pop es mov es:[bx], al inc word ptr [bp+var_6] inc [bp+var_2] inc di loc_D180: cmp [bp+var_2], (256 / 8) jl short loc_D12C inc cx add dx, ROW_SIZE loc_D18A: cmp cx, 8 jl short loc_D123 xor cx, cx jmp short loc_D1E7 ; --------------------------------------------------------------------------- loc_D193: les bx, _VRAM_PLANE_B add bx, dx push es les si, [bp+var_6] mov al, es:[si] pop es mov es:[bx], al inc word ptr [bp+var_6] les bx, _VRAM_PLANE_R add bx, dx push es les si, [bp+var_6] mov al, es:[si] pop es mov es:[bx], al inc word ptr [bp+var_6] les bx, _VRAM_PLANE_G add bx, dx push es les si, [bp+var_6] mov al, es:[si] pop es mov es:[bx], al inc word ptr [bp+var_6] les bx, _VRAM_PLANE_E add bx, dx push es les si, [bp+var_6] mov al, es:[si] pop es mov es:[bx], al inc word ptr [bp+var_6] inc cx add dx, ROW_SIZE loc_D1E7: cmp cx, 244 jl short loc_D193 pop di pop si leave retn 2 sub_D0FF endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D1F3 proc near push bp mov bp, sp push word ptr dword_132BA+2 call hmem_free push word ptr dword_132BE+2 call hmem_free pop bp retn sub_D1F3 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame darken_pic proc near var_6 = dword ptr -6 var_2 = word ptr -2 arg_0 = byte ptr 4 enter 6, 0 push si push di cmp [bp+arg_0], 0 jnz short loc_D21B mov si, (52 * ROW_SIZE) + ( 48 / 8) jmp short loc_D21E ; --------------------------------------------------------------------------- loc_D21B: mov si, (52 * ROW_SIZE) + (336 / 8) loc_D21E: call grcg_setcolor pascal, (GC_RMW shl 16) + 1 mov [bp+var_6], 0AAAAAAAAh xor di, di jmp short loc_D273 ; --------------------------------------------------------------------------- loc_D235: test di, 1 jnz short loc_D243 mov eax, 0AAAAAAAAh jmp short loc_D249 ; --------------------------------------------------------------------------- loc_D243: mov eax, 55555555h loc_D249: mov [bp+var_6], eax mov [bp+var_2], 0 jmp short loc_D269 ; --------------------------------------------------------------------------- loc_D254: les bx, _VRAM_PLANE_B add bx, si mov eax, [bp+var_6] mov es:[bx], eax add [bp+var_2], 4 add si, 4 loc_D269: cmp [bp+var_2], (256 / 8) jl short loc_D254 inc di add si, ROW_SIZE - (256 / 8) loc_D273: cmp di, 244 jl short loc_D235 GRCG_OFF_CLOBBERING dx pop di pop si leave retn 2 darken_pic endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D285 proc near var_2 = word ptr -2 arg_0 = word ptr 4 enter 2, 0 push si push di mov si, [bp+arg_0] mov ax, si or ax, ax jz short loc_D29B cmp ax, 1 jz short loc_D2A0 jmp short loc_D2A3 ; --------------------------------------------------------------------------- loc_D29B: mov di, 80 jmp short loc_D2A3 ; --------------------------------------------------------------------------- loc_D2A0: mov di, 368 loc_D2A3: mov [bp+var_2], 312 lea ax, [di+8] push ax mov ax, [bp+var_2] add ax, 8 push ax push 0Fh mov bx, si shl bx, 3 pushd aPLAYCHAR_NAME_AND_TITLE[bx] call graph_putsa_fx lea ax, [di+8] push ax mov ax, [bp+var_2] add ax, 40 push ax push 0Fh mov bx, si shl bx, 3 pushd aPLAYCHAR_TYPE[bx] call graph_putsa_fx mov ax, 1 sub ax, si mov si, ax or ax, ax jz short loc_D2F2 cmp ax, 1 jz short loc_D2F7 jmp short loc_D2FA ; --------------------------------------------------------------------------- loc_D2F2: mov di, 80 jmp short loc_D2FA ; --------------------------------------------------------------------------- loc_D2F7: mov di, 368 loc_D2FA: lea ax, [di+8] push ax mov ax, [bp+var_2] add ax, 8 push ax push 3 mov bx, si shl bx, 3 pushd aPLAYCHAR_NAME_AND_TITLE[bx] call graph_putsa_fx lea ax, [di+8] push ax mov ax, [bp+var_2] add ax, 40 push ax push 3 mov bx, si shl bx, 3 pushd aPLAYCHAR_TYPE[bx] call graph_putsa_fx pop di pop si leave retn 2 sub_D285 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D338 proc near arg_0 = word ptr 4 push bp mov bp, sp push si push di mov ax, [bp+arg_0] or ax, ax jz short loc_D34B cmp ax, 1 jz short loc_D350 jmp short loc_D353 ; --------------------------------------------------------------------------- loc_D34B: mov si, 80 jmp short loc_D353 ; --------------------------------------------------------------------------- loc_D350: mov si, 368 loc_D353: mov di, 312 call grcg_setcolor pascal, (GC_RMW shl 16) + 1 lea ax, [si+8] push ax lea ax, [di+8] push ax lea ax, [si+200] push ax lea ax, [di+72] push ax push 8 call grcg_round_boxfill call grcg_setcolor pascal, (GC_RMW shl 16) + 2 push si push di lea ax, [si+192] push ax lea ax, [di+64] push ax push 8 call grcg_round_boxfill GRCG_OFF_CLOBBERING dx pop di pop si pop bp retn 2 sub_D338 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D3A2 proc near push bp mov bp, sp cmp playchar_132B8, PLAYCHAR_REIMU jnz short loc_D407 push (40 shl 16) or 44 push 40 call cdg_put_noalpha push 1 call sub_D0FF push (336 shl 16) or 52 push 41 call cdg_put_noalpha push 1 call darken_pic call grcg_setcolor pascal, (GC_RMW shl 16) + 1 call grcg_byteboxfill_x pascal, ((296 / 8) shl 16) or 52, ((296 / 8) shl 16) or 287 call grcg_byteboxfill_x pascal, (( 48 / 8) shl 16) or 288, ((296 / 8) shl 16) or 295 GRCG_OFF_CLOBBERING dx push 0 jmp short loc_D460 ; --------------------------------------------------------------------------- loc_D407: push (328 shl 16) or 44 push 41 call cdg_put_noalpha push 0 call sub_D0FF push (48 shl 16) or 52 push 40 call cdg_put_noalpha push 0 call darken_pic call grcg_setcolor pascal, (GC_RMW shl 16) + 1 call grcg_byteboxfill_x pascal, ((584 / 8) shl 16) or 52, ((584 / 8) shl 16) or 287 call grcg_byteboxfill_x pascal, ((336 / 8) shl 16) or 288, ((584 / 8) shl 16) or 295 GRCG_OFF_CLOBBERING dx push 1 loc_D460: call sub_D285 pop bp retn sub_D3A2 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D465 proc near var_5 = byte ptr -5 var_4 = word ptr -4 var_2 = word ptr -2 arg_0 = word ptr 4 enter 6, 0 push si push di mov di, [bp+arg_0] les bx, _resident cmp es:[bx+resident_t.stage], STAGE_EXTRA jnz short loc_D47E mov ax, RANK_EXTRA jmp short loc_D488 ; --------------------------------------------------------------------------- loc_D47E: les bx, _resident mov al, es:[bx+resident_t.rank] mov ah, 0 loc_D488: mov [bp+var_4], ax mov ax, di or ax, ax jz short loc_D498 cmp ax, 1 jz short loc_D4A1 jmp short loc_D4A8 ; --------------------------------------------------------------------------- loc_D498: mov si, 312 mov [bp+var_5], SCOREDAT_CLEARED_A jmp short loc_D4A8 ; --------------------------------------------------------------------------- loc_D4A1: mov si, 336 mov [bp+var_5], SCOREDAT_CLEARED_B loc_D4A8: mov [bp+var_2], 320 mov al, playchar_132B8 mov ah, 0 imul ax, RANK_COUNT add ax, [bp+var_4] mov dl, [bp+var_5] mov bx, ax test _cleared_with[bx], dl jz short loc_D4E5 mov _graph_putsa_fx_func, 0 mov ax, [bp+var_2] add ax, -8 push ax lea ax, [si+4] push ax push 15 push ds push offset aStar call graph_putsa_fx mov _graph_putsa_fx_func, 2 loc_D4E5: mov ax, [bp+var_2] add ax, 8 push ax lea ax, [si+4] push ax push 15 mov al, playchar_132B8 mov ah, 0 shl ax, 3 mov dx, di shl dx, 2 add ax, dx mov bx, ax pushd aPLAYCHAR_SHOT[bx] call graph_putsa_fx mov ax, 1 sub ax, di mov di, ax or ax, ax jz short loc_D51F cmp ax, 1 jz short loc_D528 jmp short loc_D52F ; --------------------------------------------------------------------------- loc_D51F: mov si, 312 mov [bp+var_5], SCOREDAT_CLEARED_A jmp short loc_D52F ; --------------------------------------------------------------------------- loc_D528: mov si, 336 mov [bp+var_5], SCOREDAT_CLEARED_B loc_D52F: mov al, playchar_132B8 mov ah, 0 imul ax, RANK_COUNT add ax, [bp+var_4] mov dl, [bp+var_5] mov bx, ax test _cleared_with[bx], dl jz short loc_D567 mov _graph_putsa_fx_func, 0 mov ax, [bp+var_2] add ax, -8 push ax lea ax, [si+4] push ax push 15 push ds push offset aStar call graph_putsa_fx mov _graph_putsa_fx_func, 2 loc_D567: mov ax, [bp+var_2] add ax, 8 push ax lea ax, [si+4] push ax push 3 mov al, playchar_132B8 mov ah, 0 shl ax, 3 mov dx, di shl dx, 2 add ax, dx mov bx, ax pushd aPLAYCHAR_SHOT[bx] call graph_putsa_fx pop di pop si leave retn 2 sub_D465 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D595 proc near push bp mov bp, sp push si push di mov si, 312 mov di, 320 call grcg_setcolor pascal, (GC_RMW shl 16) + 1 lea ax, [di+8] push ax lea ax, [si+8] push ax lea ax, [di+199] push ax lea ax, [si+31] push ax push 8 call grcg_round_boxfill lea ax, [di+8] push ax lea ax, [si+32] push ax lea ax, [di+199] push ax lea ax, [si+55] push ax push 8 call grcg_round_boxfill push 136 lea ax, [si+8] push ax push 327 lea ax, [si+31] push ax push 8 call grcg_round_boxfill call grcg_setcolor pascal, (GC_RMW shl 16) + 2 push di push si lea ax, [di+192] push ax lea ax, [si+23] push ax push 8 call grcg_round_boxfill push di lea ax, [si+24] push ax lea ax, [di+192] push ax lea ax, [si+47] push ax push 8 call grcg_round_boxfill push 128 push si push 319 lea ax, [si+23] push ax push 8 call grcg_round_boxfill GRCG_OFF_CLOBBERING dx push 152 lea ax, [si+4] push ax push 3 push ds push offset aGtgugegfgGuvSi ; "サブウェポンの選択" call graph_putsa_fx pop di pop si pop bp retn sub_D595 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame sub_D650 proc near push bp mov bp, sp cmp playchar_132B8, PLAYCHAR_REIMU jnz short loc_D664 push (184 shl 16) or 44 push 40 jmp short loc_D66C ; --------------------------------------------------------------------------- loc_D664: push (184 shl 16) or 44 push 41 loc_D66C: call cdg_put_noalpha call grcg_setcolor pascal, (GC_RMW shl 16) + 1 call grcg_byteboxfill_x pascal, ((440 / 8) shl 16) or 52, ((440 / 8) shl 16) or 287 call grcg_byteboxfill_x pascal, ((192 / 8) shl 16) or 288, ((440 / 8) shl 16) or 295 GRCG_OFF_CLOBBERING dx call sub_D595 mov al, byte_132B9 mov ah, 0 push ax call sub_D465 pop bp retn sub_D650 endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame playchar_menu_init proc near push bp mov bp, sp mov PaletteTone, 0 call far ptr palette_show call pi_slot_load pascal, 0, ds, offset aSlb1_pi graph_accesspage 1 graph_showpage 0 call pi_slot_palette_apply pascal, 0 call pi_slot_put pascal, large 0, 0 call sub_CF5E push 0 call sub_D338 push 1 call sub_D338 call sub_D3A2 call graph_copy_page pascal, 0 push 1 call palette_black_in pop bp retn playchar_menu_init endp ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame playchar_menu proc near var_2 = byte ptr -2 @@input_locked = byte ptr -1 enter 2, 0 push si push di les bx, _resident cmp es:[bx+resident_t.stage], STAGE_EXTRA jnz short loc_D78D xor di, di jmp short loc_D786 ; --------------------------------------------------------------------------- loc_D71D: mov [bp+var_2], 0 mov si, RANK_NORMAL jmp short loc_D735 ; --------------------------------------------------------------------------- loc_D726: mov bx, di imul bx, RANK_COUNT mov al, _cleared_with[bx+si] and al, 1 or [bp+var_2], al inc si loc_D735: cmp si, RANK_EXTRA jl short loc_D726 mov bx, di add bx, bx push bx cmp [bp+var_2], 0 jz short loc_D74A mov ax, 1 jmp short loc_D74C ; --------------------------------------------------------------------------- loc_D74A: xor ax, ax loc_D74C: pop bx mov _selectable_with[SHOTTYPE_A][bx], al mov [bp+var_2], 0 mov si, RANK_NORMAL jmp short loc_D769 ; --------------------------------------------------------------------------- loc_D75A: mov bx, di imul bx, RANK_COUNT mov al, _cleared_with[bx+si] and al, 2 or [bp+var_2], al inc si loc_D769: cmp si, RANK_EXTRA jl short loc_D75A mov bx, di add bx, bx push bx cmp [bp+var_2], 0 jz short loc_D77E mov ax, 1 jmp short loc_D780 ; --------------------------------------------------------------------------- loc_D77E: xor ax, ax loc_D780: pop bx mov _selectable_with[SHOTTYPE_B][bx], al inc di loc_D786: cmp di, PLAYCHAR_COUNT jl short loc_D71D jmp short loc_D7A1 ; --------------------------------------------------------------------------- loc_D78D: mov _selectable_with[PLAYCHAR_REIMU * PLAYCHAR_COUNT][SHOTTYPE_A], 1 mov _selectable_with[PLAYCHAR_REIMU * PLAYCHAR_COUNT][SHOTTYPE_B], 1 mov _selectable_with[PLAYCHAR_MARISA * PLAYCHAR_COUNT][SHOTTYPE_A], 1 mov _selectable_with[PLAYCHAR_MARISA * PLAYCHAR_COUNT][SHOTTYPE_B], 1 loc_D7A1: cmp _selectable_with[PLAYCHAR_REIMU * PLAYCHAR_COUNT][SHOTTYPE_A], 0 jnz short loc_D7AF cmp _selectable_with[PLAYCHAR_REIMU * PLAYCHAR_COUNT][SHOTTYPE_B], 0 jz short loc_D7B3 loc_D7AF: mov al, PLAYCHAR_REIMU jmp short loc_D7B5 ; --------------------------------------------------------------------------- loc_D7B3: mov al, PLAYCHAR_MARISA loc_D7B5: mov playchar_132B8, al loc_D7B8: call playchar_menu_init loc_D7BB: call far ptr _input_reset_sense cmp [bp+@@input_locked], 0 jnz loc_D8DF test _key_det.lo, low INPUT_LEFT jnz short loc_D7D6 test _key_det.lo, low INPUT_RIGHT jz short loc_D84C loc_D7D6: call snd_se_reset call snd_se_play pascal, 1 call snd_se_update mov al, 1 sub al, playchar_132B8 mov playchar_132B8, al mov ah, 0 add ax, ax mov bx, ax cmp _selectable_with[SHOTTYPE_A][bx], 0 jnz short loc_D816 mov al, playchar_132B8 mov ah, 0 add ax, ax mov bx, ax cmp _selectable_with[SHOTTYPE_B][bx], 0 jnz short loc_D816 mov al, 1 sub al, playchar_132B8 mov playchar_132B8, al loc_D816: graph_accesspage 1 call sub_D3A2 mov vsync_Count1, 0 push 1 call frame_delay graph_showpage 1 call graph_copy_page pascal, 0 mov vsync_Count1, 0 push 1 call frame_delay graph_showpage 0 loc_D84C: test _key_det.hi, high INPUT_OK jnz short loc_D85A test _key_det.lo, low INPUT_SHOT jz short loc_D8B2 loc_D85A: call snd_se_reset call snd_se_play pascal, 11 call snd_se_update mov al, playchar_132B8 mov ah, 0 add ax, ax mov bx, ax cmp _selectable_with[bx], 0 jz short loc_D87F mov al, 0 jmp short loc_D881 ; --------------------------------------------------------------------------- loc_D87F: mov al, 1 loc_D881: mov byte_132B9, al graph_accesspage 1 mov PaletteTone, 200 call far ptr palette_show call pi_slot_put pascal, large 0, 0 call sub_D650 call graph_copy_page pascal, 0 push 1 call palette_white_in loc_D8B0: jmp short loc_D8F4 ; --------------------------------------------------------------------------- loc_D8B2: test _key_det.hi, high INPUT_CANCEL jz short loc_D8D7 push 1 call palette_black_out call sub_D1F3 freePISlotLarge 0 mov ax, 1 jmp loc_DA0D ; --------------------------------------------------------------------------- loc_D8D7: mov al, _key_det.lo mov [bp+@@input_locked], al jmp short loc_D8EA ; --------------------------------------------------------------------------- loc_D8DF: cmp _key_det, INPUT_NONE jnz short loc_D8EA mov [bp+@@input_locked], 0 loc_D8EA: push 1 call frame_delay jmp loc_D7BB ; --------------------------------------------------------------------------- loc_D8F4: call far ptr _input_reset_sense cmp [bp+@@input_locked], 0 jnz loc_D9F8 test _key_det.lo, low INPUT_UP jnz short loc_D90F test _key_det.lo, low INPUT_DOWN jz short loc_D986 loc_D90F: mov al, 1 sub al, byte_132B9 mov byte_132B9, al mov al, playchar_132B8 mov ah, 0 add ax, ax mov dl, byte_132B9 mov dh, 0 add ax, dx mov bx, ax cmp _selectable_with[bx], 0 jnz short loc_D939 mov al, 1 sub al, byte_132B9 mov byte_132B9, al loc_D939: graph_accesspage 1 mov al, byte_132B9 mov ah, 0 push ax call sub_D465 mov vsync_Count1, 0 push 1 call frame_delay graph_showpage 1 call graph_copy_page pascal, 0 mov vsync_Count1, 0 push 1 call frame_delay graph_showpage 0 call snd_se_reset call snd_se_play pascal, 1 call snd_se_update loc_D986: test _key_det.hi, high INPUT_OK jnz short @@z_pressed test _key_det.lo, low INPUT_SHOT jz short loc_D9D5 @@z_pressed: call snd_se_reset call snd_se_play pascal, 11 call snd_se_update les bx, _resident mov al, byte_132B9 mov es:[bx+resident_t.shottype], al mov al, playchar_132B8 add al, '0' mov es:[bx+resident_t.playchar_ascii], al push 1 call palette_black_out call sub_D1F3 freePISlotLarge 0 xor ax, ax jmp short loc_DA0D ; --------------------------------------------------------------------------- loc_D9D5: test _key_det.hi, high INPUT_CANCEL jz short loc_D9F0 call sub_D1F3 freePISlotLarge 0 jmp loc_D7B8 ; --------------------------------------------------------------------------- loc_D9F0: mov al, _key_det.lo mov [bp+@@input_locked], al jmp short loc_DA03 ; --------------------------------------------------------------------------- loc_D9F8: cmp _key_det, INPUT_NONE jnz short loc_DA03 mov [bp+@@input_locked], 0 loc_DA03: push 1 call frame_delay jmp loc_D8B0 ; --------------------------------------------------------------------------- loc_DA0D: pop di pop si leave retn playchar_menu endp db 0 op_01_TEXT ends ; =========================================================================== ; Segment type: Pure code op_02_TEXT segment word public 'CODE' use16 assume cs:op_02_TEXT ;org 2 assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing include th01/hardware/vram_planes_set.asm include th02/hardware/frame_delay.asm include th02/formats/pi_slot_palette_apply.asm include th02/formats/pi_slot_put.asm include th02/formats/pi_slot_load.asm db 0 include th03/formats/hfliplut.asm include th04/hardware/input_wait.asm include th04/math/vector1_at.asm include th04/math/vector2_at.asm include th04/snd/pmd_res.asm include th02/snd/mmd_res.asm include th04/snd/kajaint.asm include th04/formats/cdg_put_nocolors.asm include th04/snd/detmodes.asm include th03/snd/delaymea.asm include th02/exit_dos.asm include th04/snd/load.asm include th04/hardware/grppsafx.asm include th04/formats/cdg_put.asm include th02/exit.asm include th02/initop.asm db 0 include th04/formats/cdg_put_noalpha.asm include th04/hardware/input_sense.asm include th04/snd/se.asm include th04/hardware/egccopyr.asm even include th04/bgimage.asm include th04/bgimage_put_rect.asm include th04/formats/cdg_load.asm extern FRAME_DELAY_2:proc op_02_TEXT ends .data db 0 unk_F3D1 db 0 db 0 db 0 db 0 db 0 db 0 db 0 db 0 db 0 db 0 _menu_sel db 0 _quit db 0 _main_menu_unused_1 db 1 public _MENU_DESC _MENU_DESC label dword dd aGqbGav ; "ゲームを開始します" dd aGgglgxgggigxge ; "エキストラステージを開始します" dd aMNVGngcgxgrgav ; "現在のハイスコアを表\示します" dd aIKyoVU ; "音楽室に入ります" dd aKeoarTsv ; "各種設定を変更出来ます" dd aVcvnvrvCVsvV ; "DOSに戻ります" dd aUqiUxv ; "難易度をやさしくします (初心者向け、・... dd aUqiUxv_1 ; "難易度を標準にします   (一般向け、・... dd aUqiUxv_0 ; "難易度を難しくします   (アーケーダ・... dd aUqiUxv_2 ; "難易度を非常に難しくします (シュータ・... dd aGqbGagxgBGgouv ; "ゲームスタート時の人数を変更出来ます(・... dd aGGavOgcpi ; "ボムの使用回数を変更出来ます(除くエキ・... dd aVavfvlvCmvVVV ; "BGMは流れません" dd aVavfvlvVqvuvji ; "BGMに26K音源互換を使用します" dd aVavfvlvVwvuiMM ; "BGMに86音源互換を使用します" dd aM_0 ; "効果音は流れません" dd aM_2 ; "効果音にFM音源を使用します" dd aM_1 ; "効果音にBeep音源を使用します" dd aUgtevSVvpPkvBa ; "敵弾の多い場所で、わざと処理落ち(スロ・... dd aPicacovV ; "処理落ちをマシンのスピードに任せます(・... dd aVVGigvgvgzguv ; "このオプションを全て標準に戻します" dd aGigvgvgzguv ; "オプションを終了します" dd aGqbGav_0 ; "ゲームを開始します(イージー)" dd aGqbGav_1 ; "ゲームを開始します(ノーマル)" dd aGqbGav_2 ; "ゲームを開始します(ハード)" dd aGqbGav_3 ; "ゲームを開始します(ルナティック)" _main_menu_initialized db 0 _option_initialized db 0 aMiko_cfg db 'MIKO.CFG',0 ; char aMain[] aMain db 'main',0 ; char path[] path db 'deb',0 aGqbGav db 'ゲームを開始します',0 aGgglgxgggigxge db 'エキストラステージを開始します',0 aMNVGngcgxgrgav db '現在のハイスコアを表示します',0 aIKyoVU db '音楽室に入ります',0 aKeoarTsv db '各種設定を変更出来ます',0 aVcvnvrvCVsvV db 'DOSに戻ります',0 aUqiUxv db '難易度をやさしくします (初心者向け、5面エンド)',0 aUqiUxv_1 db '難易度を標準にします   (一般向け、全6面)  ',0 aUqiUxv_0 db '難易度を難しくします   (アーケーダー向け)  ',0 aUqiUxv_2 db '難易度を非常に難しくします (シューター向け)  ',0 aGqbGagxgBGgouv db 'ゲームスタート時の人数を変更出来ます(除くエキストラ)',0 aGGavOgcpi db 'ボムの使用回数を変更出来ます(除くエキストラ)',0 aVavfvlvCmvVVV db 'BGMは流れません',0 aVavfvlvVqvuvji db 'BGMに26K音源互換を使用します',0 aVavfvlvVwvuiMM db 'BGMに86音源互換を使用します',0 aM_0 db '効果音は流れません',0 aM_2 db '効果音にFM音源を使用します',0 aM_1 db '効果音にBeep音源を使用します',0 aUgtevSVvpPkvBa db '敵弾の多い場所で、わざと処理落ち(スロー)させます(初心者用)',0 aPicacovV db '処理落ちをマシンのスピードに任せます(標準)',0 aVVGigvgvgzguv db 'このオプションを全て標準に戻します',0 aGigvgvgzguv db 'オプションを終了します',0 aGqbGav_0 db 'ゲームを開始します(イージー)',0 aGqbGav_1 db 'ゲームを開始します(ノーマル)',0 aGqbGav_2 db 'ゲームを開始します(ハード)',0 aGqbGav_3 db 'ゲームを開始します(ルナティック)',0 aOp1_pi db 'op1.pi',0 aOp db 'op',0 aMSzlEd_dat db '幻想郷ed.dat',0 asc_F7F7 db 0Ah db '空きメモリ不足です。メモリ空きを増やしてから実行してね',0Ah,0 aGameft_bft db 'GAMEFT.bft',0 aMiko db 'miko',0 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/gaiji_backup[data].asm include libs/master.lib/gaiji_entry_bfnt[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/respal_exist[data].asm include libs/master.lib/draw_trapezoid[data].asm include th02/formats/pfopen[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 th04/snd/snd[data].asm db 0 include th04/snd/load[data].asm include th04/hardware/grppsafx[data].asm include th03/snd/se_state[data].asm include th04/bgimage[data].asm include th03/formats/cdg[data].asm include th04/setup[data].asm include th04/zunsoft[data].asm public _MUSIC_TITLES _MUSIC_TITLES label dword dd aNo_1MSzlBLotus ; "No.1 幻想郷 〜 Lotus Land Story" dd aNo_2WitchingDr ; "No.2 Witching Dream " dd aNo_3SeleneSLig ; "No.3 Selene's light " dd aNo_4Sxp ; "No.4 装飾戦 〜 Decoration Battle" dd aNo_5BreakTheSa ; "No.5 Break the Sabbath " dd aNo_6NglLBScarl ; "No.6 紅響曲 〜 Scarlet Phoneme " dd aNo_7BadApple ; "No.7 Bad Apple!! " dd aNo_8CRab@bPerd ; "No.8 霊戦 〜 Perdition crisis " dd aNo_9GagkgxgGgg ; "No.9 アリスマエステラ " dd aNo_10Pnpcuyszl ; "No.10 少女綺想曲 〜 Capriccio " dd aNo_11RpvKab@bC ; "No.11 星の器 〜 Casket of Star " dd aNo_12LotusLove ; "No.12 Lotus Love " dd aNo_13CVVslXBSl ; "No.13 眠れる恐怖 〜Sleeping Terror" dd aNo_14DreamLand ; "No.14 Dream Land " dd aNo_15ChcB@bIna ; "No.15 幽夢 〜 Inanimate Dream " dd aNo_16LVVVsv ; "No.16 禁じざるをえない遊戯 " dd aNo_17GbgcghmSz ; "No.17 メイド幻想 〜 Icemilk Magic" dd aNo_18Vivavvvvi ; "No.18 かわいい悪魔 〜 Innocence " dd aNo_19Days ; "No.19 Days " dd aNo_20Peaceful ; "No.20 Peaceful " dd aNo_21ArcadianD ; "No.21 Arcadian Dream " dd aNo_22MSzvPzrl ; "No.22 幻想の住人 " dd asc_105B2 ; " " dd aB@b@vpvxvivf ; "   Quit " public _MUSIC_FILES _MUSIC_FILES label dword dd aOp_2 ; "op" dd aSt00 ; "st00" dd aSt10 ; "st10" dd aSt00b ; "st00b" dd aSt01 ; "st01" dd aSt01b ; "st01b" dd aSt02 ; "st02" dd aSt02b ; "st02b" dd aSt03 ; "st03" dd aSt03c ; "st03c" dd aSt03b ; "st03b" dd aSt04 ; "st04" dd aSt04b ; "st04b" dd aSt05 ; "st05" dd aSt05b ; "st05b" dd aSt06 ; "st06" dd aSt06b ; "st06b" dd aSt06c ; "st06c" dd aEnd1 ; "end1" dd aEnd2 ; "end2" dd aStaff ; "staff" dd aName_0 ; "name" include th02/music/polygons[data].asm music_track_playing db 0 aNo_1MSzlBLotus db 'No.1 幻想郷 〜 Lotus Land Story',0 aNo_2WitchingDr db 'No.2 Witching Dream ',0 aNo_3SeleneSLig db 'No.3 Selene',27h,'s light ',0 aNo_4Sxp db 'No.4 装飾戦 〜 Decoration Battle',0 aNo_5BreakTheSa db 'No.5 Break the Sabbath ',0 aNo_6NglLBScarl db 'No.6 紅響曲 〜 Scarlet Phoneme ',0 aNo_7BadApple db 'No.7 Bad Apple!! ',0 aNo_8CRab@bPerd db 'No.8 霊戦 〜 Perdition crisis ',0 aNo_9GagkgxgGgg db 'No.9 アリスマエステラ ',0 aNo_10Pnpcuyszl db 'No.10 少女綺想曲 〜 Capriccio ',0 aNo_11RpvKab@bC db 'No.11 星の器 〜 Casket of Star ',0 aNo_12LotusLove db 'No.12 Lotus Love ',0 aNo_13CVVslXBSl db 'No.13 眠れる恐怖 〜Sleeping Terror',0 aNo_14DreamLand db 'No.14 Dream Land ',0 aNo_15ChcB@bIna db 'No.15 幽夢 〜 Inanimate Dream ',0 aNo_16LVVVsv db 'No.16 禁じざるをえない遊戯 ',0 aNo_17GbgcghmSz db 'No.17 メイド幻想 〜 Icemilk Magic',0 aNo_18Vivavvvvi db 'No.18 かわいい悪魔 〜 Innocence ',0 aNo_19Days db 'No.19 Days ',0 aNo_20Peaceful db 'No.20 Peaceful ',0 aNo_21ArcadianD db 'No.21 Arcadian Dream ',0 aNo_22MSzvPzrl db 'No.22 幻想の住人 ',0 asc_105B2 db ' ',0 aB@b@vpvxvivf db '   Quit ',0 aOp_2 db 'op',0 aSt00 db 'st00',0 aSt10 db 'st10',0 aSt00b db 'st00b',0 aSt01 db 'st01',0 aSt01b db 'st01b',0 aSt02 db 'st02',0 aSt02b db 'st02b',0 aSt03 db 'st03',0 aSt03c db 'st03c',0 aSt03b db 'st03b',0 aSt04 db 'st04',0 aSt04b db 'st04b',0 aSt05 db 'st05',0 aSt05b db 'st05b',0 aSt06 db 'st06',0 aSt06b db 'st06b',0 aSt06c db 'st06c',0 aEnd1 db 'end1',0 aEnd2 db 'end2',0 aStaff db 'staff',0 aName_0 db 'name',0 include th04/music/music_cmt_load[data].asm aMusic_pi db 'music.pi',0 aGensou_scr db 'GENSOU.SCR',0 aName db 'name',0 aHi01_pi db 'hi01.pi',0 aOp1_pi_0 db 'op1.pi',0 aOp_0 db 'op',0 aScnum_bft db 'scnum.bft',0 aHi_m_bft db 'hi_m.bft',0 db 0 aSft1_cd2 db 'sft1.cd2',0 aSft2_cd2 db 'sft2.cd2',0 aCar_cd2 db 'car.cd2',0 aSl_cd2 db 'sl.cd2',0 aOp5b_pi db 'op5b.pi',0 aOp4b_pi db 'op4b.pi',0 aOp3b_pi db 'op3b.pi',0 aOp2b_pi db 'op2b.pi',0 aOp1b_pi db 'op1b.pi',0 aOp0b_pi db 'op0b.pi',0 aOp_1 db 'op',0 aOp1_pi_1 db 'op1.pi',0 db 0 aPLAYCHAR_NAME_AND_TITLE label dword dd aB@focasCBiiPcv ; " 博麗靈夢(巫女さん) " aPLAYCHAR_TYPE label dword dd aNlfINumvmB@ ; " 広範囲攻撃型  " dd aCIjcvcanBicvc@ ; " 霧雨魔理沙(魔法使い)" dd aNumvcPdolm ; " 攻撃力重視型 " aPLAYCHAR_SHOT label dword dd aB@GtbGGvgzgbgg ; "  サーチショット  " dd aGpgcghgvgzgbgg ; " ワイドショット " dd aGcgkgebGwgzgug ; "イリュージョンレーザー" dd aGigsgbghgvgzgb ; " ラピッドショット " aB@focasCBiiPcv db ' 博麗靈夢(巫女さん) ',0 aNlfINumvmB@ db ' 広範囲攻撃型  ',0 aCIjcvcanBicvc@ db ' 霧雨魔理沙(魔法使い)',0 aNumvcPdolm db ' 攻撃力重視型 ',0 aB@GtbGGvgzgbgg db '  サーチショット  ',0 aGpgcghgvgzgbgg db ' ワイドショット ',0 aGcgkgebGwgzgug db 'イリュージョンレーザー',0 aGigsgbghgvgzgb db ' ラピッドショット ',0 aStar db '☆',0 aGtgugegfgGuvSi db 'サブウェポンの選択',0 aSlb1_pi db 'slb1.pi',0 .data? public _resident _resident dd ? _in_option db ? db ? _putfunc dw ? _main_input_allowed db ? _option_input_allowed db ? include libs/master.lib/clip[bss].asm include libs/master.lib/fil[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 th01/hardware/vram_planes[bss].asm include libs/master.lib/pfint21[bss].asm include th02/formats/pi_slots[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/mem[bss].asm include th04/hardware/input[bss].asm include th04/hardware/egccopyr[bss].asm include th04/formats/cdg[bss].asm include th04/setup[bss].asm include th04/zunsoft[bss].asm dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; include th02/music/music[bss].asm byte_12DBE db ? db ? ; include th03/music/cmt_back[bss].asm include th02/music/music_cmt[bss].asm include th04/formats/scoredat_op[bss].asm _rank db ? public _cleared_with _cleared_with label byte _cleared_with_reimu db RANK_COUNT dup (?) _cleared_with_marisa db RANK_COUNT dup (?) _extra_unlocked db ? dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; dd ? ; db ? ; playchar_132B8 db ? byte_132B9 db ? dword_132BA dd ? dword_132BE dd ? extern _selectable_with:byte end