ReC98/th01_fuuin.asm

629 lines
15 KiB
NASM
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;
; +-------------------------------------------------------------------------+
; | This file has been generated by The Interactive Disassembler (IDA) |
; | Copyright (c) 2009 by Hex-Rays, <support@hex-rays.com> |
; +-------------------------------------------------------------------------+
;
; Input MD5 : 2CAAD6F798E32B912A08DA327A97DDB4
; File Name : th01/FUUIN.EXE
; Format : MS-DOS executable (EXE)
; Base Address: 0h Range: 0h-147E0h Loaded length: 13ED8h
; Entry Point : 0:0
; OS type : MS DOS
; Application type: Executable 16bit
.386
.model use16 large _TEXT
BINARY = 'E'
include ReC98.inc
include th01/th01.inc
extern SCOPY@:proc
extern __setargv__:proc ; main() needs both to be set
extern __setenvp__:proc
extern _execl:proc
fuuin_01 group fuuin_01_TEXT, fuuin_01__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/graph_400line.asm
include libs/master.lib/graph_clear.asm
include libs/master.lib/graph_show.asm
include libs/master.lib/graph_start.asm
include libs/master.lib/graph_scrollup.asm
include libs/master.lib/palette_show.asm
include libs/master.lib/palette_init.asm
include libs/master.lib/respal_exist.asm
include libs/master.lib/respal_free.asm
include libs/master.lib/resdata.asm
include libs/master.lib/file_read.asm
include libs/master.lib/file_close.asm
include libs/master.lib/file_ropen.asm
include libs/master.lib/file_seek.asm
include libs/master.lib/key_sense.asm
include libs/master.lib/dos_ropen.asm
include libs/master.lib/egc.asm
include libs/master.lib/gdc_outpw.asm
db 0
include libs/master.lib/random.asm
_TEXT ends
; ===========================================================================
; Segment type: Pure code
fuuin_01_TEXT segment byte public 'CODE' use16
fuuin_01_TEXT ends
fuuin_01__TEXT segment byte public 'CODE' use16
assume cs:fuuin_01
extern _end_init:proc
; =============== 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 _mdrv2_resident
or ax, ax
jnz short loc_A105
pop bp
retf
; ---------------------------------------------------------------------------
loc_A105:
les bx, [bp+_argv]
les bx, es:[bx+4]
mov al, es:[bx]
cbw
cmp ax, 74h ; 't'
jz short loc_A121
call _end_init
or ax, ax
jnz short loc_A11F
pop bp
retf
; ---------------------------------------------------------------------------
loc_A11F:
jmp short loc_A13E
; ---------------------------------------------------------------------------
loc_A121:
les bx, [bp+_argv]
les bx, es:[bx+4]
mov al, es:[bx+1]
cbw
cmp ax, 31h ; '1'
jnz short loc_A139
mov _end_flag, 1
jmp short loc_A13E
; ---------------------------------------------------------------------------
loc_A139:
mov _end_flag, 2
loc_A13E:
call _mdrv2_check_board
call _game_init
call sub_B945
call _game_switch_binary
push 0
push 0
push ds
push offset arg0 ; "op"
push ds
push offset path ; "op"
call _execl
add sp, 0Ch
pop bp
retf
_main endp
fuuin_01__TEXT ends
; ===========================================================================
fuuin_02_TEXT segment byte public 'CODE' use16
fuuin_02_TEXT ends
; ===========================================================================
; Segment type: Pure code
fuuin_03_TEXT segment byte public 'CODE' use16
assume cs:fuuin_03_TEXT
;org 5
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_B945 proc far
push bp
mov bp, sp
push si
push ds
push offset aIris_mdt ; "iris.mdt"
call _mdrv2_bgm_load
add sp, 4
call _mdrv2_bgm_play
call grp_palette_settone pascal, 0
call @end_pics_load_palette_show$qnxc pascal, ds, offset aEd1a_grp ; "ED1A.grp"
call @end_pic_show$qi stdcall, 0
pop cx
call grp_palette_black_in pascal, 6
call _frame_delay stdcall, 100
pop cx
call grp_palette_white_out pascal, 5
call _frame_delay stdcall, 100
pop cx
call @end_pic_show$qi stdcall, 1
pop cx
call grp_palette_settone pascal, 100
call _frame_delay stdcall, 13
pop cx
call @end_pic_show$qi stdcall, 2
pop cx
call _frame_delay stdcall, 13
pop cx
call @end_pic_show$qi stdcall, 3
pop cx
call _frame_delay stdcall, 50
pop cx
call @end_pics_load_palette_show$qnxc pascal, ds, offset aEd1b_grp ; "ED1B.grp"
call @end_pic_show$qi stdcall, 0
pop cx
call _frame_delay stdcall, 10
pop cx
call @end_pic_show$qi stdcall, 1
pop cx
call _frame_delay stdcall, 10
pop cx
call @end_pic_show$qi stdcall, 2
pop cx
call _frame_delay stdcall, 100
pop cx
call grp_palette_black_out pascal, 6
push 0
call _graph_accesspage_func
pop cx
call _z_graph_clear
call grp_palette_settone pascal, 100
call @end_pics_load_palette_show$qnxc pascal, ds, offset aEd1c_grp ; "ED1C.GRP"
xor si, si
jmp short loc_BA49
; ---------------------------------------------------------------------------
loc_BA28:
call @end_pic_show$qi stdcall, 0
pop cx
call _frame_delay stdcall, 20
pop cx
call @end_pic_show$qi stdcall, 1
pop cx
call _frame_delay stdcall, 20
pop cx
inc si
loc_BA49:
cmp si, 6
jl short loc_BA28
call @end_pic_show$qi stdcall, 0
pop cx
call _frame_delay stdcall, 40
pop cx
call @end_pic_show$qi stdcall, 2
pop cx
call _frame_delay stdcall, 40
pop cx
call @end_pics_load_palette_show$qnxc pascal, ds, offset aEd1d_grp ; "ED1D.GRP"
call @end_pic_show$qi stdcall, 3
pop cx
call _frame_delay stdcall, 70
pop cx
xor si, si
jmp loc_BB16
; ---------------------------------------------------------------------------
loc_BA8C:
or si, si
jnz short loc_BA98
call @end_pic_show$qi stdcall, 0
pop cx
loc_BA98:
cmp si, 14h
jnz short loc_BAA5
call @end_pic_show$qi stdcall, 1
pop cx
loc_BAA5:
cmp si, 18h
jnz short loc_BAB2
call @end_pic_show$qi stdcall, 2
pop cx
loc_BAB2:
cmp si, 1Ch
jnz short loc_BABF
call @end_pic_show$qi stdcall, 0
pop cx
loc_BABF:
cmp si, 32h ; '2'
jnz short loc_BACC
call @end_pic_show$qi stdcall, 1
pop cx
loc_BACC:
cmp si, 36h ; '6'
jnz short loc_BAD9
call @end_pic_show$qi stdcall, 2
pop cx
loc_BAD9:
cmp si, 3Ah ; ':'
jnz short loc_BAE6
call @end_pic_show$qi stdcall, 0
pop cx
loc_BAE6:
cmp si, 5Ah ; 'Z'
jnz short loc_BAF3
call @end_pic_show$qi stdcall, 1
pop cx
loc_BAF3:
cmp si, 5Eh ; '^'
jnz short loc_BB00
call @end_pic_show$qi stdcall, 2
pop cx
loc_BB00:
cmp si, 62h ; 'b'
jnz short loc_BB0D
call @end_pic_show$qi stdcall, 0
pop cx
loc_BB0D:
call _frame_delay stdcall, 2
pop cx
inc si
loc_BB16:
cmp si, 64h ; 'd'
jge short loc_BB1E
jmp loc_BA8C
; ---------------------------------------------------------------------------
loc_BB1E:
call @end_pic_show$qi stdcall, 3
pop cx
call _frame_delay stdcall, 60
pop cx
call @end_pic_show$qi stdcall, 0
pop cx
call _frame_delay stdcall, 20
pop cx
call @end_pic_show$qi stdcall, 3
pop cx
call grp_palette_settone pascal, 105
call @end_pics_load_palette_show$qnxc pascal, ds, offset aEd1e_grp ; "ED1E.GRP"
call @end_pic_show$qi stdcall, 0
pop cx
xor si, si
jmp short loc_BB79
; ---------------------------------------------------------------------------
loc_BB62:
mov ax, si
imul ax, 5
add ax, 110
call grp_palette_settone pascal, ax
call _frame_delay stdcall, 16
pop cx
inc si
loc_BB79:
cmp si, 4
jl short loc_BB62
xor si, si
jmp short loc_BBB1
; ---------------------------------------------------------------------------
loc_BB82:
call @end_pic_show$qi stdcall, 1
pop cx
call _frame_delay stdcall, 8
pop cx
call @end_pic_show$qi stdcall, 2
pop cx
call _frame_delay stdcall, 8
pop cx
mov ax, si
imul ax, 5
add ax, 130
call grp_palette_settone pascal, ax
inc si
loc_BBB1:
cmp si, 0Fh
jl short loc_BB82
mov ax, word ptr _continues_total
or ax, word ptr _continues_total+2
jnz short loc_BBC7
call @end_good$qv
call @boss_slides_animate$qv
jmp short loc_BBF1
; ---------------------------------------------------------------------------
loc_BBC7:
call @end_bad$qv
call _mdrv2_bgm_fade_out_nonblock
call grp_palette_black_out pascal, 10
call _z_graph_clear
call _mdrv2_bgm_stop
push ds
push offset aSt1_mdt ; "st1.mdt"
call _mdrv2_bgm_load
add sp, 4
call _mdrv2_bgm_play
loc_BBF1:
nopcall @verdict_animate_and_regist$qv
pop si
pop bp
retf
sub_B945 endp
@end_bad$qv procdesc near
@end_good$qv procdesc near
@boss_slides_animate$qv procdesc near
extern @verdict_animate_and_regist$qv:proc
fuuin_03_TEXT ends
; ===========================================================================
; Segment type: Pure code
fuuin_04_TEXT segment byte public 'CODE' use16
extern @END_PICS_LOAD_PALETTE_SHOW$QNXC:proc
extern @end_pic_show$qi:proc
extern _frame_delay:proc
extern GRP_PALETTE_SETTONE:proc
extern GRP_PALETTE_BLACK_OUT:proc
extern GRP_PALETTE_BLACK_IN:proc
extern GRP_PALETTE_WHITE_OUT:proc
extern GRP_PALETTE_WHITE_IN:proc
fuuin_04_TEXT ends
; ===========================================================================
; Segment type: Pure code
vsync_TEXT segment byte public 'CODE' use16
vsync_TEXT ends
; ===========================================================================
ztext_TEXT segment byte public 'CODE' use16
ztext_TEXT ends
; ===========================================================================
; Segment type: Pure code
initexit_TEXT segment byte public 'CODE' use16
extern _game_init:proc
extern _game_switch_binary:proc
initexit_TEXT ends
; ===========================================================================
; Segment type: Pure code
graph_TEXT segment byte public 'CODE' use16
extern _graph_accesspage_func:proc
extern _z_graph_clear:proc
graph_TEXT ends
; ===========================================================================
grppffx_TEXT segment byte public 'CODE' use16
grppffx_TEXT ends
; ===========================================================================
PTN_GRP_GRZ segment byte public 'CODE' use16
PTN_GRP_GRZ ends
; ===========================================================================
SHARED segment byte public 'CODE' use16
SHARED ends
; ===========================================================================
; Segment type: Pure code
GRAPH_EX_TEXT segment byte public 'CODE' use16
GRAPH_EX_TEXT ends
; ===========================================================================
; Segment type: Pure code
mdrv2_TEXT segment byte public 'CODE' use16
extern _mdrv2_resident:proc
extern _mdrv2_bgm_load:proc
extern _mdrv2_bgm_play:proc
extern _mdrv2_bgm_stop:proc
extern _mdrv2_bgm_fade_out_nonblock:proc
extern _mdrv2_check_board:proc
mdrv2_TEXT ends
.data
public _score, _score_highest
public _RES_ID_0, _RES_ID_1, _ERROR_END_FLAG, _ERROR_NO_RESDATA
_score dd 100000
_score_highest dd 100000
_RES_ID_0 db 'ReiidenConfig',0
_ERROR_END_FLAG db 'ERROR : end_flag is not ture !!',0
_ERROR_NO_RESDATA db 'ERROR : cfg_id is not alloc!!',0
_RES_ID_1 db 'ReiidenConfig',0
; char path[]
path db 'op',0
; char arg0[3]
arg0 db 'op',0
db 0
include th01/hardware/input_main_end[data].asm
dd 0
include th01/hiscore/alphabet_syms[data].asm
include th01/hardware/grppfnfx_ptrs[data].asm
include th01/hiscore/regist_name[data].asm
include th01/hardware/grppfnfx[data].asm
include th01/hiscore/scorelod[data].asm
include th01/hiscore/regist[data].asm
public _VERDICT_TITLES
_VERDICT_TITLES label dword
dd aB@gvguglbB@ ; "<22>@<40><><EFBFBD><EFBFBD><EFBFBD>L<EFBFBD>[<5B>@"
dd aB@cRlio ; "<22>@<40>ސl<DE90><6C>"
dd aGzgvgtgsgggugx ; "<22>z<EFBFBD><7A><EFBFBD>T<EFBFBD>s<EFBFBD>G<EFBFBD><47><EFBFBD>X"
dd aB@tRl ; "<22>@<40><><EFBFBD>l"
dd aB@sR_b@ ; "<22>@<40>ː_<CB90>@"
dd aB@r_v ; "<22>@<40>_<EFBFBD>𒴉z"
dd aVioqclgqbGB ; "<22><><EFBFBD>q<EFBFBD>l<EFBFBD>Q<EFBFBD>[<5B>}<7D>["
dd aOcf ; "<22><><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>R<EFBFBD>A<EFBFBD><41><EFBFBD>["
dd aGGhglgxgrgagib ; "<22>~<7E>h<EFBFBD><68><EFBFBD>X<EFBFBD>R<EFBFBD>A<EFBFBD><41><EFBFBD>["
dd aGngcgxgrgagib ; "<22>n<EFBFBD>C<EFBFBD>X<EFBFBD>R<EFBFBD>A<EFBFBD><41><EFBFBD>["
dd aGxbGpbGqbGB ; "<22>X<EFBFBD>[<5B>p<EFBFBD>[<5B>Q<EFBFBD>[<5B>}<7D>["
dd aGqbGBV ; "<22>Q<EFBFBD>[<5B>}<7D>[<5B>𒴉z"
dd aXevVVViv ; "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>݂<EFBFBD><DD82><EFBFBD>"
dd aGugbgnbGavO ; "<22>U<EFBFBD>b<EFBFBD>N<EFBFBD>[<5B><><EFBFBD>̎<EFBFBD>"
dd aLTfvCMc ; "<22>֒f<D692>̗ь<CC97>"
dd aRvkeo ; "<22><><EFBFBD>E<EFBFBD><45><EFBFBD>̗t"
dd aIitsluucr_tomo ; "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>_<EFBFBD>O<EFBFBD>o"
dd aB@gagagkg ; "<22>@<40>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>^"
public _ranks
_ranks label dword
dd DGROUP:0763h
dd DGROUP:076Ah
dd DGROUP:0771h
dd DGROUP:0778h
; Group 0
aB@gvguglbB@ db '<27>@<40><><EFBFBD><EFBFBD><EFBFBD>L<EFBFBD>[<5B>@',0
aB@cRlio db '<27>@<40>ސl<DE90><6C>',0
aGzgvgtgsgggugx db '<27>z<EFBFBD><7A><EFBFBD>T<EFBFBD>s<EFBFBD>G<EFBFBD><47><EFBFBD>X',0
aB@tRl db '<27>@<40><><EFBFBD>l',0
aB@sR_b@ db '<27>@<40>ː_<CB90>@',0
aB@r_v db '<27>@<40>_<EFBFBD>𒴉z',0
; Group 1
aVioqclgqbGB db '<27><><EFBFBD>q<EFBFBD>l<EFBFBD>Q<EFBFBD>[<5B>}<7D>[',0
aOcf db '<27><><EFBFBD><EFBFBD><EFBFBD>X<EFBFBD>R<EFBFBD>A<EFBFBD><41><EFBFBD>[',0
aGGhglgxgrgagib db '<27>~<7E>h<EFBFBD><68><EFBFBD>X<EFBFBD>R<EFBFBD>A<EFBFBD><41><EFBFBD>[',0
aGngcgxgrgagib db '<27>n<EFBFBD>C<EFBFBD>X<EFBFBD>R<EFBFBD>A<EFBFBD><41><EFBFBD>[',0
aGxbGpbGqbGB db '<27>X<EFBFBD>[<5B>p<EFBFBD>[<5B>Q<EFBFBD>[<5B>}<7D>[',0
aGqbGBV db '<27>Q<EFBFBD>[<5B>}<7D>[<5B>𒴉z',0
; Group 2
aXevVVViv db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>݂<EFBFBD><DD82><EFBFBD>',0
aGugbgnbGavO db '<27>U<EFBFBD>b<EFBFBD>N<EFBFBD>[<5B><><EFBFBD>̎<EFBFBD>',0
aLTfvCMc db '<27>֒f<D692>̗ь<CC97>',0
aRvkeo db '<27><><EFBFBD>E<EFBFBD><45><EFBFBD>̗t',0
aIitsluucr_tomo db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>C<EFBFBD>_<EFBFBD>O<EFBFBD>o',0
aB@gagagkg db '<27>@<40>A<EFBFBD><41><EFBFBD><EFBFBD><EFBFBD>^',0
; char aIris_mdt[]
aIris_mdt db 'iris.mdt',0
aEd1a_grp db 'ED1A.grp',0
aEd1b_grp db 'ED1B.grp',0
aEd1c_grp db 'ED1C.GRP',0
aEd1d_grp db 'ED1D.GRP',0
aEd1e_grp db 'ED1E.GRP',0
; char aSt1_mdt[]
aSt1_mdt db 'st1.mdt',0
; th01/hardware/palette[data].asm
extern _z_Palettes:rgb_t:COLOR_COUNT
; libs/master.lib/grp[data].asm
extern graph_VramSeg:word
extern graph_VramWords:word
extern graph_VramLines:word
extern graph_VramZoom:word
; libs/master.lib/pal[data].asm
extern PaletteTone:word
extern PalettesInit:rgb_t:COLOR_COUNT
extern PaletteNote:word
extern ResPalSeg:word
; libs/master.lib/respal_exist[data].asm
IDLEN EQU 10
extern ResPalID:byte:IDLEN
; libs/master.lib/fil[data].asm
extern file_BufferSize:word
extern file_Handle:word
; libs/master.lib/dos_ropen[data].asm
extern file_sharingmode:word
; libs/master.lib/clip[data].asm
extern ClipXL:word
extern ClipXW:word
extern ClipXR:word
extern ClipYT:word
extern ClipYH:word
extern ClipYB:word
extern ClipYT_seg:word
extern ClipYB_adr:word
; libs/master.lib/rand[data].asm
extern random_seed:dword
.data?
public _continues_total, _continues_per_scene
_continues_total dd ?
_continues_per_scene dd SCENE_COUNT dup(?)
db 308 dup(?)
public _start_lives_extra, _end_flag, _rank
_start_lives_extra db ?
_end_flag db ? ; ZUN symbol [Strings]
_rank db ?
db ?
include th01/hiscore/hiscore[bss].asm
db ? ;
public _input_prev
_input_prev db 10 dup(?)
evendata
include th01/hardware/vsync[bss].asm
db 256 dup(?)
include th01/core/initexit[bss].asm
include th01/hardware/graph[bss].asm
db 80 dup(?)
include th01/formats/grp_palette[bss].asm
db 1136 dup(?)
include th01/formats/grp_buf[bss].asm
include th01/hardware/vram_planes[bss].asm
include libs/master.lib/pal[bss].asm
include libs/master.lib/fil[bss].asm
include libs/master.lib/clip[bss].asm
end