ReC98/th05_maine.asm

6738 lines
139 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 : 57F21130457B229B7ED74E30D2B6E6E5
; File Name : th05/MAINE.EXE
; Format : MS-DOS executable (EXE)
; Base Address: 0h Range: 0h-1C6F0h Loaded length: 128A6h
; Entry Point : 0:0
; OS type : MS DOS
; Application type: Executable 16bit
.386
.model use16 large _TEXT
BINARY = 'E'
include ReC98.inc
include th05/th05.inc
include th01/math/subpixel.inc
include th04/hardware/grppsafx.inc
extern _execl:proc
extern _tolower:proc
extern __ctype:byte
group_01 group CFG_LRES_TEXT, CUTSCENE_TEXT, maine_01_TEXT, maine_01__TEXT
g_SHARED group SHARED, SHARED_
; ===========================================================================
; Segment type: Pure code
_TEXT segment word public 'CODE' use16
assume cs:_TEXT
assume es:nothing, ds:_DATA, fs:nothing, gs:nothing
include libs/master.lib/bfnt_entry_pat.asm
include libs/master.lib/bfnt_header_read.asm
include libs/master.lib/bfnt_header_analysis.asm
include libs/master.lib/atrtcmod.asm
include libs/master.lib/bcloser.asm
include libs/master.lib/bfill.asm
include libs/master.lib/bfnt_palette_set.asm
include libs/master.lib/bgetc.asm
include libs/master.lib/palette_black_in.asm
include libs/master.lib/palette_black_out.asm
include libs/master.lib/bopenr.asm
include libs/master.lib/bread.asm
include libs/master.lib/bseek.asm
include libs/master.lib/bseek_.asm
include libs/master.lib/dos_axdx.asm
include libs/master.lib/dos_filesize.asm
include libs/master.lib/dos_keyclear.asm
include libs/master.lib/dos_read.asm
include libs/master.lib/dos_seek.asm
include libs/master.lib/dos_setvect.asm
include libs/master.lib/egc.asm
include libs/master.lib/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_size.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_circlefill.asm
include libs/master.lib/grc_setclip.asm
include libs/master.lib/grcg_hline.asm
include libs/master.lib/grcg_pset.asm
include libs/master.lib/grcg_setcolor.asm
include libs/master.lib/grcg_vline.asm
include libs/master.lib/gdc_outpw.asm
include libs/master.lib/get_machine_98.asm
include libs/master.lib/get_machine_at.asm
include libs/master.lib/get_machine_dosbox.asm
include libs/master.lib/check_machine_fmr.asm
include libs/master.lib/get_machine.asm
include libs/master.lib/gaiji_putca.asm
include libs/master.lib/gaiji_putsa.asm
include libs/master.lib/graph_400line.asm
include libs/master.lib/graph_clear.asm
include libs/master.lib/graph_copy_page.asm
include libs/master.lib/graph_extmode.asm
include libs/master.lib/graph_hide.asm
include libs/master.lib/graph_pi_free.asm
include libs/master.lib/graph_pi_load_pack.asm
include libs/master.lib/graph_scrollup.asm
include libs/master.lib/graph_show.asm
include libs/master.lib/iatan2.asm
include libs/master.lib/isqrt.asm
include libs/master.lib/js_end.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/text_putsa.asm
include libs/master.lib/vsync.asm
include libs/master.lib/vsync_wait.asm
include libs/master.lib/palette_white_in.asm
include libs/master.lib/palette_white_out.asm
include libs/master.lib/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/super_convert_tiny.asm
include libs/master.lib/super_put_tiny_small.asm
include libs/master.lib/js_start.asm
include libs/master.lib/js_sense.asm
include libs/master.lib/bgm_bell_org.asm
include libs/master.lib/bgm_mget.asm
include libs/master.lib/bgm_read_sdata.asm
include libs/master.lib/bgm_timer.asm
include libs/master.lib/bgm_pinit.asm
include libs/master.lib/bgm_timerhook.asm
include libs/master.lib/bgm_play.asm
include libs/master.lib/bgm_sound.asm
include libs/master.lib/bgm_effect_sound.asm
include libs/master.lib/bgm_stop_play.asm
include libs/master.lib/bgm_set_tempo.asm
include libs/master.lib/bgm_init_finish.asm
include libs/master.lib/bgm_stop_sound.asm
include libs/master.lib/graph_pack_put_8_noclip.asm
include libs/master.lib/graph_gaiji_puts.asm
include libs/master.lib/graph_gaiji_putc.asm
include libs/master.lib/pfint21.asm
db 0
include th03/formats/pfopen.asm
include libs/master.lib/pf_str_ieq.asm
_TEXT ends
; ===========================================================================
CFG_LRES_TEXT segment byte public 'CODE' use16
_cfg_load_resident_ptr procdesc near
CFG_LRES_TEXT ends
; Segment type: Pure code
CUTSCENE_TEXT segment byte public 'CODE' use16
assume cs:group_01
;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
; int __stdcall sub_A576(char *arg0)
sub_A576 proc near
_arg0 = dword ptr 4
push bp
mov bp, sp
call cdg_free_all
call graph_hide
call text_clear
call _game_exit
pushd 0
pushd [bp+_arg0] ; arg0
pushd [bp+_arg0] ; path
call _execl
add sp, 0Ch
pop bp
retn 4
sub_A576 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A5A4 proc near
push bp
mov bp, sp
les bx, _resident
cmp es:[bx+resident_t.end_sequence], ES_CONTINUED
jnz short loc_A5BD
les bx, off_10190
mov byte ptr es:[bx+3], '0'
jmp short loc_A5DC
; ---------------------------------------------------------------------------
loc_A5BD:
les bx, _resident
cmp es:[bx+resident_t.end_sequence], ES_EXTRA
jnz short loc_A5D3
les bx, off_10190
mov byte ptr es:[bx+3], '2'
jmp short loc_A5DC
; ---------------------------------------------------------------------------
loc_A5D3:
les bx, off_10190
mov byte ptr es:[bx+3], '1'
loc_A5DC:
les bx, _resident
mov al, es:[bx+resident_t.playchar]
add al, '0'
les bx, off_10190
mov es:[bx+4], al
push word ptr off_10190+2
push bx
call @cutscene_script_load$qnxc
call @cutscene_animate$qv
pop bp
retn
sub_A5A4 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
; int __cdecl main(int argc, const char **argv, const char **envp)
public _main
_main proc far
_argc = word ptr 6
_argv = dword ptr 8
_envp = dword ptr 0Ch
push bp
mov bp, sp
call _cfg_load_resident_ptr
or ax, ax
jz loc_A693
mov _mem_assign_paras, MEM_ASSIGN_PARAS_MAINE
call game_init_main pascal, ds, offset aKaikidan1_dat
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
call graph_show
les bx, _resident
mov eax, es:[bx+resident_t.rand]
mov random_seed, eax
call frame_delay pascal, 100
les bx, _resident
cmp es:[bx+resident_t.end_sequence], ES_CONTINUED
jb short loc_A665
call sub_A5A4
call sub_E41D
jmp short loc_A679
; ---------------------------------------------------------------------------
loc_A665:
les bx, _resident
cmp es:[bx+resident_t.end_sequence], ES_EXTRA
jnz short loc_A67E
call sub_A5A4
call sub_B3CB
call sub_D1B1
loc_A679:
call sub_C1DD
jmp short loc_A684
; ---------------------------------------------------------------------------
loc_A67E:
call sub_C1DD
call sub_D1B1
loc_A684:
kajacall KAJA_SONG_FADE, 4
push ds
push offset arg0 ; "op"
call sub_A576
loc_A693:
pop bp
retf
_main endp
@CUTSCENE_SCRIPT_LOAD$QNXC procdesc pascal near \
fn:dword
@cutscene_animate$qv procdesc pascal near
CUTSCENE_TEXT ends
maine_01_TEXT segment byte public 'CODE' use16
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_B1B5 proc near
@@str = dword ptr -4
enter 4, 0
push si
push di
mov bx, allcast_step
shl bx, 2
mov ax, word ptr (ALLCAST_PTRS+2)[bx]
mov dx, word ptr ALLCAST_PTRS[bx]
mov word ptr [bp+@@str+2], ax
mov word ptr [bp+@@str], dx
mov bx, allcast_screen_plus_one
add bx, bx
mov ax, word ptr ALLCAST_LINES_PER_SCREEN[bx]
dec ax
shl ax, 4
mov dx, 192
sub dx, ax
mov ax, allcast_line_on_screen
shl ax, 5
add dx, ax
mov si, dx
mov _graph_putsa_fx_func, (FX_MASK_END - 1)
xor di, di
jmp short loc_B21E
; ---------------------------------------------------------------------------
loc_B1F7:
call graph_putsa_fx pascal, 64, si, V_WHITE, large [bp+@@str]
call sub_B37C
call graph_putsa_fx pascal, 64, si, V_WHITE, large [bp+@@str]
call sub_B37C
dec _graph_putsa_fx_func
inc di
loc_B21E:
cmp di, FX_MASK
jl short loc_B1F7
mov _graph_putsa_fx_func, FX_WEIGHT_BOLD
call graph_putsa_fx pascal, 64, si, V_WHITE, large [bp+@@str]
call sub_B37C
call graph_putsa_fx pascal, 64, si, V_WHITE, large [bp+@@str]
call sub_B37C
inc allcast_step
inc allcast_line_on_screen
mov bx, allcast_screen_plus_one
add bx, bx
mov ax, word ptr ALLCAST_LINES_PER_SCREEN[bx]
cmp ax, allcast_line_on_screen
jg short loc_B26D
mov allcast_line_on_screen, 0
mov al, 1
jmp short loc_B26F
; ---------------------------------------------------------------------------
loc_B26D:
mov al, 0
loc_B26F:
pop di
pop si
leave
retn
sub_B1B5 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_B273 proc near
@@quarter = word ptr -2
arg_0 = word ptr 4
arg_2 = word ptr 6
enter 2, 0
push si
push di
mov di, [bp+arg_2]
mov al, playchar_15018
mov ah, 0
shl ax, 4
mov dx, allcast_screen_plus_one
add dx, dx
add ax, dx
mov bx, ax
mov ax, word ptr _ALLCAST_BG_QUARTER[bx]
mov [bp+@@quarter], ax
push 2
call palette_black_out
call grcg_setcolor pascal, (GC_RMW shl 16) + 0Eh
graph_accesspage 1
call grcg_byteboxfill_x pascal, large 0, (((RES_X - 1) / 8) shl 16) or (RES_Y - 1)
graph_accesspage 0
call grcg_byteboxfill_x pascal, large 0, (((RES_X - 1) / 8) shl 16) or (RES_Y - 1)
call sub_B37C
GRCG_OFF_CLOBBERING dx
mov PaletteTone, 100
call far ptr palette_show
call pi_palette_apply pascal, 0
xor si, si
jmp short loc_B309
; ---------------------------------------------------------------------------
loc_B2EE:
push di
push [bp+arg_0]
push 0
push [bp+@@quarter]
mov ax, si
mov bx, 4
cwd
idiv bx
push ax
call pi_put_quarter_masked_8
call sub_B37C
inc si
loc_B309:
cmp si, 8
jl short loc_B2EE
call pi_put_quarter_8 pascal, di, [bp+arg_0], 0, [bp+@@quarter]
call sub_B37C
call pi_put_quarter_8 pascal, di, [bp+arg_0], 0, [bp+@@quarter]
inc allcast_screen_plus_one
cmp allcast_screen_plus_one, 8
jge short loc_B357
push 0
mov al, playchar_15018
mov ah, 0
shl ax, 5
mov dx, allcast_screen_plus_one
shl dx, 2
add ax, dx
mov bx, ax
pushd _ALLCAST_BG_FN[bx]
call pi_load
loc_B357:
add word_15012, 2
loc_B35C:
call sub_B37C
or al, al
jz short loc_B35C
call sub_B1B5
or al, al
jz short loc_B357
add word_15012, 1Eh
loc_B36F:
call sub_B37C
or al, al
jz short loc_B36F
pop di
pop si
leave
retn 4
sub_B273 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_B37C proc near
push bp
mov bp, sp
push 2
call frame_delay
graph_accesspage byte_1085E
mov al, 1
sub al, byte_1085E
mov byte_1085E, al
graph_showpage al
inc word_15010
call _snd_bgm_measure
mov measure_1500E, ax
cmp measure_1500E, 0
jge short loc_B3B9
mov ax, word_15010
mov bx, 22
cwd
idiv bx
mov measure_1500E, ax
loc_B3B9:
mov ax, measure_1500E
cmp ax, word_15012
jl short loc_B3C7
mov ax, 1
jmp short loc_B3C9
; ---------------------------------------------------------------------------
loc_B3C7:
xor ax, ax
loc_B3C9:
pop bp
retn
sub_B37C endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_B3CB proc near
push bp
mov bp, sp
mov allcast_step, 0
les bx, _resident
mov al, es:[bx+resident_t.playchar]
mov playchar_15018, al
mov PaletteTone, 0
call far ptr palette_show
call grcg_setcolor pascal, (GC_RMW shl 16) + 14
graph_accesspage 1
call grcg_byteboxfill_x pascal, large 0, (((RES_X - 1) / 8) shl 16) or (RES_Y - 1)
graph_accesspage 0
call grcg_byteboxfill_x pascal, large 0, (((RES_X - 1) / 8) shl 16) or (RES_Y - 1)
GRCG_OFF_CLOBBERING dx
mov allcast_screen_plus_one, 0
push 0
mov al, playchar_15018
mov ah, 0
shl ax, 5
mov bx, ax
pushd _ALLCAST_BG_FN[bx]
call pi_load
call pi_palette_apply pascal, 0
call snd_load pascal, ds, offset aExed, SND_LOAD_SONG
kajacall KAJA_SONG_PLAY
mov word_15012, 2
loc_B45F:
call sub_B37C
or al, al
jz short loc_B45F
mov PaletteTone, 100
call far ptr palette_show
push 0A00064h
call sub_B273
push 0A00064h
call sub_B273
push 0A00064h
call sub_B273
push 0A00064h
call sub_B273
push 0A00064h
call sub_B273
push 0A00064h
call sub_B273
push 0A00064h
call sub_B273
add word_15012, 10h
loc_B4B5:
call sub_B37C
or al, al
jz short loc_B4B5
push 4
call palette_black_out
call pi_free pascal, 0
graph_accesspage 0
graph_showpage al
pop bp
retn
sub_B3CB endp
include th04/formats/scoredat_decode.asm
include th04/formats/scoredat_encode.asm
include th05/formats/scoredat_recreate_maine.asm
include th05/formats/scoredat_load_for.asm
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_B6A3 proc near
push bp
mov bp, sp
push si
call scoredat_encode
push ds
push offset aGensou_scr_2 ; "GENSOU.SCR"
call file_append
mov al, playchar_15178
mov ah, 0
imul ax, 5
mov dl, _rank
mov dh, 0
add ax, dx
imul ax, size scoredat_section_t
movzx eax, ax
push eax
push 0
call file_seek
call file_write pascal, ds, offset _hi, size scoredat_section_t
xor si, si
jmp short loc_B723
; ---------------------------------------------------------------------------
loc_B6E2:
mov ax, si
imul ax, size scoredat_section_t
movzx eax, ax
push eax
push 0
call file_seek
call file_read pascal, ds, offset _hi, size scoredat_section_t
call scoredat_decode
call scoredat_encode
mov ax, si
imul ax, size scoredat_section_t
movzx eax, ax
push eax
push 0
call file_seek
call file_write pascal, ds, offset _hi, size scoredat_section_t
inc si
loc_B723:
cmp si, RANK_COUNT * PLAYCHAR_COUNT
jl short loc_B6E2
call file_close
pop si
pop bp
retn
sub_B6A3 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_B730 proc near
@@place = word ptr -2
enter 2, 0
mov [bp+@@place], (SCOREDAT_PLACES - 1)
jmp short loc_B78C
; ---------------------------------------------------------------------------
loc_B73B:
mov cx, 7
jmp short loc_B785
; ---------------------------------------------------------------------------
loc_B740:
les bx, _resident
add bx, cx
mov al, es:[bx+resident_t.score_last]
mov ah, 0
mov bx, [bp+@@place]
shl bx, 3
add bx, cx
mov dl, _hi.score.g_score[bx]
mov dh, 0
add dx, -gb_0_
cmp ax, dx
jg short loc_B789
les bx, _resident
add bx, cx
mov al, es:[bx+resident_t.score_last]
mov ah, 0
mov bx, [bp+@@place]
shl bx, 3
add bx, cx
mov dl, _hi.score.g_score[bx]
mov dh, 0
add dx, -gb_0_
cmp ax, dx
jl short loc_B799
dec cx
loc_B785:
or cx, cx
jge short loc_B740
loc_B789:
dec [bp+@@place]
loc_B78C:
cmp [bp+@@place], 0
jge short loc_B73B
mov _entered_place, 0
jmp short loc_B7AE
; ---------------------------------------------------------------------------
loc_B799:
cmp [bp+@@place], 4
jnz short loc_B7A6
mov _entered_place, -1
leave
retn
; ---------------------------------------------------------------------------
loc_B7A6:
mov al, byte ptr [bp+@@place]
inc al
mov _entered_place, al
loc_B7AE:
mov [bp+@@place], 3
jmp short loc_B807
; ---------------------------------------------------------------------------
loc_B7B5:
mov cx, 7
jmp short loc_B7D3
; ---------------------------------------------------------------------------
loc_B7BA:
mov bx, [bp+@@place]
imul bx, (SCOREDAT_NAME_LEN + 1)
add bx, cx
mov al, _hi.score.g_name[0 * (SCOREDAT_NAME_LEN + 1)][bx]
mov bx, [bp+@@place]
imul bx, (SCOREDAT_NAME_LEN + 1)
add bx, cx
mov _hi.score.g_name[1 * (SCOREDAT_NAME_LEN + 1)][bx], al
dec cx
loc_B7D3:
or cx, cx
jge short loc_B7BA
mov cx, SCORE_DIGITS - 1
jmp short loc_B7F5
; ---------------------------------------------------------------------------
loc_B7DC:
mov bx, [bp+@@place]
shl bx, 3
add bx, cx
mov al, _hi.score.g_score[0 * SCORE_DIGITS][bx]
mov bx, [bp+@@place]
shl bx, 3
add bx, cx
mov _hi.score.g_score[1 * SCORE_DIGITS][bx], al
dec cx
loc_B7F5:
or cx, cx
jge short loc_B7DC
mov bx, [bp+@@place]
mov al, _hi.score.g_stage+0[bx]
mov _hi.score.g_stage+1[bx], al
dec [bp+@@place]
loc_B807:
mov al, _entered_place
mov ah, 0
cmp ax, [bp+@@place]
jle short loc_B7B5
mov cx, (SCOREDAT_NAME_LEN - 1)
jmp short loc_B828
; ---------------------------------------------------------------------------
loc_B816:
mov al, _entered_place
mov ah, 0
imul ax, (SCOREDAT_NAME_LEN + 1)
add ax, cx
mov bx, ax
mov _hi.score.g_name[bx], gs_DOT
dec cx
loc_B828:
or cx, cx
jge short loc_B816
mov cx, SCOREDAT_NAME_LEN - 1
jmp short loc_B84F
; ---------------------------------------------------------------------------
loc_B831:
les bx, _resident
add bx, cx
mov al, es:[bx+resident_t.score_last]
add al, gb_0_
mov dl, _entered_place
mov dh, 0
shl dx, 3
add dx, cx
mov bx, dx
mov _hi.score.g_score[bx], al
dec cx
loc_B84F:
or cx, cx
jge short loc_B831
les bx, _resident
cmp es:[bx+resident_t.end_sequence], ES_EXTRA
jb short loc_B86C
mov al, _entered_place
mov ah, 0
mov bx, ax
mov _hi.score.g_stage[bx], gs_ALL
leave
retn
; ---------------------------------------------------------------------------
loc_B86C:
cmp _rank, RANK_EXTRA
jnb short loc_B88B
les bx, _resident
mov al, es:[bx+resident_t.stage]
add al, gb_1_
mov dl, _entered_place
mov dh, 0
mov bx, dx
mov _hi.score.g_stage[bx], al
leave
retn
; ---------------------------------------------------------------------------
loc_B88B:
mov al, _entered_place
mov ah, 0
mov bx, ax
mov _hi.score.g_stage[bx], gb_1_
leave
retn
sub_B730 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_B899 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 si, [bp+arg_2]
mov bx, [bp+arg_0]
cmp bx, 3
ja short loc_B90A
add bx, bx
jmp cs:off_B9B9[bx]
loc_B8B1:
mov di, 174
or si, si
jnz short loc_B8BD
mov ax, 88
jmp short loc_B907
; ---------------------------------------------------------------------------
loc_B8BD:
mov ax, si
shl ax, 4
add ax, 96
jmp short loc_B907
; ---------------------------------------------------------------------------
loc_B8C7:
mov di, 494
or si, si
jnz short loc_B8D3
mov ax, 88
jmp short loc_B907
; ---------------------------------------------------------------------------
loc_B8D3:
mov ax, si
shl ax, 4
add ax, 96
jmp short loc_B907
; ---------------------------------------------------------------------------
loc_B8DD:
mov di, 174
or si, si
jnz short loc_B8E9
mov ax, 224
jmp short loc_B907
; ---------------------------------------------------------------------------
loc_B8E9:
mov ax, si
shl ax, 4
add ax, 232
jmp short loc_B907
; ---------------------------------------------------------------------------
loc_B8F3:
mov di, 494
or si, si
jnz short loc_B8FF
mov ax, 224
jmp short loc_B907
; ---------------------------------------------------------------------------
loc_B8FF:
mov ax, si
shl ax, 4
add ax, 232
loc_B907:
mov [bp+@@y], ax
loc_B90A:
mov al, _entered_place
mov ah, 0
cmp ax, si
jnz short loc_B922
mov al, playchar_15178
mov ah, 0
cmp ax, [bp+arg_0]
jnz short loc_B922
mov ax, 0Ah
jmp short loc_B924
; ---------------------------------------------------------------------------
loc_B922:
xor ax, ax
loc_B924:
mov [bp+arg_0], ax
mov bx, si
shl bx, 3
mov al, _hi.score.g_score[bx][SCORE_DIGITS - 1]
mov ah, 0
add ax, -gb_0_
cmp ax, 10
jl short loc_B95E
lea ax, [di-32]
push ax
push [bp+@@y]
mov bx, si
shl bx, 3
mov al, _hi.score.g_score[bx][SCORE_DIGITS - 1]
mov ah, 0
add ax, -gb_0_
mov bx, 10
cwd
idiv bx
add ax, [bp+arg_0]
push ax
call super_put
loc_B95E:
lea ax, [di-16]
push ax
push [bp+@@y]
mov bx, si
shl bx, 3
mov al, _hi.score.g_score[bx][SCORE_DIGITS - 1]
mov ah, 0
add ax, -gb_0_
mov bx, 10
cwd
idiv bx
add dx, [bp+arg_0]
push dx
call super_put
mov [bp+var_2], 6
jmp short loc_B9AD
; ---------------------------------------------------------------------------
loc_B989:
push di
push [bp+@@y]
mov bx, si
shl bx, 3
add bx, [bp+var_2]
mov al, _hi.score.g_score[bx]
mov ah, 0
add ax, [bp+arg_0]
add ax, -gb_0_
push ax
call super_put
dec [bp+var_2]
add di, 16
loc_B9AD:
cmp [bp+var_2], 0
jge short loc_B989
pop di
pop si
leave
retn 4
sub_B899 endp
; ---------------------------------------------------------------------------
off_B9B9 dw offset loc_B8B1
dw offset loc_B8C7
dw offset loc_B8DD
dw offset loc_B8F3
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_B9C1 proc near
@@col = byte ptr -3
@@y = word ptr -2
@@gaiji = word ptr 4
arg_2 = word ptr 6
arg_4 = word ptr 8
enter 4, 0
push si
push di
mov si, [bp+arg_4]
mov al, _entered_place
mov ah, 0
cmp ax, si
jnz short loc_B9E1
mov al, playchar_15178
mov ah, 0
cmp ax, [bp+arg_2]
jnz short loc_B9E1
mov al, 7
jmp short loc_B9E3
; ---------------------------------------------------------------------------
loc_B9E1:
mov al, 2
loc_B9E3:
mov [bp+@@col], al
mov bx, [bp+arg_2]
cmp bx, 3
ja short loc_BA4E
add bx, bx
jmp cs:off_BA7C[bx]
loc_B9F5:
mov di, 294
or si, si
jnz short loc_BA01
mov ax, 88
jmp short loc_BA4B
; ---------------------------------------------------------------------------
loc_BA01:
mov ax, si
shl ax, 4
add ax, 96
jmp short loc_BA4B
; ---------------------------------------------------------------------------
loc_BA0B:
mov di, 614
or si, si
jnz short loc_BA17
mov ax, 88
jmp short loc_BA4B
; ---------------------------------------------------------------------------
loc_BA17:
mov ax, si
shl ax, 4
add ax, 96
jmp short loc_BA4B
; ---------------------------------------------------------------------------
loc_BA21:
mov di, 294
or si, si
jnz short loc_BA2D
mov ax, 224
jmp short loc_BA4B
; ---------------------------------------------------------------------------
loc_BA2D:
mov ax, si
shl ax, 4
add ax, 232
jmp short loc_BA4B
; ---------------------------------------------------------------------------
loc_BA37:
mov di, 614
or si, si
jnz short loc_BA43
mov ax, 224
jmp short loc_BA4B
; ---------------------------------------------------------------------------
loc_BA43:
mov ax, si
shl ax, 4
add ax, 232
loc_BA4B:
mov [bp+@@y], ax
loc_BA4E:
lea ax, [di+2]
push ax
mov ax, [bp+@@y]
add ax, 2
push ax
push [bp+@@gaiji]
push 14
call graph_gaiji_putc
push di
push [bp+@@y]
push [bp+@@gaiji]
mov al, [bp+@@col]
mov ah, 0
push ax
call graph_gaiji_putc
pop di
pop si
leave
retn 6
sub_B9C1 endp
; ---------------------------------------------------------------------------
db 0
off_BA7C dw offset loc_B9F5
dw offset loc_BA0B
dw offset loc_BA21
dw offset loc_BA37
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_BA84 proc near
arg_0 = byte ptr 4
arg_2 = byte ptr 6
@@place = word ptr 8
push bp
mov bp, sp
push si
push di
mov al, [bp+arg_2]
mov ah, 0
mov bx, ax
cmp bx, 3
ja short loc_BB00
add bx, bx
jmp cs:off_BBE7[bx]
loc_BA9C:
mov si, 8
cmp [bp+@@place], 0
jnz short loc_BAAA
mov ax, 88
jmp short loc_BAFE
; ---------------------------------------------------------------------------
loc_BAAA:
mov ax, [bp+@@place]
shl ax, 4
add ax, 96
jmp short loc_BAFE
; ---------------------------------------------------------------------------
loc_BAB5:
mov si, 328
cmp [bp+@@place], 0
jnz short loc_BAC3
mov ax, 88
jmp short loc_BAFE
; ---------------------------------------------------------------------------
loc_BAC3:
mov ax, [bp+@@place]
shl ax, 4
add ax, 96
jmp short loc_BAFE
; ---------------------------------------------------------------------------
loc_BACE:
mov si, 8
cmp [bp+@@place], 0
jnz short loc_BADC
mov ax, 224
jmp short loc_BAFE
; ---------------------------------------------------------------------------
loc_BADC:
mov ax, [bp+@@place]
shl ax, 4
add ax, 232
jmp short loc_BAFE
; ---------------------------------------------------------------------------
loc_BAE7:
mov si, 328
cmp [bp+@@place], 0
jnz short loc_BAF5
mov ax, 224
jmp short loc_BAFE
; ---------------------------------------------------------------------------
loc_BAF5:
mov ax, [bp+@@place]
shl ax, 4
add ax, 232
loc_BAFE:
mov di, ax
loc_BB00:
call bgimage_put_rect pascal, si, di, (130 shl 16) or 18
lea ax, [si+2]
push ax
lea ax, [di+2]
push ax
push GAIJI_W
mov ax, [bp+@@place]
imul ax, (SCOREDAT_NAME_LEN + 1)
add ax, offset _hi.score.g_name
push ds
push ax
push 14
call graph_gaiji_puts
push si
push di
push GAIJI_W
mov ax, [bp+@@place]
imul ax, (SCOREDAT_NAME_LEN + 1)
add ax, offset _hi.score.g_name
push ds
push ax
push 6
call graph_gaiji_puts
mov al, [bp+arg_0]
mov ah, 0
shl ax, 4
add ax, si
push ax
push di
mov bx, [bp+@@place]
imul bx, (SCOREDAT_NAME_LEN + 1)
mov al, [bp+arg_0]
mov ah, 0
add bx, ax
mov al, _hi.score.g_name[bx]
mov ah, 0
push ax
push 7
call graph_gaiji_putc
call grcg_setcolor pascal, (GC_RMW shl 16) + 7
mov al, [bp+arg_0]
mov ah, 0
shl ax, 4
add ax, si
push ax
mov al, [bp+arg_0]
mov ah, 0
shl ax, 4
add ax, si
add ax, 16
push ax
lea ax, [di+15]
push ax
call grcg_hline
lea ax, [si-2]
push ax
lea ax, [di-1]
push ax
lea ax, [di+16]
push ax
call grcg_vline
lea ax, [si+306]
push ax
lea ax, [di-1]
push ax
lea ax, [di+16]
push ax
call grcg_vline
lea ax, [si-2]
push ax
lea ax, [si+306]
push ax
lea ax, [di-1]
push ax
call grcg_hline
lea ax, [si-2]
push ax
lea ax, [si+306]
push ax
lea ax, [di+16]
push ax
call grcg_hline
GRCG_OFF_CLOBBERING dx
pop di
pop si
pop bp
retn 6
sub_BA84 endp
; ---------------------------------------------------------------------------
db 0
off_BBE7 dw offset loc_BA9C
dw offset loc_BAB5
dw offset loc_BACE
dw offset loc_BAE7
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_BBEF proc near
@@x = 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 bx, [bp+arg_0]
cmp bx, 3
ja short loc_BC67
add bx, bx
jmp cs:off_BCCB[bx]
loc_BC07:
mov [bp+@@x], 8
or si, si
jnz short loc_BC15
mov ax, 88
jmp short loc_BC65
; ---------------------------------------------------------------------------
loc_BC15:
mov ax, si
shl ax, 4
add ax, 96
jmp short loc_BC65
; ---------------------------------------------------------------------------
loc_BC1F:
mov [bp+@@x], 328
or si, si
jnz short loc_BC2D
mov ax, 88
jmp short loc_BC65
; ---------------------------------------------------------------------------
loc_BC2D:
mov ax, si
shl ax, 4
add ax, 96
jmp short loc_BC65
; ---------------------------------------------------------------------------
loc_BC37:
mov [bp+@@x], 8
or si, si
jnz short loc_BC45
mov ax, 224
jmp short loc_BC65
; ---------------------------------------------------------------------------
loc_BC45:
mov ax, si
shl ax, 4
add ax, 232
jmp short loc_BC65
; ---------------------------------------------------------------------------
loc_BC4F:
mov [bp+@@x], 328
or si, si
jnz short loc_BC5D
mov ax, 224
jmp short loc_BC65
; ---------------------------------------------------------------------------
loc_BC5D:
mov ax, si
shl ax, 4
add ax, 232
loc_BC65:
mov di, ax
loc_BC67:
push si
push [bp+arg_0]
call sub_B899
push si
push [bp+arg_0]
mov al, _hi.score.g_stage[si]
mov ah, 0
push ax
call sub_B9C1
mov al, playchar_15178
mov ah, 0
cmp ax, [bp+arg_0]
jnz short loc_BC8F
mov al, _entered_place
mov ah, 0
cmp ax, si
jz short loc_BCC4
loc_BC8F:
mov ax, [bp+@@x]
add ax, 2
push ax
lea ax, [di+2]
push ax
push GAIJI_W
mov ax, si
imul ax, (SCOREDAT_NAME_LEN + 1)
add ax, offset _hi.score.g_name
push ds
push ax
push 14
call graph_gaiji_puts
push [bp+@@x]
push di
push GAIJI_W
mov ax, si
imul ax, (SCOREDAT_NAME_LEN + 1)
add ax, offset _hi.score.g_name
push ds
push ax
push 2
call graph_gaiji_puts
loc_BCC4:
pop di
pop si
leave
retn 4
sub_BBEF endp
; ---------------------------------------------------------------------------
db 0
off_BCCB dw offset loc_BC07
dw offset loc_BC1F
dw offset loc_BC37
dw offset loc_BC4F
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_BCD3 proc near
arg_0 = word ptr 4
push bp
mov bp, sp
push si
xor si, si
jmp short loc_BCE3
; ---------------------------------------------------------------------------
loc_BCDB:
push si
push [bp+arg_0]
call sub_BBEF
inc si
loc_BCE3:
cmp si, 5
jl short loc_BCDB
pop si
pop bp
retn 2
sub_BCD3 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_BCED proc near
arg_0 = word ptr 4
arg_2 = word ptr 6
arg_4 = word ptr 8
push bp
mov bp, sp
push si
push di
mov si, [bp+arg_4]
mov di, [bp+arg_2]
mov ax, si
add ax, ax
add ax, 17h
push ax
lea ax, [di+15h]
push ax
mov bx, di
imul bx, ALPHABET_COLS
mov al, _gALPHABET[bx+si]
mov ah, 0
push ax
push [bp+arg_0]
call gaiji_putca
pop di
pop si
pop bp
retn 6
sub_BCED endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_BD1E proc near
push bp
mov bp, sp
call _snd_se_update
call sub_BE76
push 1
call frame_delay
graph_accesspage byte_11621
mov al, 1
sub al, byte_11621
mov byte_11621, al
graph_showpage al
pop bp
retn
sub_BD1E endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
GLYPHBALL_CELS = 4
PAT_GLYPHBALL_CLOUD = 20
PAT_GLYPHBALL_SPLASH = (PAT_GLYPHBALL_CLOUD + GLYPHBALL_CELS)
PAT_GLYPHBALL = (PAT_GLYPHBALL_SPLASH + GLYPHBALL_CELS)
GLYPHBALL_CLOUD_SPLASH_W = 32
GLYPHBALL_CLOUD_SPLASH_H = 32
GLYPHBALL_W = 16
GLYPHBALL_H = 16
GBP_FREE = 0
GBP_CLOUD_AT_ORIGIN = 1
GBP_FLOAT_TO_TARGET = 2
GBP_SPLASH_AT_TARGET = 3
GBP_DONE = 4
GBP_REMOVE_REQUEST = 5
glyphball_t struc
GB_phase db ?
GB_glyph db ?
GB_pos motion_t <?>
GB_target Point <?>
GB_angle db ?
GB_speed db ?
GB_phase_frame dw ?
db 6 dup (?)
glyphball_t ends
sub_BD46 proc near
arg_0 = byte ptr 4
arg_2 = byte ptr 6
arg_4 = word ptr 8
@@y = word ptr 0Ah
@@x = word ptr 0Ch
push bp
mov bp, sp
push si
push di
mov di, [bp+arg_4]
mov al, [bp+arg_0]
mov ah, 0
imul ax, size glyphball_t
add ax, offset _glyphballs
mov si, ax
cmp [si+glyphball_t.GB_phase], GBP_FREE
jz short loc_BD68
mov [si+glyphball_t.GB_phase], GBP_REMOVE_REQUEST
jmp short loc_BD68
; ---------------------------------------------------------------------------
loc_BD65:
call sub_BD1E
loc_BD68:
cmp [si+glyphball_t.GB_phase], GBP_FREE
jnz short loc_BD65
mov [si+glyphball_t.GB_phase], GBP_CLOUD_AT_ORIGIN
mov [si+glyphball_t.GB_phase_frame], 0
mov bx, [bp+@@y]
imul bx, ALPHABET_COLS
add bx, [bp+@@x]
mov al, _gALPHABET[bx]
mov [si+glyphball_t.GB_glyph], al
cmp [si+glyphball_t.GB_glyph], gs_SPACE
jnz short loc_BD8F
mov [si+glyphball_t.GB_glyph], g_EMPTY
loc_BD8F:
mov ax, [bp+@@x]
add ax, ax
add ax, 17h
shl ax, 4
shl ax, 3
add ax, ((GAIJI_W / 2) shl 4)
mov [si+glyphball_t.GB_pos.cur.x], ax
mov ax, [bp+@@y]
add ax, 15h
shl ax, 4
shl ax, 4
add ax, ((GLYPH_H / 2) shl 4)
mov [si+glyphball_t.GB_pos.cur.y], ax
call IRand
mov [si+glyphball_t.GB_angle], al
call IRand
mov bx, (4 shl 4)
cwd
idiv bx
add dl, (4 shl 4)
mov [si+glyphball_t.GB_speed], dl
mov al, [bp+arg_2]
mov ah, 0
mov bx, ax
cmp bx, 3
ja short loc_BE42
add bx, bx
jmp cs:off_BE6E[bx]
loc_BDE1:
mov [bp+@@x], 8
or di, di
jnz short loc_BDEF
mov ax, 88
jmp short loc_BE3F
; ---------------------------------------------------------------------------
loc_BDEF:
mov ax, di
shl ax, 4
add ax, 96
jmp short loc_BE3F
; ---------------------------------------------------------------------------
loc_BDF9:
mov [bp+@@x], 328
or di, di
jnz short loc_BE07
mov ax, 88
jmp short loc_BE3F
; ---------------------------------------------------------------------------
loc_BE07:
mov ax, di
shl ax, 4
add ax, 96
jmp short loc_BE3F
; ---------------------------------------------------------------------------
loc_BE11:
mov [bp+@@x], 8
or di, di
jnz short loc_BE1F
mov ax, 224
jmp short loc_BE3F
; ---------------------------------------------------------------------------
loc_BE1F:
mov ax, di
shl ax, 4
add ax, 232
jmp short loc_BE3F
; ---------------------------------------------------------------------------
loc_BE29:
mov [bp+@@x], 328
or di, di
jnz short loc_BE37
mov ax, 224
jmp short loc_BE3F
; ---------------------------------------------------------------------------
loc_BE37:
mov ax, di
shl ax, 4
add ax, 232
loc_BE3F:
mov [bp+@@y], ax
loc_BE42:
mov ax, [bp+@@x]
shl ax, 4
mov dl, [bp+arg_0]
mov dh, 0
shl dx, 4
shl dx, 4
add ax, dx
add ax, ((GAIJI_W / 2) shl 4)
mov [si+glyphball_t.GB_target.x], ax
mov ax, [bp+@@y]
shl ax, 4
add ax, ((GLYPH_H / 2) shl 4)
mov [si+glyphball_t.GB_target.y], ax
pop di
pop si
pop bp
retn 0Ah
sub_BD46 endp
; ---------------------------------------------------------------------------
db 0
off_BE6E dw offset loc_BDE1
dw offset loc_BDF9
dw offset loc_BE11
dw offset loc_BE29
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_BE76 proc near
var_8 = byte ptr -8
@@angle = byte ptr -7
@@top = word ptr -6
@@left = word ptr -4
@@patnum = word ptr -2
enter 8, 0
push si
push di
mov si, offset _glyphballs
xor di, di
jmp short loc_BECC
; ---------------------------------------------------------------------------
loc_BE83:
cmp [si+glyphball_t.GB_phase], GBP_FREE
jz short loc_BEC8
cmp [si+glyphball_t.GB_phase], GBP_DONE
jnz short loc_BE90
mov [si+glyphball_t.GB_phase], GBP_FREE
loc_BE90:
cmp [si+glyphball_t.GB_pos.prev.x], 0
jge short loc_BE9B
mov [si+glyphball_t.GB_pos.prev.x], 0
loc_BE9B:
cmp [si+glyphball_t.GB_pos.prev.y], 0
jge short loc_BEA6
mov [si+glyphball_t.GB_pos.prev.y], 0
loc_BEA6:
mov ax, [si+glyphball_t.GB_pos.prev.x]
mov bx, 16
cwd
idiv bx
add ax, -(GLYPHBALL_CLOUD_SPLASH_W / 2)
push ax
mov ax, [si+glyphball_t.GB_pos.prev.y]
cwd
idiv bx
add ax, -(GLYPHBALL_CLOUD_SPLASH_H / 2)
push ax
push (GLYPHBALL_CLOUD_SPLASH_W shl 16) or GLYPHBALL_CLOUD_SPLASH_H
call bgimage_put_rect
loc_BEC8:
inc di
add si, size glyphball_t
loc_BECC:
cmp di, SCOREDAT_NAME_LEN
jl short loc_BE83
mov al, _entered_place
mov ah, 0
push ax
push word ptr playchar_15178
push _entered_name_cursor
call sub_BA84
mov si, offset _glyphballs
xor di, di
jmp loc_C156
; ---------------------------------------------------------------------------
loc_BEEA:
cmp [si+glyphball_t.GB_phase], GBP_FREE
jz loc_C152
mov al, [si+glyphball_t.GB_phase]
mov ah, 0
dec ax
mov bx, ax
cmp bx, (GBP_REMOVE_REQUEST - 1)
ja @@put
add bx, bx
jmp cs:off_C162[bx]
@@cloud_at_origin:
mov eax, dword ptr [si+glyphball_t.GB_pos.cur]
mov dword ptr [si+glyphball_t.GB_pos.prev], eax
mov ax, [si+glyphball_t.GB_pos.cur.x]
mov bx, 16
cwd
idiv bx
add ax, -(GLYPHBALL_CLOUD_SPLASH_W / 2)
mov [bp+@@left], ax
mov ax, [si+glyphball_t.GB_pos.cur.y]
cwd
idiv bx
add ax, -(GLYPHBALL_CLOUD_SPLASH_H / 2)
mov [bp+@@top], ax
mov ax, [si+glyphball_t.GB_phase_frame]
shr ax, 1
add ax, PAT_GLYPHBALL_CLOUD
mov [bp+@@patnum], ax
cmp [bp+@@patnum], (PAT_GLYPHBALL_CLOUD + GLYPHBALL_CELS)
jl @@put
inc [si+glyphball_t.GB_phase]
@@float_to_target:
mov eax, dword ptr [si+glyphball_t.GB_pos.cur]
mov dword ptr [si+glyphball_t.GB_pos.prev], eax
lea ax, [si+glyphball_t.GB_pos.velocity]
push ax
pushd 0
mov al, [si+glyphball_t.GB_speed]
mov ah, 0
push ax
mov al, [si+glyphball_t.GB_angle]
mov ah, 0
push ax
call vector2_at
mov ax, [si+glyphball_t.GB_pos.velocity.x]
add [si+glyphball_t.GB_pos.cur.x], ax
mov ax, [si+glyphball_t.GB_pos.velocity.y]
add [si+glyphball_t.GB_pos.cur.y], ax
mov ax, [si+glyphball_t.GB_pos.cur.x]
mov bx, 16
cwd
idiv bx
add ax, -(GLYPHBALL_W / 2)
mov [bp+@@left], ax
mov ax, [si+glyphball_t.GB_pos.cur.y]
cwd
idiv bx
add ax, -(GLYPHBALL_H / 2)
mov [bp+@@top], ax
cmp [bp+@@left], 0
jge short loc_BF9F
mov [bp+@@left], 0
mov al, 80h
sub al, [si+glyphball_t.GB_angle]
mov [si+glyphball_t.GB_angle], al
mov word ptr [si+glyphball_t.GB_pos.cur.x], (8 shl 4)
jmp short loc_BFB8
; ---------------------------------------------------------------------------
loc_BF9F:
cmp [bp+@@left], (RES_X - GLYPHBALL_W)
jl short loc_BFB8
mov [bp+@@left], (RES_X - GLYPHBALL_W)
mov al, 80h
sub al, [si+glyphball_t.GB_angle]
mov [si+glyphball_t.GB_angle], al
mov word ptr [si+glyphball_t.GB_pos.cur.x], ((RES_X - (GLYPHBALL_W / 2)) shl 4)
loc_BFB8:
cmp [bp+@@top], 0
jge short loc_BFD2
mov [bp+@@top], 0
mov al, [si+glyphball_t.GB_angle]
neg al
mov [si+glyphball_t.GB_angle], al
mov word ptr [si+glyphball_t.GB_pos.cur.y], ((GLYPHBALL_H / 2) shl 4)
jmp short loc_BFEB
; ---------------------------------------------------------------------------
loc_BFD2:
cmp [bp+@@top], (RES_Y - GLYPHBALL_H)
jl short loc_BFEB
mov [bp+@@top], (RES_Y - GLYPHBALL_H)
mov al, [si+glyphball_t.GB_angle]
neg al
mov [si+glyphball_t.GB_angle], al
mov word ptr [si+glyphball_t.GB_pos.cur.y], ((RES_Y - (GLYPHBALL_H / 2)) shl 4)
loc_BFEB:
mov ax, [si+glyphball_t.GB_phase_frame]
shr ax, 2
and ax, 3
add ax, PAT_GLYPHBALL
mov [bp+@@patnum], ax
mov ax, [si+glyphball_t.GB_target.y]
sub ax, [si+glyphball_t.GB_pos.cur.y]
push ax
mov ax, [si+glyphball_t.GB_target.x]
sub ax, [si+glyphball_t.GB_pos.cur.x]
push ax
call iatan2
mov [bp+var_8], al
mov al, [si+glyphball_t.GB_angle]
sub al, [bp+var_8]
mov [bp+@@angle], al
cmp [bp+@@angle], 80h
jb short loc_C077
cmp [bp+@@angle], -2
jb short loc_C035
mov al, [bp+var_8]
mov [si+glyphball_t.GB_angle], al
cmp [si+glyphball_t.GB_speed], (8 shl 4)
jnb loc_C0CC
jmp short loc_C089
; ---------------------------------------------------------------------------
loc_C035:
cmp [bp+@@angle], -10h
jbe short loc_C04C
mov [bp+@@angle], 1
cmp [si+glyphball_t.GB_speed], (8 shl 4)
jnb short loc_C06F
mov al, [si+glyphball_t.GB_speed]
add al, 2
jmp short loc_C06C
; ---------------------------------------------------------------------------
loc_C04C:
mov al, [bp+@@angle]
mov ah, 0
push ax
mov ax, 256
pop dx
sub ax, dx
mov bx, 10h
cwd
idiv bx
mov [bp+@@angle], al
cmp [si+glyphball_t.GB_speed], 8
jbe short loc_C06F
mov al, [si+glyphball_t.GB_speed]
add al, -2
loc_C06C:
mov [si+glyphball_t.GB_speed], al
loc_C06F:
mov al, [bp+@@angle]
add [si+glyphball_t.GB_angle], al
jmp short loc_C0CC
; ---------------------------------------------------------------------------
loc_C077:
cmp [bp+@@angle], 2
ja short loc_C093
mov al, [bp+var_8]
mov [si+glyphball_t.GB_angle], al
cmp [si+glyphball_t.GB_speed], (8 shl 4)
jnb short loc_C0CC
loc_C089:
mov al, [si+glyphball_t.GB_speed]
add al, 2
mov [si+glyphball_t.GB_speed], al
jmp short loc_C0CC
; ---------------------------------------------------------------------------
loc_C093:
cmp [bp+@@angle], 10h
jnb short loc_C0AA
mov [bp+@@angle], 1
cmp [si+glyphball_t.GB_speed], (8 shl 4)
jnb short loc_C0C6
mov al, [si+glyphball_t.GB_speed]
add al, 2
jmp short loc_C0C3
; ---------------------------------------------------------------------------
loc_C0AA:
mov al, [bp+@@angle]
mov ah, 0
mov bx, 10h
cwd
idiv bx
mov [bp+@@angle], al
cmp [si+glyphball_t.GB_speed], 8
jbe short loc_C0C6
mov al, [si+glyphball_t.GB_speed]
add al, -2
loc_C0C3:
mov [si+glyphball_t.GB_speed], al
loc_C0C6:
mov al, [bp+@@angle]
sub [si+glyphball_t.GB_angle], al
loc_C0CC:
mov ax, [si+glyphball_t.GB_pos.cur.x]
sub ax, [si+glyphball_t.GB_target.x]
add ax, (4 shl 4)
cmp ax, (8 shl 4)
jnb short @@put
mov ax, [si+glyphball_t.GB_pos.cur.y]
sub ax, [si+glyphball_t.GB_target.y]
add ax, (4 shl 4)
cmp ax, (8 shl 4)
jnb short @@put
inc [si+glyphball_t.GB_phase]
mov [si+glyphball_t.GB_phase_frame], 0
mov al, _entered_place
mov ah, 0
imul ax, (SCOREDAT_NAME_LEN + 1)
mov dl, [si+glyphball_t.GB_glyph]
mov bx, ax
mov _hi.score.g_name[bx+di], dl
jmp short @@put
; ---------------------------------------------------------------------------
@@splash_at_target:
mov ax, [si+glyphball_t.GB_phase_frame]
shr ax, 2
add ax, PAT_GLYPHBALL_SPLASH
mov [bp+@@patnum], ax
cmp [bp+@@patnum], (PAT_GLYPHBALL_SPLASH + GLYPHBALL_CELS)
jl short loc_C118
inc [si+glyphball_t.GB_phase]
jmp short loc_C152
; ---------------------------------------------------------------------------
loc_C118:
mov eax, dword ptr [si+glyphball_t.GB_target]
mov dword ptr [si+glyphball_t.GB_pos.prev.x], eax
mov ax, [si+glyphball_t.GB_target.x]
mov bx, 16
cwd
idiv bx
add ax, -(GLYPHBALL_CLOUD_SPLASH_W / 2)
mov [bp+@@left], ax
mov ax, [si+glyphball_t.GB_target.y]
cwd
idiv bx
add ax, -(GLYPHBALL_CLOUD_SPLASH_H / 2)
mov [bp+@@top], ax
jmp short @@put
; ---------------------------------------------------------------------------
@@remove_request:
dec [si+glyphball_t.GB_phase]
jmp short loc_C152
; ---------------------------------------------------------------------------
@@put:
inc [si+glyphball_t.GB_phase_frame]
call super_put_rect pascal, [bp+@@left], [bp+@@top], [bp+@@patnum]
loc_C152:
inc di
add si, size glyphball_t
loc_C156:
cmp di, SCOREDAT_NAME_LEN
jl loc_BEEA
pop di
pop si
leave
retn
; ---------------------------------------------------------------------------
db 0
off_C162 dw offset @@cloud_at_origin
dw offset @@float_to_target
dw offset @@splash_at_target
dw offset @@put
dw offset @@remove_request
sub_BE76 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_C16C proc near
var_1 = byte ptr -1
enter 2, 0
push si
push di
mov [bp+var_1], 0
call snd_se_play pascal, 11
mov si, offset _glyphballs
xor di, di
jmp short loc_C1AF
; ---------------------------------------------------------------------------
loc_C184:
cmp [si+glyphball_t.GB_phase], GBP_CLOUD_AT_ORIGIN
jnz short loc_C18C
mov [si+glyphball_t.GB_phase], GBP_FLOAT_TO_TARGET
loc_C18C:
cmp [si+glyphball_t.GB_phase], GBP_FLOAT_TO_TARGET
jnz short loc_C1AB
mov ax, [si+glyphball_t.GB_target.y]
sub ax, [si+glyphball_t.GB_pos.cur.y]
push ax
mov ax, [si+glyphball_t.GB_target.x]
sub ax, [si+glyphball_t.GB_pos.cur.x]
push ax
call iatan2
mov [si+glyphball_t.GB_angle], al
mov [si+glyphball_t.GB_speed], (6 shl 4)
loc_C1AB:
inc di
add si, size glyphball_t
loc_C1AF:
cmp di, SCOREDAT_NAME_LEN
jl short loc_C184
loc_C1B4:
mov [bp+var_1], 0
xor di, di
mov si, offset _glyphballs
jmp short loc_C1CB
; ---------------------------------------------------------------------------
loc_C1BF:
cmp [si+glyphball_t.GB_phase], GBP_FREE
jz short loc_C1C7
inc [bp+var_1]
loc_C1C7:
inc di
add si, size glyphball_t
loc_C1CB:
cmp di, SCOREDAT_NAME_LEN
jl short loc_C1BF
call sub_BD1E
cmp [bp+var_1], 0
jnz short loc_C1B4
pop di
pop si
leave
retn
sub_C16C endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
include th02/hiscore/regist.inc
sub_C1DD proc near
var_8 = byte ptr -8
var_7 = byte ptr -7
@@initial_col = word ptr -6
var_4 = word ptr -4
var_2 = word ptr -2
enter 8, 0
push si
push di
mov [bp+var_7], 0
graph_accesspage 0
graph_showpage al
mov PaletteTone, 0
call far ptr palette_show
graph_accesspage 1
call pi_load pascal, 0, ds, offset aHi01_pi
call pi_palette_apply pascal, 0
call pi_put_8 pascal, large 0, 0
call pi_free pascal, 0
call graph_copy_page pascal, 0
call super_entry_bfnt pascal, ds, offset aScnum_bft ; "scnum.bft"
call super_entry_bfnt pascal, ds, offset aSctm0_bft ; "sctm0.bft"
call super_entry_bfnt pascal, ds, offset aSctm1_bft ; "sctm1.bft"
les bx, _resident
cmp es:[bx+resident_t.stage], STAGE_EXTRA
jnz short loc_C256
mov al, RANK_EXTRA
jmp short loc_C25E
; ---------------------------------------------------------------------------
loc_C256:
les bx, _resident
mov al, es:[bx+resident_t.rank]
loc_C25E:
mov _rank, al
les bx, _resident
mov al, es:[bx+resident_t.playchar]
mov playchar_15178, al
mov [bp+var_4], 0
jmp short loc_C28C
; ---------------------------------------------------------------------------
loc_C273:
mov al, playchar_15178
mov ah, 0
cmp ax, [bp+var_4]
jz short loc_C289
call scoredat_load_for pascal, [bp+var_4]
push [bp+var_4]
call sub_BCD3
loc_C289:
inc [bp+var_4]
loc_C28C:
cmp [bp+var_4], PLAYCHAR_COUNT
jl short loc_C273
mov al, playchar_15178
mov ah, 0
call scoredat_load_for pascal, ax
les bx, _resident
cmp es:[bx+resident_t.turbo_mode], 0
jnz short loc_C2AD
cmp _rank, RANK_EXTRA
jnz short loc_C2BB
loc_C2AD:
call sub_B730
mov al, playchar_15178
mov ah, 0
push ax
call sub_BCD3
jmp short loc_C2EB
; ---------------------------------------------------------------------------
loc_C2BB:
mov _entered_place, -1
mov al, playchar_15178
mov ah, 0
push ax
call sub_BCD3
call graph_putsa_fx pascal, (124 shl 16) or 196, 9, ds, offset aGxgnbGvbGhvVGv
call graph_putsa_fx pascal, (120 shl 16) or 192, 2, ds, offset aGxgnbGvbGhvV_0
loc_C2EB:
call _bgimage_snap
les bx, _resident
cmp es:[bx+resident_t.end_sequence], ES_EXTRA
jb short loc_C307
cmp es:[bx+resident_t.score_last], 0
jnz short loc_C307
mov _hi.score.cleared, SCOREDAT_CLEARED
loc_C307:
call graph_copy_page pascal, 1
call _bgimage_snap
kajacall KAJA_SONG_STOP
call snd_load pascal, ds, offset aName, SND_LOAD_SONG
kajacall KAJA_SONG_PLAY
push 2
call palette_black_in
cmp _entered_place, -1
jz loc_C5C3
mov al, _entered_place
mov ah, 0
push ax
push word ptr playchar_15178
push 0
call sub_BA84
graph_accesspage 0
mov al, _entered_place
mov ah, 0
push ax
push word ptr playchar_15178
push 0
call sub_BA84
graph_accesspage 1
mov [bp+var_4], 0
jmp short loc_C3AA
; ---------------------------------------------------------------------------
loc_C36F:
mov [bp+@@initial_col], 0
jmp short loc_C3A1
; ---------------------------------------------------------------------------
loc_C376:
mov ax, [bp+@@initial_col]
add ax, ax
add ax, 23
push ax
mov ax, [bp+var_4]
add ax, 21
push ax
mov bx, [bp+var_4]
imul bx, ALPHABET_COLS
add bx, [bp+@@initial_col]
mov al, _gALPHABET[bx]
mov ah, 0
push ax
push TX_WHITE
call gaiji_putca
inc [bp+@@initial_col]
loc_C3A1:
cmp [bp+@@initial_col], ALPHABET_COLS
jl short loc_C376
inc [bp+var_4]
loc_C3AA:
cmp [bp+var_4], ALPHABET_ROWS
jl short loc_C36F
push (23 shl 16) + 21
mov al, _gALPHABET
mov ah, 0
push ax
push TX_GREEN + TX_REVERSE
call gaiji_putca
xor si, si
xor di, di
mov [bp+var_2], 1
loc_C3CD:
call _input_reset_sense_held
cmp [bp+var_2], 0
jnz loc_C58A
test _key_det.lo, low INPUT_MOVEMENT
jz short loc_C438
push si
push di
push TX_WHITE
call sub_BCED
test _key_det.lo, low INPUT_UP
jz short loc_C3F1
dec di
loc_C3F1:
test _key_det.lo, low INPUT_DOWN
jz short loc_C3F9
inc di
loc_C3F9:
test _key_det.lo, low INPUT_LEFT
jz short loc_C401
dec si
loc_C401:
test _key_det.lo, low INPUT_RIGHT
jz short loc_C409
inc si
loc_C409:
or di, di
jge short loc_C412
mov di, (ALPHABET_ROWS - 1)
jmp short loc_C419
; ---------------------------------------------------------------------------
loc_C412:
cmp di, (ALPHABET_ROWS - 1)
jle short loc_C419
xor di, di
loc_C419:
or si, si
jge short loc_C422
mov si, (ALPHABET_COLS - 1)
jmp short loc_C429
; ---------------------------------------------------------------------------
loc_C422:
cmp si, (ALPHABET_COLS - 1)
jle short loc_C429
xor si, si
loc_C429:
push si
push di
push TX_GREEN + TX_REVERSE
call sub_BCED
call snd_se_play pascal, 1
loc_C438:
test _key_det.lo, low INPUT_SHOT
jnz short loc_C448
test _key_det.hi, high INPUT_OK
jz loc_C516
loc_C448:
mov bx, di
imul bx, ALPHABET_COLS
mov al, _gALPHABET[bx+si]
mov [bp+var_8], al
mov ah, 0
cmp ax, gs_ARROW_LEFT
jz short @@left
cmp ax, gs_ARROW_RIGHT
jz short @@right
cmp ax, gs_END
jz @@enter
jmp short loc_C4D4
; ---------------------------------------------------------------------------
@@left:
mov al, _entered_place
mov ah, 0
imul ax, (SCOREDAT_NAME_LEN + 1)
add ax, _entered_name_cursor
mov bx, ax
mov _hi.score.g_name[bx], g_EMPTY
mov bx, _entered_name_cursor
imul bx, size glyphball_t
cmp _glyphballs[bx].GB_phase, GBP_FREE
jz short loc_C496
mov bx, _entered_name_cursor
imul bx, size glyphball_t
mov _glyphballs[bx].GB_phase, GBP_REMOVE_REQUEST
loc_C496:
cmp _entered_name_cursor, 0
jle short loc_C4A1
dec _entered_name_cursor
loc_C4A1:
mov bx, _entered_name_cursor
imul bx, size glyphball_t
cmp _glyphballs[bx].GB_phase, GBP_FREE
jz short loc_C4BB
mov bx, _entered_name_cursor
imul bx, size glyphball_t
mov _glyphballs[bx].GB_phase, GBP_REMOVE_REQUEST
loc_C4BB:
call snd_se_play pascal, 4
jmp short loc_C516
; ---------------------------------------------------------------------------
@@right:
call snd_se_play pascal, 11
cmp _entered_name_cursor, (SCOREDAT_NAME_LEN - 1)
jge short loc_C516
jmp short loc_C512
; ---------------------------------------------------------------------------
loc_C4D4:
call snd_se_play pascal, 11
push si
push di
mov al, _entered_place
mov ah, 0
push ax
push word ptr playchar_15178
push _entered_name_cursor
call sub_BD46
cmp _entered_name_cursor, (SCOREDAT_NAME_LEN - 1)
jnz short loc_C50B
push si
push di
push TX_WHITE
call sub_BCED
mov si, ALPHABET_ENTER_COL
mov di, ALPHABET_ENTER_ROW
push si
push di
push TX_GREEN + TX_REVERSE
call sub_BCED
loc_C50B:
cmp _entered_name_cursor, (SCOREDAT_NAME_LEN - 1)
jge short loc_C516
loc_C512:
inc _entered_name_cursor
loc_C516:
test _key_det.lo, low INPUT_BOMB
jz short loc_C576
mov al, _entered_place
mov ah, 0
imul ax, (SCOREDAT_NAME_LEN + 1)
add ax, _entered_name_cursor
mov bx, ax
mov _hi.score.g_name[bx], g_EMPTY
mov bx, _entered_name_cursor
imul bx, size glyphball_t
cmp _glyphballs[bx].GB_phase, GBP_FREE
jz short loc_C54A
mov bx, _entered_name_cursor
imul bx, size glyphball_t
mov _glyphballs[bx].GB_phase, GBP_REMOVE_REQUEST
loc_C54A:
cmp _entered_name_cursor, 0
jle short loc_C555
dec _entered_name_cursor
loc_C555:
mov bx, _entered_name_cursor
imul bx, size glyphball_t
cmp _glyphballs[bx].GB_phase, GBP_FREE
jz short loc_C56F
mov bx, _entered_name_cursor
imul bx, size glyphball_t
mov _glyphballs[bx].GB_phase, GBP_REMOVE_REQUEST
loc_C56F:
call snd_se_play pascal, 4
loc_C576:
test _key_det.hi, high INPUT_CANCEL
jz short loc_C582
@@enter:
call sub_C16C
jmp short loc_C5BE
; ---------------------------------------------------------------------------
loc_C582:
mov ax, _key_det
mov [bp+var_2], ax
jmp short loc_C5B8
; ---------------------------------------------------------------------------
loc_C58A:
mov ax, _key_det
cmp ax, [bp+var_2]
jnz short loc_C5A8
inc [bp+var_7]
cmp [bp+var_7], 1Eh
jbe short loc_C5B8
test [bp+var_7], 1
jnz short loc_C5B8
mov [bp+var_2], 0
jmp short loc_C5B8
; ---------------------------------------------------------------------------
loc_C5A8:
cmp _key_det, INPUT_NONE
jnz short loc_C5B4
mov [bp+var_2], 0
loc_C5B4:
mov [bp+var_7], 0
loc_C5B8:
call sub_BD1E
jmp loc_C3CD
; ---------------------------------------------------------------------------
loc_C5BE:
call sub_B6A3
jmp short loc_C5CD
; ---------------------------------------------------------------------------
loc_C5C3:
call sub_B6A3
call input_wait_for_change pascal, 0
loc_C5CD:
call _bgimage_free
call super_free
call text_clear
push 1
call palette_black_out
pop di
pop si
leave
retn
sub_C1DD endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_C5E7 proc near
var_6 = word ptr -6
@@g_str = byte ptr -4
arg_0 = word ptr 4
@@y = word ptr 6
@@x = word ptr 8
enter 6, 0
push si
xor si, si
mov [bp+@@g_str], 2
mov ax, [bp+arg_0]
mov bx, 100
xor dx, dx
div bx
mov [bp+var_6], ax
mov ax, [bp+arg_0]
xor dx, dx
div bx
mov [bp+arg_0], dx
cmp byte_11713, 0
jnz short loc_C625
or si, [bp+var_6]
or si, si
jz short loc_C621
mov al, byte ptr [bp+var_6]
add al, gb_0_
mov [bp+@@g_str], al
jmp short loc_C625
; ---------------------------------------------------------------------------
loc_C621:
mov [bp+@@g_str], 2
loc_C625:
mov ax, [bp+arg_0]
mov bx, 10
xor dx, dx
div bx
mov [bp+var_6], ax
mov ax, [bp+arg_0]
xor dx, dx
div bx
mov [bp+arg_0], dx
or si, [bp+var_6]
mov al, byte_11713
mov ah, 0
or si, ax
or si, si
jz short loc_C654
mov al, byte ptr [bp+var_6]
add al, gb_0_
mov [bp+@@g_str+1], al
jmp short loc_C658
; ---------------------------------------------------------------------------
loc_C654:
mov [bp+@@g_str+1], g_EMPTY
loc_C658:
mov al, byte ptr [bp+arg_0]
add al, gb_0_
mov [bp+@@g_str+2], al
mov [bp+@@g_str+3], 0
push [bp+@@x]
push [bp+@@y]
push GAIJI_W
push ss
lea ax, [bp+@@g_str]
push ax
push col_116E4
call graph_gaiji_puts
pop si
leave
retn 6
sub_C5E7 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_C67F proc near
@@g_str = byte ptr -0Ch
var_2 = byte ptr -2
var_1 = byte ptr -1
arg_0 = dword ptr 4
@@y = word ptr 8
arg_6 = word ptr 0Ah
enter 0Ch, 0
push si
push di
mov di, [bp+arg_6]
les bx, [bp+arg_0]
cmp byte ptr es:[bx+7], 0Ah
jb short loc_C6AC
mov al, es:[bx+7]
mov ah, 0
mov bx, 10
cwd
idiv bx
mov [bp+var_1], al
add al, gb_0_
mov [bp+@@g_str], al
mov [bp+var_2], 1
jmp short loc_C6B4
; ---------------------------------------------------------------------------
loc_C6AC:
mov [bp+@@g_str], g_EMPTY
mov [bp+var_2], 0
loc_C6B4:
mov si, 1
jmp short loc_C6F1
; ---------------------------------------------------------------------------
loc_C6B9:
mov ax, 8
sub ax, si
les bx, [bp+arg_0]
add bx, ax
mov al, es:[bx]
mov ah, 0
mov bx, 10
cwd
idiv bx
mov [bp+var_1], dl
mov al, [bp+var_1]
or [bp+var_2], al
cmp [bp+var_2], 0
jnz short loc_C6E2
cmp si, 8
jnz short loc_C6EC
loc_C6E2:
mov al, [bp+var_1]
add al, gb_0_
mov [bp+si+@@g_str], al
jmp short loc_C6F0
; ---------------------------------------------------------------------------
loc_C6EC:
mov [bp+si+@@g_str], g_EMPTY
loc_C6F0:
inc si
loc_C6F1:
cmp si, 8
jle short loc_C6B9
mov [bp+@@g_str+9], 0
push di
push [bp+@@y]
push GAIJI_W
push ss
lea ax, [bp+@@g_str]
push ax
push col_116E4
call graph_gaiji_puts
lea ax, [di+144]
call graph_putsa_fx pascal, ax, [bp+@@y], col_116E4, ds, offset aU__0
pop di
pop si
leave
retn 8
sub_C67F endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_C729 proc near
var_6 = dword ptr -6
var_2 = word ptr -2
arg_0 = word ptr 4
arg_2 = word ptr 6
arg_4 = word ptr 8
arg_6 = word ptr 0Ah
enter 6, 0
push si
push di
mov si, [bp+arg_6]
mov di, [bp+arg_4]
cmp [bp+arg_2], 0
jz short loc_C745
mov [bp+var_6], 1000000
jmp short loc_C74D
; ---------------------------------------------------------------------------
loc_C745:
mov [bp+var_6], 0
loc_C74D:
mov ax, [bp+arg_2]
cmp ax, [bp+arg_0]
jz short loc_C786
cmp [bp+arg_2], 0
jz short loc_C770
movzx ebx, [bp+arg_2]
mov eax, [bp+var_6]
xor edx, edx
div ebx
mov [bp+var_6], eax
jmp short loc_C778
; ---------------------------------------------------------------------------
loc_C770:
mov [bp+var_6], 0
loc_C778:
movzx eax, [bp+arg_0]
imul eax, [bp+var_6]
mov [bp+var_6], eax
loc_C786:
cmp byte_116EA, 0
jnz short loc_C797
mov eax, dword_1517E
add eax, [bp+var_6]
jmp short loc_C79F
; ---------------------------------------------------------------------------
loc_C797:
mov eax, dword_1517E
sub eax, [bp+var_6]
loc_C79F:
mov dword_1517E, eax
cmp byte_1517C, 0
jz short loc_C7B6
mov eax, [bp+var_6]
shr eax, 2
mov dword_15182, eax
loc_C7B6:
mov eax, [bp+var_6]
mov ebx, 10000
xor edx, edx
div ebx
mov [bp+var_2], ax
push si
push di
push ax
call sub_C5E7
mov ebx, 10000
mov eax, [bp+var_6]
xor edx, edx
div ebx
mov [bp+var_6], edx
mov eax, [bp+var_6]
mov ebx, 100
xor edx, edx
div ebx
mov [bp+var_2], ax
mov byte_11713, 1
lea ax, [si+48]
push ax
push di
push [bp+var_2]
call sub_C5E7
mov byte_11713, 0
lea ax, [si+48]
call graph_putsa_fx pascal, ax, di, col_116E4, ds, offset aBd
lea ax, [si+96]
call graph_putsa_fx pascal, ax, di, col_116E4, ds, offset aBu
pop di
pop si
leave
retn 8
sub_C729 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_C835 proc near
var_2 = word ptr -2
arg_0 = dword ptr 4
@@y = word ptr 8
arg_6 = word ptr 0Ah
enter 2, 0
push si
push di
mov si, [bp+arg_6]
mov di, [bp+@@y]
mov eax, [bp+arg_0]
mov ebx, 10000
xor edx, edx
div ebx
mov [bp+var_2], ax
push si
push di
push ax
call sub_C5E7
mov ebx, 10000
mov eax, [bp+arg_0]
xor edx, edx
div ebx
mov [bp+arg_0], edx
mov eax, [bp+arg_0]
mov ebx, 100
xor edx, edx
div ebx
mov [bp+var_2], ax
mov byte_11713, 1
lea ax, [si+48]
push ax
push di
push [bp+var_2]
call sub_C5E7
mov byte_11713, 0
lea ax, [si+48]
call graph_putsa_fx pascal, ax, di, col_116E4, ds, offset aBd_0
pop di
pop si
leave
retn 8
sub_C835 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_C8AE proc near
var_4 = dword ptr -4
enter 4, 0
les bx, _resident
mov eax, es:[bx+resident_t.rand]
mov random_seed, eax
mov al, es:[bx+resident_t.credit_lives]
mov ah, 0
dec ax
mov bx, ax
cmp bx, 5
ja short loc_C90E
add bx, bx
jmp cs:off_C9F6[bx]
loc_C8D4:
mov [bp+var_4], 2500
jmp short loc_C90E
; ---------------------------------------------------------------------------
loc_C8DE:
mov [bp+var_4], 2000
jmp short loc_C90E
; ---------------------------------------------------------------------------
loc_C8E8:
mov [bp+var_4], 1500
jmp short loc_C90E
; ---------------------------------------------------------------------------
loc_C8F2:
mov [bp+var_4], 1000
jmp short loc_C90E
; ---------------------------------------------------------------------------
loc_C8FC:
mov [bp+var_4], 500
jmp short loc_C90E
; ---------------------------------------------------------------------------
loc_C906:
mov [bp+var_4], 0
loc_C90E:
les bx, _resident
mov al, es:[bx+resident_t.credit_bombs]
mov ah, 0
or ax, ax
jz short loc_C928
cmp ax, 1
jz short loc_C932
cmp ax, 2
jz short loc_C93C
jmp short loc_C944
; ---------------------------------------------------------------------------
loc_C928:
add [bp+var_4], 2500
jmp short loc_C944
; ---------------------------------------------------------------------------
loc_C932:
add [bp+var_4], 1500
jmp short loc_C944
; ---------------------------------------------------------------------------
loc_C93C:
add [bp+var_4], 1000
loc_C944:
les bx, _resident
cmp es:[bx+resident_t.turbo_mode], 0
jz short loc_C957
add [bp+var_4], 2000
loc_C957:
les bx, _resident
cmp es:[bx+resident_t.graze], 0
jz short loc_C971
mov ax, es:[bx+resident_t.graze]
imul ax, 3
movzx eax, ax
add [bp+var_4], eax
loc_C971:
les bx, _resident
mov al, es:[bx+resident_t.miss_count]
mov ah, 0
mov dl, es:[bx+resident_t.bombs_used]
mov dh, 0
sub ax, dx
cwde
imul eax, 200
add [bp+var_4], eax
cmp [bp+var_4], 0
jge short loc_C9A1
mov [bp+var_4], 0
jmp short loc_C9B3
; ---------------------------------------------------------------------------
loc_C9A1:
cmp [bp+var_4], 10000
jle short loc_C9B3
mov [bp+var_4], 10000
loc_C9B3:
mov eax, [bp+var_4]
imul eax, 100
mov [bp+var_4], eax
add dword_1517E, eax
mov ax, x_116E2
add ax, 176
push ax
mov ax, y_116E8
add ax, 216
push ax
pushd [bp+var_4]
call sub_C835
mov ax, x_116E2
add ax, 272
push ax
mov ax, y_116E8
add ax, 216
push ax
push col_116E4
push ds
push offset aBu_0
call graph_putsa_fx
leave
retn
sub_C8AE endp
; ---------------------------------------------------------------------------
off_C9F6 dw offset loc_C8D4
dw offset loc_C8DE
dw offset loc_C8E8
dw offset loc_C8F2
dw offset loc_C8FC
dw offset loc_C906
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_CA02 proc near
push bp
mov bp, sp
les bx, _resident
cmp es:[bx+resident_t.end_sequence], ES_1CC
jz short loc_CA17
cmp es:[bx+resident_t.end_sequence], ES_EXTRA
jnz short loc_CA57
loc_CA17:
les bx, _resident
cmp es:[bx+resident_t.rank], RANK_EASY
jnz short loc_CA26
mov al, 4
pop bp
retn
; ---------------------------------------------------------------------------
loc_CA26:
les bx, _resident
cmp byte ptr es:[bx+score_last][7], 7
ja short loc_CA35
mov al, 1
pop bp
retn
; ---------------------------------------------------------------------------
loc_CA35:
les bx, _resident
cmp es:[bx+resident_t.miss_count], 6
jb short loc_CA44
mov al, 7
pop bp
retn
; ---------------------------------------------------------------------------
loc_CA44:
les bx, _resident
cmp es:[bx+resident_t.RESIDENT_unknown], 15
jb short loc_CA53
mov al, 8
pop bp
retn
; ---------------------------------------------------------------------------
loc_CA53:
mov al, 0
pop bp
retn
; ---------------------------------------------------------------------------
loc_CA57:
les bx, _resident
cmp es:[bx+resident_t.end_sequence], ES_CONTINUED
jnz short loc_CA66
mov al, 2
pop bp
retn
; ---------------------------------------------------------------------------
loc_CA66:
les bx, _resident
mov al, es:[bx+resident_t.bombs_used]
mov ah, 0
mov dl, es:[bx+resident_t.miss_count]
mov dh, 0
add dx, dx
cmp ax, dx
jg short loc_CA80
mov al, 5
pop bp
retn
; ---------------------------------------------------------------------------
loc_CA80:
les bx, _resident
cmp es:[bx+resident_t.stage], 4
jb short loc_CA97
cmp es:[bx+resident_t.point_items_collected], 350
ja short loc_CA97
mov al, 6
pop bp
retn
; ---------------------------------------------------------------------------
loc_CA97:
mov al, 3
pop bp
retn
sub_CA02 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_CA9B proc near
var_4 = dword ptr -4
enter 4, 0
push si
mov dword_1517E, 0
mov _graph_putsa_fx_func, FX_WEIGHT_BOLD
call graph_putsa_fx pascal, x_116E2, y_116E8, col_116E4, ds, offset aB@b@b@b@b@b@b@ ; "<22>@<40>@<40>@<40>@<40>@<40>@<40>@ <20>r<EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD>"
push x_116E2
mov ax, y_116E8
add ax, 24
push ax
push col_116E4
push ds
push offset aUqiUx ; "<22><><EFBFBD>Փx"
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 48
push ax
push col_116E4
push ds
push offset aNPiuU_ ; "<22>ŏI<C58F><49><EFBFBD>_"
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 72
push ax
push col_116E4
push ds
push offset aGGxi
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 96
push ax
push col_116E4
push ds
push offset aGGaogcpi
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 120
push ax
push col_116E4
push ds
push offset aGqbGatbrmcj ; "<22>Q<EFBFBD>[<5B><><EFBFBD>B<EFBFBD><42><EFBFBD><EFBFBD>"
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 144
push ax
push col_116E4
push ds
push offset aIlcSObcj ; "<22><><EFBFBD><EFBFBD><EFBFBD>ގ<EFBFBD><DE8E><EFBFBD>"
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 168
push ax
push col_116E4
push ds
push offset aGagcgegai
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 192
push ax
push col_116E4
push ds
push offset aUU_gagcgeganNv ; "<22><><EFBFBD>_<EFBFBD>A<EFBFBD>C<EFBFBD>e<EFBFBD><65><EFBFBD>ō<EFBFBD><C58D>_<EFBFBD><5F>"
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 216
push ax
push col_116E4
push ds
push offset aLcnzvv ; "<22>C<EFBFBD><43><EFBFBD><EFBFBD>"
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 240
push ax
push col_116E4
push ds
push offset aPicacovCj ; "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 272
push ax
push col_116E4
push ds
push offset aVavVVSrso ; "<22><><EFBFBD>Ȃ<EFBFBD><C882>̘r<CC98>O"
call graph_putsa_fx
les bx, _resident
cmp es:[bx+resident_t.stage], STAGE_EXTRA
jnz short loc_CBDB
mov al, RANK_EXTRA
jmp short loc_CBE3
; ---------------------------------------------------------------------------
loc_CBDB:
les bx, _resident
mov al, es:[bx+resident_t.rank]
loc_CBE3:
mov _verdict_rank, al
mov ax, x_116E2
add ax, 160
push ax
mov ax, y_116E8
add ax, 24
push ax
push GAIJI_W
push ds
mov al, _verdict_rank
mov ah, 0
shl ax, 3
add ax, offset grEASY
push ax
push col_116E4
call graph_gaiji_puts
mov ax, x_116E2
add ax, 128
push ax
mov ax, y_116E8
add ax, 48
push ax
mov ax, word ptr _resident
add ax, 20h ; ' '
push word ptr _resident+2
push ax
call sub_C67F
mov ax, x_116E2
add ax, 224
push ax
mov ax, y_116E8
add ax, 72
push ax
les bx, _resident
mov al, es:[bx+resident_t.miss_count]
mov ah, 0
push ax
call sub_C5E7
mov ax, x_116E2
add ax, 224
push ax
mov ax, y_116E8
add ax, 96
push ax
les bx, _resident
mov al, es:[bx+resident_t.bombs_used]
mov ah, 0
push ax
call sub_C5E7
mov ax, x_116E2
add ax, 272
push ax
mov ax, y_116E8
add ax, 72
push ax
push col_116E4
push ds
push offset aI
call graph_putsa_fx
mov ax, x_116E2
add ax, 272
push ax
mov ax, y_116E8
add ax, 96
push ax
push col_116E4
push ds
push offset aI_0
call graph_putsa_fx
mov byte_1517C, 1
les bx, _resident
cmp es:[bx+resident_t.stage], STAGE_EXTRA
jz short loc_CCC6
cmp es:[bx+resident_t.end_sequence], ES_CONTINUED
jb short loc_CCB3
mov es:[bx+resident_t.std_frames], 46000
loc_CCB3:
mov ax, x_116E2
add ax, 176
push ax
mov ax, y_116E8
add ax, 120
push ax
push 46000
jmp short loc_CCE8
; ---------------------------------------------------------------------------
loc_CCC6:
les bx, _resident
cmp es:[bx+resident_t.end_sequence], ES_EXTRA
jnz short loc_CCD7
mov es:[bx+resident_t.std_frames], 12800
loc_CCD7:
mov ax, x_116E2
add ax, 176
push ax
mov ax, y_116E8
add ax, 120
push ax
push 12800
loc_CCE8:
les bx, _resident
push es:[bx+resident_t.std_frames]
call sub_C729
mov byte_1517C, 0
mov ax, x_116E2
add ax, 176
push ax
mov ax, y_116E8
add ax, 144
push ax
les bx, _resident
push es:[bx+resident_t.enemies_gone]
push es:[bx+resident_t.enemies_killed]
call sub_C729
mov ax, x_116E2
add ax, 176
push ax
mov ax, y_116E8
add ax, 168
push ax
les bx, _resident
push es:[bx+resident_t.items_spawned]
push es:[bx+resident_t.items_collected]
call sub_C729
mov ax, x_116E2
add ax, 176
push ax
mov ax, y_116E8
add ax, 192
push ax
les bx, _resident
push es:[bx+resident_t.point_items_collected]
push es:[bx+resident_t.max_valued_point_items_collected]
call sub_C729
call sub_C8AE
mov byte_116EA, 1
mov ax, x_116E2
add ax, 176
push ax
mov ax, y_116E8
add ax, 240
push ax
les bx, _resident
mov eax, es:[bx+resident_t.frames]
mov ebx, 10
xor edx, edx
div ebx
push ax
mov bx, word ptr _resident
mov eax, es:[bx+resident_t.slow_frames]
mov ebx, 10
xor edx, edx
div ebx
push ax
call sub_C729
mov byte_116EA, 0
mov ebx, 12
mov eax, dword_1517E
cdq
idiv ebx
mov dword_1517E, eax
mov eax, dword_15182
add dword_1517E, eax
les bx, _resident
cmp es:[bx+resident_t.score_highest][7], 10
jb short loc_CDCB
add dword_1517E, 500000
jmp short loc_CDF3
; ---------------------------------------------------------------------------
loc_CDCB:
les bx, _resident
movzx eax, es:[bx+resident_t.score_highest][6]
imul eax, 5000
add dword_1517E, eax
movzx eax, es:[bx+resident_t.score_highest][7]
imul eax, 50000
add dword_1517E, eax
loc_CDF3:
mov al, _verdict_rank
mov ah, 0
mov bx, ax
cmp bx, RANK_EXTRA
ja loc_CEAF
add bx, bx
jmp cs:off_D165[bx]
loc_CE08:
sub dword_1517E, 50000
mov [bp+var_4], 800000
jmp loc_CEAF
; ---------------------------------------------------------------------------
loc_CE1C:
mov [bp+var_4], 1000000
jmp loc_CEAF
; ---------------------------------------------------------------------------
loc_CE27:
mov eax, dword_1517E
imul eax, 5
mov dword_1517E, eax
mov ebx, 4
cdq
idiv ebx
mov dword_1517E, eax
add dword_1517E, 150000
mov [bp+var_4], 1200000
jmp short loc_CEAF
; ---------------------------------------------------------------------------
loc_CE55:
mov eax, dword_1517E
imul eax, 3
mov dword_1517E, eax
mov ebx, 2
cdq
idiv ebx
mov dword_1517E, eax
add dword_1517E, 300000
mov [bp+var_4], 1400000
jmp short loc_CEAF
; ---------------------------------------------------------------------------
loc_CE83:
mov eax, dword_1517E
imul eax, 3
mov dword_1517E, eax
mov ebx, 2
cdq
idiv ebx
mov dword_1517E, eax
add dword_1517E, 250000
mov [bp+var_4], 2000000
loc_CEAF:
les bx, _resident
mov al, es:[bx+resident_t.credit_lives]
mov ah, 0
dec ax
mov bx, ax
cmp bx, 5
ja short loc_CF0A
add bx, bx
jmp cs:off_D159[bx]
loc_CEC8:
add dword_1517E, 50000
add [bp+var_4], 100000
jmp short loc_CF0A
; ---------------------------------------------------------------------------
loc_CEDB:
add dword_1517E, 25000
add [bp+var_4], 50000
jmp short loc_CF0A
; ---------------------------------------------------------------------------
loc_CEEE:
sub [bp+var_4], 25000
jmp short loc_CF0A
; ---------------------------------------------------------------------------
loc_CEF8:
sub [bp+var_4], 50000
jmp short loc_CF0A
; ---------------------------------------------------------------------------
loc_CF02:
sub [bp+var_4], 75000
loc_CF0A:
les bx, _resident
mov al, es:[bx+resident_t.credit_bombs]
mov ah, 0
or ax, ax
jz short loc_CF24
cmp ax, 1
jz short loc_CF37
cmp ax, 2
jz short loc_CF4A
jmp short loc_CF5B
; ---------------------------------------------------------------------------
loc_CF24:
add dword_1517E, 50000
add [bp+var_4], 100000
jmp short loc_CF5B
; ---------------------------------------------------------------------------
loc_CF37:
add dword_1517E, 30000
add [bp+var_4], 50000
jmp short loc_CF5B
; ---------------------------------------------------------------------------
loc_CF4A:
add dword_1517E, 20000
add [bp+var_4], 25000
loc_CF5B:
les bx, _resident
cmp es:[bx+resident_t.turbo_mode], 0
jnz short loc_CF77
sub dword_1517E, 200000
sub [bp+var_4], 100000
loc_CF77:
les bx, _resident
cmp es:[bx+resident_t.miss_count], 10
jb short loc_CF8D
sub dword_1517E, 300000
jmp short loc_CFA3
; ---------------------------------------------------------------------------
loc_CF8D:
les bx, _resident
movzx eax, es:[bx+resident_t.miss_count]
imul eax, 30000
sub dword_1517E, eax
loc_CFA3:
les bx, _resident
cmp es:[bx+resident_t.bombs_used], 15
jb short loc_CFB9
sub dword_1517E, 225000
jmp short loc_CFCF
; ---------------------------------------------------------------------------
loc_CFB9:
les bx, _resident
movzx eax, es:[bx+resident_t.bombs_used]
imul eax, 15000
sub dword_1517E, eax
loc_CFCF:
les bx, _resident
cmp es:[bx+resident_t.end_sequence], ES_EXTRA
jnb short loc_CFF5
mov eax, dword_1517E
imul eax, 7
mov dword_1517E, eax
mov ebx, 8
cdq
idiv ebx
mov dword_1517E, eax
loc_CFF5:
cmp dword_1517E, 0
jge short loc_D008
mov dword_1517E, 0
jmp short loc_D01A
; ---------------------------------------------------------------------------
loc_D008:
mov eax, dword_1517E
cmp eax, [bp+var_4]
jbe short loc_D01A
mov eax, [bp+var_4]
mov dword_1517E, eax
loc_D01A:
mov byte_15187, 0
mov byte_151A5, 0
les bx, _resident
mov eax, es:[bx+resident_t.frames]
shr eax, 1
cmp eax, es:[bx+resident_t.slow_frames]
jbe loc_D120
mov ax, x_116E2
add ax, 176
push ax
mov ax, y_116E8
add ax, 272
push ax
pushd [dword_1517E]
call sub_C835
mov ax, x_116E2
add ax, 272
push ax
mov ax, y_116E8
add ax, 272
push ax
push col_116E4
push ds
push offset aU_
call graph_putsa_fx
push ds
push offset a_ude_txt ; "_ude.txt"
call file_ropen
cmp dword_1517E, 1500000
jge short loc_D0E1
cmp dword_1517E, 0
jnz short loc_D08B
mov si, 19h
jmp short loc_D0D1
; ---------------------------------------------------------------------------
loc_D08B:
cmp dword_1517E, 1050000
jge short loc_D0AE
mov eax, dword_1517E
mov ebx, 50000
cdq
idiv ebx
mov dx, 24
sub dx, ax
mov si, dx
jmp short loc_D0D1
; ---------------------------------------------------------------------------
loc_D0AE:
cmp dword_1517E, 1200000
jge short loc_D0BE
mov si, 3
jmp short loc_D0D1
; ---------------------------------------------------------------------------
loc_D0BE:
cmp dword_1517E, 1350000
jge short loc_D0CE
mov si, 2
jmp short loc_D0D1
; ---------------------------------------------------------------------------
loc_D0CE:
mov si, 1
loc_D0D1:
mov ax, si
imul ax, 1Eh
cwde
push eax
push 0
call file_seek
loc_D0E1:
push ds
push offset byte_15187
push 1Eh
call file_read
call sub_CA02
mov ah, 0
mov si, ax
imul ax, 1Eh
add ax, 780
cwde
push eax
push 0
call file_seek
push ds
push offset byte_151A5
push 1Eh
call file_read
call file_close
mov byte_151A3, 0
mov byte_151C1, 0
jmp short loc_D156
; ---------------------------------------------------------------------------
loc_D120:
mov ax, x_116E2
add ax, 176
push ax
mov ax, y_116E8
add ax, 272
push ax
push col_116E4
push ds
push offset aBhbhbhbhbhbhu_ ; "<22>H<EFBFBD>H<EFBFBD>H<EFBFBD>H<EFBFBD>H<EFBFBD>H<EFBFBD>_"
call graph_putsa_fx
mov ax, x_116E2
add ax, 48
push ax
mov ax, y_116E8
add ax, 296
push ax
push word_116E6
push ds
push offset aPicacovVVcvsfT ; "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD><E994BB><EFBFBD>s<EFBFBD><73>"
call graph_putsa_fx
loc_D156:
pop si
leave
retn
sub_CA9B endp
; ---------------------------------------------------------------------------
off_D159 dw offset loc_CEC8
dw offset loc_CEDB
dw offset loc_CF0A
dw offset loc_CEEE
dw offset loc_CEF8
dw offset loc_CF02
off_D165 dw offset loc_CE08
dw offset loc_CE1C
dw offset loc_CE27
dw offset loc_CE55
dw offset loc_CE83
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_D16F proc near
push bp
mov bp, sp
cmp byte_15187, 0
jz short loc_D1AF
mov ax, x_116E2
add ax, 48
push ax
mov ax, y_116E8
add ax, 296
push ax
push word_116E6
push ds
push offset byte_15187
call graph_putsa_fx
mov ax, x_116E2
add ax, 48
push ax
mov ax, y_116E8
add ax, 312
push ax
push word_116E6
push ds
push offset byte_151A5
call graph_putsa_fx
loc_D1AF:
pop bp
retn
sub_D16F endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_D1B1 proc near
push bp
mov bp, sp
mov PaletteTone, 0
call far ptr palette_show
graph_accesspage 1
call pi_load pascal, 0, ds, offset aUde_pi
call pi_palette_apply pascal, 0
call pi_put_8 pascal, large 0, 0
call pi_free pascal, 0
call graph_copy_page pascal, 0
push 4
call palette_black_in
graph_accesspage 0
graph_showpage al
call sub_CA9B
push 40h
call frame_delay
call sub_D16F
call input_wait_for_change pascal, 0
push 2
call palette_black_out
pop bp
retn
sub_D1B1 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_D21D proc near
var_2 = word ptr -2
enter 2, 0
push si
push di
push x_116E2
mov ax, y_116E8
add ax, 64
push ax
push col_116E4
push ds
push offset aB@vpcB@ ; "<22>@<40>P<EFBFBD>ʁ@"
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 96
push ax
push col_116E4
push ds
push offset aB@vqcB@ ; "<22>@<40>Q<EFBFBD>ʁ@"
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 128
push ax
push col_116E4
push ds
push offset aB@vrcB@ ; "<22>@<40>R<EFBFBD>ʁ@"
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 160
push ax
push col_116E4
push ds
push offset aB@vscB@ ; "<22>@<40>S<EFBFBD>ʁ@"
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 192
push ax
push col_116E4
push ds
push offset aB@vtcB@ ; "<22>@<40>T<EFBFBD>ʁ@"
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 224
push ax
push col_116E4
push ds
push offset aB@vucB@ ; "<22>@<40>U<EFBFBD>ʁ@"
call graph_putsa_fx
push x_116E2
mov ax, y_116E8
add ax, 288
push ax
push col_116E4
push ds
push offset aNPiuU__0 ; "<22>ŏI<C58F><49><EFBFBD>_"
call graph_putsa_fx
mov ax, x_116E2
add ax, 128
mov [bp+var_2], ax
xor si, si
mov ax, y_116E8
add ax, 64
mov di, ax
jmp short loc_D2FE
; ---------------------------------------------------------------------------
loc_D2E0:
push [bp+var_2]
push di
mov ax, si
shl ax, 3
mov dx, word ptr _resident
add dx, ax
add dx, 4Ch ; 'L'
push word ptr _resident+2
push dx
call sub_C67F
inc si
add di, 20h ; ' '
loc_D2FE:
cmp si, 6
jl short loc_D2E0
push [bp+var_2]
mov ax, y_116E8
add ax, 288
push ax
mov ax, word ptr _resident
add ax, 20h ; ' '
push word ptr _resident+2
push ax
call sub_C67F
pop di
pop si
leave
retn
sub_D21D endp
maine_01_TEXT ends
maine_01__TEXT segment byte public 'CODE' use16
SPACE_WINDOW_SET procdesc pascal near \
center_x:word, center_y:word, w:word, h:word
ORB_PARTICLE_CELS = 6
PAT_ORB_PARTICLE = 0
PAT_ORB_PARTICLE_last = (PAT_ORB_PARTICLE + ORB_PARTICLE_CELS - 1)
PAT_STAR_BIG = (PAT_ORB_PARTICLE + ORB_PARTICLE_CELS - 1) + 1
PAT_STAR_SMALL = PAT_STAR_BIG + 1
ORB_RADIUS_FULL = 16
ORB_W = 32
ORB_H = 32
X_RIGHT = 0
X_LEFT = 1
orb_particle_t struc
OP_center_x dd ?
OP_center_y dd ?
OP_velocity Point <?>
OP_patnum_tiny dw ?
OP_speed dw ?
OP_gather_frame dw ?
OP_angle db ?
OP_al_radius label byte
OP_al_rain_sway_x_direction label byte
db ?
orb_particle_t ends
ORB_PARTICLE_COUNT = 64
ORB_TRAIL_COUNT = 8
STAR_COUNT = 48
ORB_INDEX = ORB_PARTICLE_COUNT
orb equ <_particles[ORB_INDEX * size orb_particle_t]>
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_D387 proc near
@@star_center = word ptr -4
@@trail_center = word ptr -2
enter 4, 0
push si
push di
mov si, offset _particles
mov [bp+@@trail_center], offset _orb_trails_center
mov [bp+@@star_center], offset _stars_center
push ((RES_X / 2) shl 16) or (RES_Y / 2) ; (center_x shl 16) or center_y
push (384 shl 16) or 320 ; (w shl 16) or h
call space_window_set
mov word_151DE, 0
xor di, di
jmp short loc_D41B
; ---------------------------------------------------------------------------
loc_D3B3:
call IRand
cwd
idiv _space_window_w
shl dx, 4
mov ax, _space_window_w
shl ax, 3
sub dx, ax
movsx eax, dx
mov [si+orb_particle_t.OP_center_x], eax
call IRand
cwd
idiv _space_window_h
shl dx, 4
mov ax, _space_window_h
shl ax, 3
sub dx, ax
movsx eax, dx
mov [si+orb_particle_t.OP_center_y], eax
call IRand
mov [si+orb_particle_t.OP_angle], al
mov [si+orb_particle_t.OP_speed], (0 shl 4) + 10
mov [si+orb_particle_t.OP_patnum_tiny], PAT_ORB_PARTICLE
mov [si+orb_particle_t.OP_al_rain_sway_x_direction], X_RIGHT
lea ax, [si+orb_particle_t.OP_velocity]
push ax
pushd 0
push [si+orb_particle_t.OP_speed]
mov al, [si+orb_particle_t.OP_angle]
mov ah, 0
push ax
call vector2_at
inc di
add si, size orb_particle_t
loc_D41B:
cmp di, ORB_PARTICLE_COUNT
jl short loc_D3B3
; si == particles[ORB_INDEX]
mov [si+orb_particle_t.OP_center_x], SUBPIXEL_NONE
mov [si+orb_particle_t.OP_al_radius], 0
mov [si+orb_particle_t.OP_velocity.x], 0
mov [si+orb_particle_t.OP_velocity.y], 0
mov _space_camera_velocity.x, 0
mov _space_camera_velocity.y, 0
xor di, di
jmp short loc_D451
; ---------------------------------------------------------------------------
loc_D445:
mov bx, [bp+@@trail_center]
mov [bx+Point.x], SUBPIXEL_NONE
inc di
add [bp+@@trail_center], size Point
loc_D451:
cmp di, ORB_TRAIL_COUNT
jl short loc_D445
xor di, di
jmp short loc_D494
; ---------------------------------------------------------------------------
loc_D45A:
call IRand
cwd
idiv _space_window_w
shl dx, 4
mov ax, _space_window_w
shl ax, 3
sub dx, ax
mov bx, [bp+@@star_center]
mov [bx+Point.x], dx
call IRand
cwd
idiv _space_window_h
shl dx, 4
mov ax, _space_window_h
shl ax, 3
sub dx, ax
mov bx, [bp+@@star_center]
mov [bx+Point.y], dx
inc di
add [bp+@@star_center], size Point
loc_D494:
cmp di, STAR_COUNT
jl short loc_D45A
pop di
pop si
leave
retn
sub_D387 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_D49D proc near
push bp
mov bp, sp
push si
push di
mov si, offset _particles
xor di, di
jmp short loc_D4ED
; ---------------------------------------------------------------------------
loc_D4A9:
mov ax, word ptr [si+orb_particle_t.OP_center_y]
neg ax
push ax
mov ax, word ptr [si+orb_particle_t.OP_center_x]
neg ax
push ax
call iatan2
mov [si+orb_particle_t.OP_angle], al
push word ptr [si+orb_particle_t.OP_center_x]
push word ptr [si+orb_particle_t.OP_center_y]
call ihypot
mov bx, 32
cwd
idiv bx
mov [si+orb_particle_t.OP_speed], ax
mov [si+orb_particle_t.OP_gather_frame], 0
lea ax, [si+orb_particle_t.OP_velocity]
push ax
pushd 0
push [si+orb_particle_t.OP_speed]
mov al, [si+orb_particle_t.OP_angle]
mov ah, 0
push ax
call vector2_at
inc di
add si, size orb_particle_t
loc_D4ED:
cmp di, ORB_PARTICLE_COUNT
jl short loc_D4A9
; si == particles[ORB_INDEX]
mov [si+orb_particle_t.OP_center_x], 0
mov [si+orb_particle_t.OP_center_y], 0
mov [si+orb_particle_t.OP_al_radius], 1
pop di
pop si
pop bp
retn
sub_D49D endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_D509 proc near
push bp
mov bp, sp
push si
mov si, offset _particles
xor ax, ax
jmp short loc_D51F
; ---------------------------------------------------------------------------
loc_D514:
mov [si+orb_particle_t.OP_center_x], SUBPIXEL_NONE
inc ax
add si, size orb_particle_t
loc_D51F:
cmp ax, ORB_PARTICLE_COUNT
jl short loc_D514
; si == particles[ORB_INDEX]
mov [si+orb_particle_t.OP_al_radius], ORB_RADIUS_FULL
mov word_151DE, 1
pop si
pop bp
retn
sub_D509 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_D531 proc near
push bp
mov bp, sp
push si
push di
mov si, offset _particles
xor di, di
jmp loc_D5C9
; ---------------------------------------------------------------------------
loc_D53E:
mov ax, word ptr [si+orb_particle_t.OP_center_y]
neg ax
push ax
mov ax, word ptr [si+orb_particle_t.OP_center_x]
neg ax
push ax
call iatan2
mov [si+orb_particle_t.OP_angle], al
push word ptr [si+orb_particle_t.OP_center_x]
push word ptr [si+orb_particle_t.OP_center_y]
call ihypot
mov bx, 32
cwd
idiv bx
mov [si+orb_particle_t.OP_speed], ax
mov [si+orb_particle_t.OP_patnum_tiny], PAT_ORB_PARTICLE
call IRand
and al, 7Fh
mov [si+orb_particle_t.OP_angle], al
call IRand
mov bx, (4 shl 4)
cwd
idiv bx
add dx, (5 shl 4) + 12
mov [si+orb_particle_t.OP_speed], dx
push offset point_151D2
push word ptr orb.OP_center_x
push word ptr orb.OP_center_y
push (12 shl 4)
mov al, [si+orb_particle_t.OP_angle]
mov ah, 0
push ax
call vector2_at
lea ax, [si+orb_particle_t.OP_velocity]
push ax
pushd 0
push [si+orb_particle_t.OP_speed]
mov al, [si+orb_particle_t.OP_angle]
mov ah, 0
push ax
call vector2_at
movsx eax, point_151D2.x
mov [si+orb_particle_t.OP_center_x], eax
movsx eax, point_151D2.y
mov [si+orb_particle_t.OP_center_y], eax
inc di
add si, size orb_particle_t
loc_D5C9:
cmp di, ORB_PARTICLE_COUNT
jl loc_D53E
; si == particles[ORB_INDEX]
mov [si+orb_particle_t.OP_center_x], SUBPIXEL_NONE
mov word_151DE, 1
pop di
pop si
pop bp
retn
sub_D531 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_D5E1 proc near
@@trail_center = word ptr -4
@@i = word ptr -2
enter 4, 0
push si
push di
mov si, offset _particles
mov [bp+@@trail_center], offset _orb_trails_center
mov di, offset _stars_center
mov [bp+@@i], 0
jmp loc_D6FF
; ---------------------------------------------------------------------------
loc_D5FA:
cmp [si+orb_particle_t.OP_center_x], SUBPIXEL_NONE
jz loc_D6F9
mov ax, [si+orb_particle_t.OP_velocity.x]
sub ax, _space_camera_velocity.x
cwde
add [si+orb_particle_t.OP_center_x], eax
mov ax, [si+orb_particle_t.OP_velocity.y]
sub ax, _space_camera_velocity.y
cwde
add [si+orb_particle_t.OP_center_y], eax
cmp word_151DE, 0
jnz loc_D6AB
mov ax, _space_window_w
neg ax
shl ax, 3
add ax, (-4 shl 4)
cwde
cmp eax, [si+orb_particle_t.OP_center_x]
jl short loc_D649
mov ax, _space_window_w
shl ax, 4
add ax, (8 shl 4)
cwde
add [si+orb_particle_t.OP_center_x], eax
jmp short loc_D667
; ---------------------------------------------------------------------------
loc_D649:
mov ax, _space_window_w
shl ax, 3
add ax, (4 shl 4)
cwde
cmp eax, [si+orb_particle_t.OP_center_x]
jg short loc_D667
mov ax, _space_window_w
shl ax, 4
add ax, (8 shl 4)
cwde
sub [si+orb_particle_t.OP_center_x], eax
loc_D667:
mov ax, _space_window_h
neg ax
shl ax, 3
add ax, (-4 shl 4)
cwde
cmp eax, [si+orb_particle_t.OP_center_y]
jl short loc_D68B
mov ax, _space_window_h
shl ax, 4
add ax, (8 shl 4)
cwde
add [si+orb_particle_t.OP_center_y], eax
jmp short loc_D6AB
; ---------------------------------------------------------------------------
loc_D68B:
mov ax, _space_window_h
shl ax, 3
add ax, (4 shl 4)
cwde
cmp eax, [si+orb_particle_t.OP_center_y]
jg short loc_D6AB
mov ax, _space_window_h
shl ax, 4
add ax, (8 shl 4)
cwde
sub [si+orb_particle_t.OP_center_y], eax
loc_D6AB:
cmp word_151DE, 0
jz short loc_D6F9
mov ax, word_151DE
sub [si+orb_particle_t.OP_speed], ax
cmp [si+orb_particle_t.OP_speed], 0
jnz short loc_D6C7
mov [si+orb_particle_t.OP_center_x], SUBPIXEL_NONE
jmp short loc_D6F9
; ---------------------------------------------------------------------------
loc_D6C7:
cmp [si+orb_particle_t.OP_speed], (2 shl 4) + 3
jle short loc_D6D4
mov [si+orb_particle_t.OP_patnum_tiny], PAT_ORB_PARTICLE
jmp short loc_D6E4
; ---------------------------------------------------------------------------
loc_D6D4:
mov ax, [si+orb_particle_t.OP_speed]
mov bx, 7
cwd
idiv bx
or dx, dx
jnz short loc_D6E4
inc [si+orb_particle_t.OP_patnum_tiny]
loc_D6E4:
lea ax, [si+orb_particle_t.OP_velocity]
push ax
pushd 0
push [si+orb_particle_t.OP_speed]
mov al, [si+orb_particle_t.OP_angle]
mov ah, 0
push ax
call vector2_at
loc_D6F9:
inc [bp+@@i]
add si, size orb_particle_t
loc_D6FF:
cmp [bp+@@i], ORB_PARTICLE_COUNT
jl loc_D5FA
mov [bp+@@i], 0
jmp short loc_D72C
; ---------------------------------------------------------------------------
loc_D70E:
mov bx, [bp+@@trail_center]
cmp [bx+Point.x], SUBPIXEL_NONE
jz short loc_D725
mov bx, [bp+@@trail_center]
mov ax, _space_camera_velocity.x
sub [bx+Point.x], ax
mov ax, _space_camera_velocity.y
sub [bx+Point.y], ax
loc_D725:
inc [bp+@@i]
add [bp+@@trail_center], size Point
loc_D72C:
cmp [bp+@@i], ORB_TRAIL_COUNT
jl short loc_D70E
mov [bp+@@i], 0
jmp loc_D7F8
; ---------------------------------------------------------------------------
loc_D73A:
mov ax, [bp+@@i]
mov bx, 2
cwd
idiv bx
or dx, dx
jnz short loc_D751
mov ax, _space_camera_velocity.x
sub [di+Point.x], ax
mov ax, _space_camera_velocity.y
jmp short loc_D763
; ---------------------------------------------------------------------------
loc_D751:
mov ax, _space_camera_velocity.x
cwd
sub ax, dx
sar ax, 1
sub [di+Point.x], ax
mov ax, _space_camera_velocity.y
cwd
sub ax, dx
sar ax, 1
loc_D763:
sub [di+Point.y], ax
cmp _space_camera_velocity.x, 0
jnz short loc_D7A5
mov ax, _space_window_w
neg ax
shl ax, 3
cmp ax, [di+Point.x]
jge short loc_D783
mov ax, _space_window_w
shl ax, 3
cmp ax, [di+Point.x]
jg short loc_D7CA
loc_D783:
call IRand
cwd
idiv _space_window_w
shl dx, 4
mov ax, _space_window_w
shl ax, 3
sub dx, ax
mov [di+Point.x], dx
mov ax, _space_window_h
shl ax, 3
mov [di+Point.y], ax
jmp short loc_D7CA
; ---------------------------------------------------------------------------
loc_D7A5:
mov ax, _space_window_w
neg ax
shl ax, 3
cmp ax, [di+Point.x]
jl short loc_D7B6
mov ax, _space_window_w
jmp short loc_D7C5
; ---------------------------------------------------------------------------
loc_D7B6:
mov ax, _space_window_w
shl ax, 3
cmp ax, [di+Point.x]
jg short loc_D7CA
mov ax, _space_window_w
neg ax
loc_D7C5:
shl ax, 3
mov [di+Point.x], ax
loc_D7CA:
mov ax, _space_window_h
neg ax
shl ax, 3
cmp ax, [di+Point.y]
jl short loc_D7DC
mov ax, _space_window_h
jmp short loc_D7EC
; ---------------------------------------------------------------------------
loc_D7DC:
mov ax, _space_window_h
shl ax, 3
cmp ax, [di+Point.y]
jg short loc_D7F2
mov ax, _space_window_h
neg ax
loc_D7EC:
shl ax, 3
mov [di+Point.y], ax
loc_D7F2:
inc [bp+@@i]
add di, size Point
loc_D7F8:
cmp [bp+@@i], STAR_COUNT
jl loc_D73A
mov si, offset orb
cmp [si+orb_particle_t.OP_center_x], SUBPIXEL_NONE
jz short loc_D83F
mov ax, [si+orb_particle_t.OP_velocity.x]
sub ax, _space_camera_velocity.x
cwde
add [si+orb_particle_t.OP_center_x], eax
mov ax, [si+orb_particle_t.OP_velocity.y]
sub ax, _space_camera_velocity.y
cwde
add [si+orb_particle_t.OP_center_y], eax
cmp [si+orb_particle_t.OP_al_radius], ORB_RADIUS_FULL
jb short loc_D83F
cmp byte_1183A, 0
jz short loc_D83F
call sub_D853
cmp [si+orb_particle_t.OP_velocity.y], (11 shl 4) + 4
jge short loc_D83F
inc [si+orb_particle_t.OP_velocity.y]
loc_D83F:
mov ax, word_151E2
mov bx, 3
cwd
idiv bx
or dx, dx
jnz short loc_D84F
call sub_D8B6
loc_D84F:
pop di
pop si
leave
retn
sub_D5E1 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_D853 proc near
push bp
mov bp, sp
push si
mov ax, particle_i_1183C
inc particle_i_1183C
imul ax, size orb_particle_t
add ax, offset _particles
mov si, ax
mov [si+orb_particle_t.OP_patnum_tiny], PAT_ORB_PARTICLE
call IRand
and al, 7Fh
mov [si+orb_particle_t.OP_angle], al
mov [si+orb_particle_t.OP_speed], (3 shl 4)
push offset point_151D2
push word ptr orb.OP_center_x
push word ptr orb.OP_center_y
push (12 shl 4)
mov al, [si+orb_particle_t.OP_angle]
mov ah, 0
push ax
call vector2_at
movsx eax, point_151D2.x
mov [si+orb_particle_t.OP_center_x], eax
movsx eax, point_151D2.y
mov [si+orb_particle_t.OP_center_y], eax
cmp particle_i_1183C, ORB_PARTICLE_COUNT
jl short loc_D8B3
mov particle_i_1183C, 0
loc_D8B3:
pop si
pop bp
retn
sub_D853 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_D8B6 proc near
push bp
mov bp, sp
mov dx, (ORB_TRAIL_COUNT - 2)
jmp short loc_D8E3
; ---------------------------------------------------------------------------
loc_D8BE:
mov bx, dx
shl bx, 2
mov ax, _orb_trails_center[0 * size Point][bx].x
mov bx, dx
shl bx, 2
mov _orb_trails_center[1 * size Point][bx].x, ax
mov bx, dx
shl bx, 2
mov ax, _orb_trails_center[0 * size Point][bx].y
mov bx, dx
shl bx, 2
mov _orb_trails_center[1 * size Point][bx].y, ax
dec dx
loc_D8E3:
or dx, dx
jge short loc_D8BE
mov ax, word ptr orb.OP_center_x
mov _orb_trails_center[0 * size Point].x, ax
mov ax, word ptr orb.OP_center_y
mov _orb_trails_center[0 * size Point].y, ax
pop bp
retn
sub_D8B6 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_D8F5 proc near
push bp
mov bp, sp
push si
mov si, offset _particles
xor cx, cx
jmp short loc_D91D
; ---------------------------------------------------------------------------
loc_D900:
inc [si+orb_particle_t.OP_gather_frame]
mov ax, [si+orb_particle_t.OP_gather_frame]
mov bx, 8
cwd
idiv bx
or dx, dx
jnz short loc_D919
cmp [si+orb_particle_t.OP_patnum_tiny], PAT_ORB_PARTICLE_last
jge short loc_D919
inc [si+orb_particle_t.OP_patnum_tiny]
loc_D919:
inc cx
add si, size orb_particle_t
loc_D91D:
cmp cx, ORB_PARTICLE_COUNT
jl short loc_D900
; si == particles[ORB_INDEX]
cmp [si+orb_particle_t.OP_al_radius], ORB_RADIUS_FULL
jnb short loc_D92E
mov al, byte_1183A
add [si+orb_particle_t.OP_al_radius], al
loc_D92E:
pop si
pop bp
retn
sub_D8F5 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_D931 proc near
var_2 = word ptr -2
enter 2, 0
push si
inc word_1183E
cmp word_1183E, 80
jl loc_DA31
cmp word_1183E, 176
jge short loc_D951
inc _space_camera_velocity.y
jmp short loc_D9B5
; ---------------------------------------------------------------------------
loc_D951:
cmp word_1183E, 344
jge short loc_D964
mov al, byte_1183A
mov ah, 0
add _space_camera_velocity.y, ax
jmp short loc_D9B5
; ---------------------------------------------------------------------------
loc_D964:
cmp byte_11840, 0
jnz short loc_D991
mov ax, word_151E2
mov bx, 16
cwd
idiv bx
or dx, dx
jnz short loc_D97D
mov ax, 1
jmp short loc_D97F
; ---------------------------------------------------------------------------
loc_D97D:
xor ax, ax
loc_D97F:
add _space_camera_velocity.y, ax
cmp _space_camera_velocity.y, ((11 shl 4) + 6)
jle short loc_D9B5
inc byte_11840
jmp short loc_D9B5
; ---------------------------------------------------------------------------
loc_D991:
mov ax, word_151E2
mov bx, 16
cwd
idiv bx
or dx, dx
jnz short loc_D9A3
mov ax, 1
jmp short loc_D9A5
; ---------------------------------------------------------------------------
loc_D9A3:
xor ax, ax
loc_D9A5:
sub _space_camera_velocity.y, ax
cmp _space_camera_velocity.y, ((11 shl 4) + 2)
jge short loc_D9B5
dec byte_11840
loc_D9B5:
cmp word_1183E, 234
jl short loc_DA31
cmp word_1183E, 512
jge short loc_DA04
mov ax, word_1183E
add ax, -234
mov si, ax
cmp si, 88
jle short loc_D9D7
add ax, -88
jmp short loc_D9D9
; ---------------------------------------------------------------------------
loc_D9D7:
xor ax, ax
loc_D9D9:
mov [bp+var_2], ax
mov ax, (RES_X / 2)
sub ax, [bp+var_2]
push ax ; center_x
push (RES_Y / 2) ; center_y
mov ax, si
cwd
sub ax, dx
sar ax, 1
mov dx, 384
sub dx, ax
push dx ; w
mov ax, si
mov bx, 8
cwd
idiv bx
add ax, 320
push ax ; h
call space_window_set
jmp short loc_DA31
; ---------------------------------------------------------------------------
loc_DA04:
cmp word_1183E, 992
jl short loc_DA18
cmp word_1183E, 1024
jg short loc_DA18
dec orb.OP_velocity.x
loc_DA18:
cmp word_1183E, 1008
jl short loc_DA2C
cmp word_1183E, 1040
jg short loc_DA2C
dec _space_camera_velocity.x
loc_DA2C:
mov ax, 1
jmp short loc_DA33
; ---------------------------------------------------------------------------
loc_DA31:
xor ax, ax
loc_DA33:
pop si
leave
retn
sub_D931 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_DA36 proc near
push bp
mov bp, sp
push si
mov ax, word_11842
imul ax, size orb_particle_t
add ax, offset _particles
mov si, ax
inc word_11842
mov ax, word_11842
cmp ax, 40h
jge loc_DAD4
call IRand
mov bx, (1 shl 4) + 8
cwd
idiv bx
add dx, 8
mov [si+orb_particle_t.OP_speed], dx
call IRand
mov bx, 40h
cwd
idiv bx
add dl, 20h
mov [si+orb_particle_t.OP_angle], dl
call IRand
mov bx, ORB_PARTICLE_CELS
cwd
idiv bx
mov [si+orb_particle_t.OP_patnum_tiny], dx
call IRand
cwd
idiv _space_window_w
shl dx, 4
mov ax, _space_window_w
shl ax, 3
sub dx, ax
movsx eax, dx
mov [si+orb_particle_t.OP_center_x], eax
mov ax, _space_window_h
neg ax
shl ax, 3
add ax, (-4 shl 4)
cwde
mov [si+orb_particle_t.OP_center_y], eax
cmp [si+orb_particle_t.OP_angle], 40h
jnb short loc_DABA
mov al, X_RIGHT
jmp short loc_DABC
; ---------------------------------------------------------------------------
loc_DABA:
mov al, X_LEFT
loc_DABC:
mov [si+orb_particle_t.OP_al_rain_sway_x_direction], al
lea ax, [si+orb_particle_t.OP_velocity]
push ax
pushd 0
push [si+orb_particle_t.OP_speed]
mov al, [si+orb_particle_t.OP_angle]
mov ah, 0
push ax
call vector2_at
loc_DAD4:
pop si
pop bp
retn
sub_DA36 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_DAD7 proc near
push bp
mov bp, sp
push si
push di
mov si, offset _particles
cmp _space_camera_velocity.x, 0
jge short loc_DAEF
mov al, byte_1183A
mov ah, 0
add _space_camera_velocity.x, ax
loc_DAEF:
inc word_11844
cmp word_11844, 32
jl loc_DBE0
cmp word_11844, 128
jge short loc_DB0B
dec _space_camera_velocity.y
jmp loc_DBC3
; ---------------------------------------------------------------------------
loc_DB0B:
cmp word_11844, 308
jge short loc_DB1F
mov al, byte_1183A
mov ah, 0
sub _space_camera_velocity.y, ax
jmp loc_DBC3
; ---------------------------------------------------------------------------
loc_DB1F:
mov ax, _space_window_w
cwd
sub ax, dx
sar ax, 1
add ax, _space_window_center.x
cmp ax, (RES_X - 10)
jge short loc_DB45
mov ax, _space_window_center.x
add ax, 4
call space_window_set pascal, ax, (RES_Y / 2), _space_window_w, _space_window_h
loc_DB45:
mov word_151DE, 0
mov ax, word_11844
mov bx, 8
cwd
idiv bx
or dx, dx
jnz short loc_DB9F
call sub_DA36
xor di, di
jmp short loc_DB9A
; ---------------------------------------------------------------------------
loc_DB5F:
cmp [si+orb_particle_t.OP_al_rain_sway_x_direction], X_RIGHT
jnz short loc_DB74
inc [si+orb_particle_t.OP_angle]
cmp [si+orb_particle_t.OP_angle], 60h
jb short loc_DB81
mov [si+orb_particle_t.OP_al_rain_sway_x_direction], X_LEFT
jmp short loc_DB81
; ---------------------------------------------------------------------------
loc_DB74:
dec [si+orb_particle_t.OP_angle]
cmp [si+orb_particle_t.OP_angle], 20h
ja short loc_DB81
mov [si+orb_particle_t.OP_al_rain_sway_x_direction], X_RIGHT
loc_DB81:
lea ax, [si+orb_particle_t.OP_velocity]
push ax
pushd 0
push [si+orb_particle_t.OP_speed]
mov al, [si+orb_particle_t.OP_angle]
mov ah, 0
push ax
call vector2_at
inc di
add si, size orb_particle_t
loc_DB9A:
cmp di, ORB_PARTICLE_COUNT
jl short loc_DB5F
loc_DB9F:
cmp word_11844, 30000
jl short loc_DBAD
mov word_11844, 29992
loc_DBAD:
mov ax, _space_window_w
cwd
sub ax, dx
sar ax, 1
add ax, _space_window_center.x
cmp ax, (RES_X - 10)
jl short loc_DBC3
mov ax, 1
jmp short loc_DBE2
; ---------------------------------------------------------------------------
loc_DBC3:
mov ax, word_11844
mov bx, 4
cwd
idiv bx
or dx, dx
jnz short loc_DBE0
cmp Palettes[0 * size rgb_t].b, 96
jnb short loc_DBE0
inc Palettes[0 * size rgb_t].b
call far ptr palette_show
loc_DBE0:
xor ax, ax
loc_DBE2:
pop di
pop si
pop bp
retn
sub_DAD7 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_DBE6 proc near
var_2C = byte ptr -2Ch
var_2 = word ptr -2
arg_0 = word ptr 4
arg_2 = word ptr 6
arg_4 = word ptr 8
arg_6 = word ptr 0Ah
arg_8 = word ptr 0Ch
arg_A = word ptr 0Eh
enter 2Ch, 0
push si
push di
mov di, [bp+arg_8]
cmp [bp+arg_2], 0
jge short loc_DBFF
mov byte_11846, 1
mov al, 1
jmp loc_DCF6
; ---------------------------------------------------------------------------
loc_DBFF:
mov ax, [bp+arg_6]
mov bx, 10h
cwd
idiv bx
add ax, 7
cmp ax, [bp+arg_2]
jge short loc_DC48
call grcg_setcolor pascal, (GC_RMW shl 16) + 1
mov ax, [bp+arg_A]
mov bx, 8
cwd
idiv bx
push ax
push di
mov ax, [bp+arg_A]
add ax, [bp+arg_6]
dec ax
cwd
idiv bx
push ax
mov ax, di
add ax, [bp+arg_4]
dec ax
push ax
call grcg_byteboxfill_x
GRCG_OFF_CLOBBERING dx
mov al, 2
jmp loc_DCF6
; ---------------------------------------------------------------------------
loc_DC48:
mov bx, 8
mov ax, [bp+arg_A]
cwd
idiv bx
mov [bp+arg_A], ax
mov bx, 10h
mov ax, di
cwd
idiv bx
mov di, ax
mov ax, [bp+arg_6]
cwd
idiv bx
mov [bp+arg_6], ax
mov ax, [bp+arg_4]
cwd
idiv bx
mov [bp+arg_4], ax
cmp [bp+arg_0], 0
jle short loc_DC7D
mov [bp+var_2], 0
jmp short loc_DC84
; ---------------------------------------------------------------------------
loc_DC7D:
mov ax, [bp+arg_6]
dec ax
mov [bp+var_2], ax
loc_DC84:
xor si, si
jmp short loc_DCD0
; ---------------------------------------------------------------------------
loc_DC88:
cmp [bp+arg_2], 7
jl short loc_DC9A
lea bx, [bp+var_2C]
add bx, [bp+var_2]
mov byte ptr ss:[bx], 152
jmp short loc_DCBA
; ---------------------------------------------------------------------------
loc_DC9A:
cmp [bp+arg_2], 0
jge short loc_DCAC
lea bx, [bp+var_2C]
add bx, [bp+var_2]
mov byte ptr ss:[bx], 2
jmp short loc_DCBA
; ---------------------------------------------------------------------------
loc_DCAC:
lea bx, [bp+var_2C]
add bx, [bp+var_2]
mov al, 159
sub al, byte ptr [bp+arg_2]
mov ss:[bx], al
loc_DCBA:
mov ax, si
add ax, ax
add ax, [bp+arg_A]
cmp ax, 50h ; 'P'
jge short loc_DCD5
inc si
mov ax, [bp+arg_0]
add [bp+var_2], ax
dec [bp+arg_2]
loc_DCD0:
cmp si, [bp+arg_6]
jl short loc_DC88
loc_DCD5:
mov [bp+si+var_2C], 0
xor si, si
jmp short loc_DCEF
; ---------------------------------------------------------------------------
loc_DCDD:
push [bp+arg_A]
push di
push ss
lea ax, [bp+var_2C]
push ax
push TX_BLACK
call gaiji_putsa
inc si
inc di
loc_DCEF:
cmp si, [bp+arg_4]
jle short loc_DCDD
mov al, 0
loc_DCF6:
pop di
pop si
leave
retn 0Ch
sub_DBE6 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_DCFC proc near
var_4 = word ptr -4
var_2 = word ptr -2
@@measure = word ptr 4
@@slot = word ptr 6
@@y_center = word ptr 8
@@x_center = word ptr 0Ah
enter 4, 0
push si
push di
mov di, [bp+@@y_center]
cdg_slot_offset ax, [bp+@@slot]
mov si, ax
mov ax, [si+cdg_t.pixel_w]
cwd
sub ax, dx
sar ax, 1
sub [bp+@@x_center], ax
mov ax, [si+cdg_t.pixel_h]
cwd
sub ax, dx
sar ax, 1
sub di, ax
cmp word_11848, 1
jg loc_DDBC
mov ax, [si+cdg_t.pixel_w]
mov bx, 16
cwd
idiv bx
add ax, 7
mov word_151C4, ax
mov word_151C6, 0
inc word_11848
call cdg_put_noalpha_8 pascal, [bp+@@x_center], di, [bp+@@slot]
mov [bp+var_2], 0
jmp short loc_DDB1
; ---------------------------------------------------------------------------
loc_DD5A:
mov [bp+var_4], 0
jmp short loc_DDA2
; ---------------------------------------------------------------------------
loc_DD61:
mov ax, [bp+@@x_center]
mov bx, 8
cwd
idiv bx
push ax
mov ax, [bp+var_4]
cwd
idiv bx
pop dx
add dx, ax
cmp dx, 50h ; 'P'
jge short loc_DD9E
mov ax, [bp+@@x_center]
cwd
idiv bx
push ax
mov ax, [bp+var_4]
cwd
idiv bx
pop dx
add dx, ax
push dx
mov ax, di
mov bx, 16
cwd
idiv bx
push ax
push ds
push offset unk_1184C
push TX_BLACK + TX_REVERSE
call text_putsa
loc_DD9E:
add [bp+var_4], 10h
loc_DDA2:
mov ax, [si+2]
cmp ax, [bp+var_4]
jge short loc_DD61
add [bp+var_2], 10h
add di, 10h
loc_DDB1:
mov ax, [si+4]
cmp ax, [bp+var_2]
jge short loc_DD5A
jmp loc_DE6C
; ---------------------------------------------------------------------------
loc_DDBC:
cmp word_11848, 3
jg short loc_DE01
inc word_151C6
mov ax, word_151C6
mov bx, 4
cwd
idiv bx
or dx, dx
jnz short loc_DDD8
dec word_151C4
loc_DDD8:
push [bp+@@x_center]
push di
push [si+cdg_t.pixel_w]
push [si+cdg_t.pixel_h]
push word_151C4
push 1
call sub_DBE6
cmp al, 1
jnz short loc_DE6C
inc word_11848
mov word_151C4, 0
mov word_151C6, 0
jmp short loc_DE6C
; ---------------------------------------------------------------------------
loc_DE01:
mov ax, measure_151E0
cmp ax, [bp+@@measure]
jl short loc_DE6C
cmp [bp+@@measure], 3996
jz short loc_DE6C
cmp word_11848, 4
jnz short loc_DE49
inc word_151C6
mov ax, word_151C6
mov bx, 4
cwd
idiv bx
or dx, dx
jnz short loc_DE2C
inc word_151C4
loc_DE2C:
push [bp+@@x_center]
push di
push [si+cdg_t.pixel_w]
push [si+cdg_t.pixel_h]
push word_151C4
push 0FFFFh
call sub_DBE6
cmp al, 2
jnz short loc_DE6C
inc word_11848
jmp short loc_DE6C
; ---------------------------------------------------------------------------
loc_DE49:
push [bp+@@x_center]
push di
push [si+cdg_t.pixel_w]
push [si+cdg_t.pixel_h]
push 80FFFFh
call sub_DBE6
mov word_11848, 0
mov byte_11846, 1
mov ax, 1
jmp short loc_DE6E
; ---------------------------------------------------------------------------
loc_DE6C:
xor ax, ax
loc_DE6E:
pop di
pop si
leave
retn 8
sub_DCFC endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_DE74 proc near
var_4 = word ptr -4
var_2 = word ptr -2
@@measure = word ptr 4
@@slot = word ptr 6
@@y_center = word ptr 8
@@x_center = word ptr 0Ah
enter 4, 0
push si
push di
mov di, [bp+@@y_center]
cdg_slot_offset ax, [bp+@@slot]
mov si, ax
mov ax, [si+cdg_t.pixel_w]
cwd
sub ax, dx
sar ax, 1
sub [bp+@@x_center], ax
mov ax, [si+cdg_t.pixel_h]
cwd
sub ax, dx
sar ax, 1
sub di, ax
cmp word_1184A, 1
jg loc_DF34
mov ax, [si+cdg_t.pixel_w]
mov bx, 16
cwd
idiv bx
add ax, 7
mov word_151C8, ax
mov word_151CA, 0
inc word_1184A
call cdg_put_noalpha_8 pascal, [bp+@@x_center], di, [bp+@@slot]
mov [bp+var_2], 0
jmp short loc_DF29
; ---------------------------------------------------------------------------
loc_DED2:
mov [bp+var_4], 0
jmp short loc_DF1A
; ---------------------------------------------------------------------------
loc_DED9:
mov ax, [bp+@@x_center]
mov bx, 8
cwd
idiv bx
push ax
mov ax, [bp+var_4]
cwd
idiv bx
pop dx
add dx, ax
cmp dx, 50h ; 'P'
jge short loc_DF16
mov ax, [bp+@@x_center]
cwd
idiv bx
push ax
mov ax, [bp+var_4]
cwd
idiv bx
pop dx
add dx, ax
push dx
mov ax, di
mov bx, 16
cwd
idiv bx
push ax
push ds
push offset unk_1184F
push TX_BLACK + TX_REVERSE
call text_putsa
loc_DF16:
add [bp+var_4], 10h
loc_DF1A:
mov ax, [si+cdg_t.pixel_w]
cmp ax, [bp+var_4]
jge short loc_DED9
add [bp+var_2], 10h
add di, 10h
loc_DF29:
mov ax, [si+cdg_t.pixel_h]
cmp ax, [bp+var_2]
jge short loc_DED2
jmp loc_DFE4
; ---------------------------------------------------------------------------
loc_DF34:
cmp word_1184A, 3
jg short loc_DF79
inc word_151CA
mov ax, word_151CA
mov bx, 4
cwd
idiv bx
or dx, dx
jnz short loc_DF50
dec word_151C8
loc_DF50:
push [bp+@@x_center]
push di
push [si+cdg_t.pixel_w]
push [si+cdg_t.pixel_h]
push word_151C8
push 1
call sub_DBE6
cmp al, 1
jnz short loc_DFE4
inc word_1184A
mov word_151C8, 0
mov word_151CA, 0
jmp short loc_DFE4
; ---------------------------------------------------------------------------
loc_DF79:
mov ax, measure_151E0
cmp ax, [bp+@@measure]
jl short loc_DFE4
cmp [bp+@@measure], 3996
jz short loc_DFE4
cmp word_1184A, 4
jnz short loc_DFC1
inc word_151CA
mov ax, word_151CA
mov bx, 4
cwd
idiv bx
or dx, dx
jnz short loc_DFA4
inc word_151C8
loc_DFA4:
push [bp+@@x_center]
push di
push [si+cdg_t.pixel_w]
push [si+cdg_t.pixel_h]
push word_151C8
push 0FFFFh
call sub_DBE6
cmp al, 2
jnz short loc_DFE4
inc word_1184A
jmp short loc_DFE4
; ---------------------------------------------------------------------------
loc_DFC1:
push [bp+@@x_center]
push di
push [si+cdg_t.pixel_w]
push [si+cdg_t.pixel_h]
push 80FFFFh
call sub_DBE6
mov word_1184A, 0
mov byte_11846, 1
mov ax, 1
jmp short loc_DFE6
; ---------------------------------------------------------------------------
loc_DFE4:
xor ax, ax
loc_DFE6:
pop di
pop si
leave
retn 8
sub_DE74 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_DFEC proc near
@@star_center = word ptr -0Ah
@@trail_center = word ptr -8
@@trail_col = word ptr -6
@@y = word ptr -4
@@x = word ptr -2
enter 0Ah, 0
push si
push di
mov si, offset orb
mov [bp+@@trail_center], offset _orb_trails_center[(ORB_TRAIL_COUNT - 1) * size Point]
mov [bp+@@star_center], offset _stars_center
call grcg_setcolor pascal, (GC_RMW shl 16) + 0
mov ax, _space_window_w
cwd
sub ax, dx
sar ax, 1
mov dx, _space_window_center.x
sub dx, ax
push dx
mov ax, _space_window_h
cwd
sub ax, dx
sar ax, 1
mov dx, _space_window_center.y
sub dx, ax
push dx
mov ax, _space_window_w
cwd
sub ax, dx
sar ax, 1
add ax, _space_window_center.x
dec ax
push ax
mov ax, _space_window_h
cwd
sub ax, dx
sar ax, 1
add ax, _space_window_center.y
dec ax
push ax
call grcg_boxfill
GRCG_OFF_CLOBBERING dx
xor di, di
jmp short loc_E098
; ---------------------------------------------------------------------------
loc_E053:
mov bx, [bp+@@star_center]
mov ax, [bx+Point.x]
mov bx, 16
cwd
idiv bx
add ax, _space_window_center.x
add ax, -4
mov [bp+@@x], ax
mov bx, [bp+@@star_center]
mov ax, [bx+Point.y]
mov bx, 16
cwd
idiv bx
add ax, _space_window_center.y
add ax, -4
mov [bp+@@y], ax
push [bp+@@x] ; x
push ax ; y
mov ax, di
mov bx, 2
cwd
idiv bx
add dx, PAT_STAR_BIG
push dx ; num
call super_put_tiny_small
inc di
add [bp+@@star_center], size Point
loc_E098:
cmp di, STAR_COUNT
jl short loc_E053
xor di, di
mov [bp+@@trail_col], 6
jmp short loc_E0FB
; ---------------------------------------------------------------------------
loc_E0A6:
mov bx, [bp+@@trail_center]
cmp [bx+Point.x], SUBPIXEL_NONE
jz short loc_E0F6
mov bx, [bp+@@trail_center]
mov ax, [bx+Point.x]
mov bx, 16
cwd
idiv bx
add ax, _space_window_center.x
mov [bp+@@x], ax
mov bx, [bp+@@trail_center]
mov ax, [bx+Point.y]
mov bx, 16
cwd
idiv bx
add ax, _space_window_center.y
mov [bp+@@y], ax
push GC_RMW
mov ax, [bp+@@trail_col]
inc [bp+@@trail_col]
push ax
call grcg_setcolor
call grcg_circlefill pascal, [bp+@@x], [bp+@@y], ORB_RADIUS_FULL
GRCG_OFF_CLOBBERING dx
loc_E0F6:
inc di
sub [bp+@@trail_center], size Point
loc_E0FB:
cmp di, ORB_TRAIL_COUNT
jl short loc_E0A6
cmp [si+orb_particle_t.OP_center_x], SUBPIXEL_NONE
jz loc_E18B
mov eax, [si+orb_particle_t.OP_center_x]
mov ebx, 16
cdq
idiv ebx
add ax, _space_window_center.x
add ax, -(ORB_W / 2)
mov [bp+@@x], ax
mov eax, [si+orb_particle_t.OP_center_y]
cdq
idiv ebx
add ax, _space_window_center.y
add ax, -(ORB_H / 2)
mov [bp+@@y], ax
cmp [si+orb_particle_t.OP_al_radius], ORB_RADIUS_FULL
jb short loc_E161
mov al, byte_151CC
mov ah, 0
mov bx, 4
cwd
idiv bx
cwd
idiv bx
add dx, 8
mov di, dx
call super_put_rect pascal, [bp+@@x], [bp+@@y], dx
inc byte_151CC
jmp short loc_E18B
; ---------------------------------------------------------------------------
loc_E161:
call grcg_setcolor pascal, (GC_RMW shl 16) + V_WHITE
mov ax, [bp+@@x]
add ax, (ORB_W / 2)
push ax
mov ax, [bp+@@y]
add ax, (ORB_H / 2)
push ax
mov al, [si+orb_particle_t.OP_al_radius]
mov ah, 0
push ax
call grcg_circlefill
GRCG_OFF_CLOBBERING dx
loc_E18B:
sub si, size orb_particle_t
; ; si == particles[ORB_PARTICLE_COUNT - 1]
xor di, di
jmp loc_E21D
; ---------------------------------------------------------------------------
loc_E193:
cmp [si+orb_particle_t.OP_center_x], SUBPIXEL_NONE
jz short loc_E219
mov ax, _space_window_w
neg ax
shl ax, 3
add ax, (-4 shl 4)
cwde
cmp eax, [si+orb_particle_t.OP_center_x]
jge short loc_E219
mov ax, _space_window_w
shl ax, 3
add ax, (4 shl 4)
cwde
cmp eax, [si+orb_particle_t.OP_center_x]
jle short loc_E219
mov ax, _space_window_h
neg ax
shl ax, 3
add ax, (-4 shl 4)
cwde
cmp eax, [si+orb_particle_t.OP_center_y]
jge short loc_E219
mov ax, _space_window_h
shl ax, 3
add ax, (4 shl 4)
cwde
cmp eax, [si+orb_particle_t.OP_center_y]
jle short loc_E219
mov eax, [si+orb_particle_t.OP_center_x]
mov ebx, 16
cdq
idiv ebx
add ax, _space_window_center.x
add ax, -4
mov [bp+@@x], ax
mov eax, [si+orb_particle_t.OP_center_y]
cdq
idiv ebx
add ax, _space_window_center.y
add ax, -4
mov [bp+@@y], ax
call super_put_tiny_small pascal, [bp+@@x], ax, [si+orb_particle_t.OP_patnum_tiny]
loc_E219:
inc di
sub si, size orb_particle_t
loc_E21D:
cmp di, ORB_PARTICLE_COUNT
jl loc_E193
call grcg_setcolor pascal, (GC_RMW shl 16) + 1
mov ax, _space_window_w
cwd
sub ax, dx
sar ax, 1
mov dx, _space_window_center.x
sub dx, ax
add dx, -8
push dx
mov ax, _space_window_h
cwd
sub ax, dx
sar ax, 1
mov dx, _space_window_center.y
sub dx, ax
push dx
mov ax, _space_window_w
cwd
sub ax, dx
sar ax, 1
mov dx, _space_window_center.x
sub dx, ax
dec dx
push dx
mov ax, _space_window_h
cwd
sub ax, dx
sar ax, 1
add ax, _space_window_center.y
dec ax
push ax
call grcg_boxfill
mov ax, _space_window_w
cwd
sub ax, dx
sar ax, 1
add ax, _space_window_center.x
push ax
mov ax, _space_window_h
cwd
sub ax, dx
sar ax, 1
mov dx, _space_window_center.y
sub dx, ax
push dx
mov ax, _space_window_w
cwd
sub ax, dx
sar ax, 1
add ax, _space_window_center.x
add ax, 7
push ax
mov ax, _space_window_h
cwd
sub ax, dx
sar ax, 1
add ax, _space_window_center.y
dec ax
push ax
call grcg_boxfill
mov ax, _space_window_w
cwd
sub ax, dx
sar ax, 1
mov dx, _space_window_center.x
sub dx, ax
add dx, -8
push dx
mov ax, _space_window_h
cwd
sub ax, dx
sar ax, 1
mov dx, _space_window_center.y
sub dx, ax
add dx, -8
push dx
mov ax, _space_window_w
cwd
sub ax, dx
sar ax, 1
add ax, _space_window_center.x
add ax, 7
push ax
mov ax, _space_window_h
cwd
sub ax, dx
sar ax, 1
mov dx, _space_window_center.y
sub dx, ax
dec dx
push dx
call grcg_boxfill
mov ax, _space_window_w
cwd
sub ax, dx
sar ax, 1
mov dx, _space_window_center.x
sub dx, ax
add dx, -8
push dx
mov ax, _space_window_h
cwd
sub ax, dx
sar ax, 1
add ax, _space_window_center.y
push ax
mov ax, _space_window_w
cwd
sub ax, dx
sar ax, 1
add ax, _space_window_center.x
add ax, 7
push ax
mov ax, _space_window_h
cwd
sub ax, dx
sar ax, 1
add ax, _space_window_center.y
add ax, 7
push ax
call grcg_boxfill
GRCG_OFF_CLOBBERING dx
pop di
pop si
leave
retn
sub_DFEC endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_E349 proc near
push bp
mov bp, sp
call sub_D5E1
call sub_DFEC
push 1
call frame_delay
graph_accesspage byte_1183A
mov al, 1
sub al, byte_1183A
mov byte_1183A, al
graph_showpage al
cmp byte_11846, 0
jz short loc_E37E
call text_clear
mov byte_11846, 0
loc_E37E:
inc word_151E2
call _snd_bgm_measure
mov measure_151E0, ax
cmp measure_151E0, 0
jge short loc_E39D
mov ax, word_151E2
mov bx, 22
cwd
idiv bx
mov measure_151E0, ax
loc_E39D:
pop bp
retn
sub_E349 endp
include th05/end/verdict_bitmap.asm
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_E41D proc near
var_4 = word ptr -4
@@verdict_bitmap_offset = word ptr -2
enter 4, 0
push si
push di
mov x_116E2, 32
mov col_116E4, 13
mov word_116E6, 0Dh
mov y_116E8, 16
mov PaletteTone, 0
call far ptr palette_show
call grcg_setcolor pascal, (GC_RMW shl 16) + 1
graph_accesspage 0
call grcg_byteboxfill_x pascal, large 0, (((RES_X - 1) / 8) shl 16) or (RES_Y - 1)
GRCG_OFF_CLOBBERING dx
call sub_D21D
call verdict_bitmap_snap pascal, (1 * VERDICT_SCREEN_SIZE)
call grcg_setcolor pascal, (GC_RMW shl 16) + 1
call grcg_byteboxfill_x pascal, large 0, (((RES_X - 1) / 8) shl 16) or (RES_Y - 1)
graph_accesspage 1
call grcg_byteboxfill_x pascal, large 0, (((RES_X - 1) / 8) shl 16) or (RES_Y - 1)
GRCG_OFF_CLOBBERING dx
call snd_load pascal, ds, offset aStaff, SND_LOAD_SONG
kajacall KAJA_SONG_PLAY
call cdg_load_all_noalpha pascal, 0, ds, offset aStf00_cdg
call cdg_load_all_noalpha pascal, 1, ds, offset aStf01_cdg
call cdg_load_all_noalpha pascal, 2, ds, offset aStf02_cdg
call cdg_load_all_noalpha pascal, 3, ds, offset aStf03_cdg
call cdg_load_all_noalpha pascal, 4, ds, offset aStf04_cdg
call cdg_load_all_noalpha pascal, 5, ds, offset aStf05_cdg
call cdg_load_all_noalpha pascal, 6, ds, offset aStf06_cdg
call cdg_load_all_noalpha pascal, 7, ds, offset aStf07_cdg
call cdg_load_all_noalpha pascal, 8, ds, offset aStf08_cdg
call cdg_load_all_noalpha pascal, 9, ds, offset aStf09_cdg
call cdg_load_all_noalpha pascal, 10, ds, offset aStf10_cdg
call super_entry_bfnt pascal, ds, offset aStf01_bft ; "stf01.bft"
call super_entry_bfnt pascal, ds, offset aStf00_bft ; "stf00.bft"
xor si, si
jmp short loc_E550
; ---------------------------------------------------------------------------
loc_E549:
call super_convert_tiny pascal, si
inc si
loc_E550:
cmp si, 8
jl short loc_E549
mov Palettes[0 * size rgb_t].b, 48
call sub_D387
xor si, si
mov word_151E2, 0
loc_E565:
cmp si, 100
jg short loc_E573
mov PaletteTone, si
call far ptr palette_show
loc_E573:
call sub_E349
inc si
cmp measure_151E0, 30
jl short loc_E565
call sub_D49D
xor si, si
jmp short loc_E58C
; ---------------------------------------------------------------------------
loc_E585:
call sub_D8F5
call sub_E349
inc si
loc_E58C:
cmp si, 32
jl short loc_E585
call sub_D509
loc_E594:
call sub_D931
mov si, ax
call sub_E349
or si, si
jz short loc_E594
cmp measure_151E0, 48
jl short loc_E594
xor si, si
xor di, di
loc_E5AB:
call sub_D931
cmp si, 128
jle short loc_E5C9
push (528 shl 16) or 240
push (1 shl 16) or 76
call sub_DE74
or ax, ax
jz short loc_E5C9
xor si, si
loc_E5C9:
push (464 shl 16) or 192
pushd (0 shl 16) or 76
call sub_DCFC
mov di, ax
call sub_E349
inc si
or di, di
jz short loc_E5AB
xor di, di
loc_E5E1:
call sub_D931
push (464 shl 16) or 200
push (2 shl 16) or 92
call sub_DCFC
mov di, ax
call sub_E349
or di, di
jz short loc_E5E1
xor si, si
xor di, di
loc_E600:
call sub_D931
cmp si, 256
jle short loc_E61E
push (464 shl 16) or 224
push (4 shl 16) or 120
call sub_DE74
or ax, ax
jz short loc_E61E
xor si, si
loc_E61E:
push (464 shl 16) or 176
push (3 shl 16) or 120
call sub_DCFC
mov di, ax
call sub_E349
inc si
or di, di
jz short loc_E600
call sub_D531
loc_E63A:
call sub_DAD7
mov si, ax
call sub_E349
or si, si
jz short loc_E63A
xor di, di
loc_E648:
call sub_DAD7
push (176 shl 16) or 200
push (5 shl 16) or 172
call sub_DCFC
mov di, ax
call sub_E349
or di, di
jz short loc_E648
loc_E663:
call sub_DAD7
push (176 shl 16) or 200
push (6 shl 16) or 188
call sub_DCFC
mov di, ax
call sub_E349
or di, di
jz short loc_E663
loc_E67E:
call sub_DAD7
push (176 shl 16) or 200
push (7 shl 16) or 204
call sub_DCFC
mov di, ax
call sub_E349
or di, di
jz short loc_E67E
loc_E699:
call sub_DAD7
push (176 shl 16) or 200
push (8 shl 16) or 220
call sub_DCFC
mov di, ax
call sub_E349
or di, di
jz short loc_E699
loc_E6B4:
call sub_DAD7
push (176 shl 16) or 200
push (9 shl 16) or 236
call sub_DCFC
mov di, ax
call sub_E349
or di, di
jz short loc_E6B4
xor si, si
mov [bp+@@verdict_bitmap_offset], 0
mov [bp+var_4], 0
loc_E6DB:
call _input_reset_sense_held
cmp si, 256
jz short loc_E6EC
cmp si, 257
jnz short loc_E6F1
loc_E6EC:
call sub_CA9B
jmp short loc_E70D
; ---------------------------------------------------------------------------
loc_E6F1:
cmp si, 320
jz short loc_E6FD
cmp si, 321
jnz short loc_E702
loc_E6FD:
call sub_D16F
jmp short loc_E70D
; ---------------------------------------------------------------------------
loc_E702:
cmp si, 350
jnz short loc_E70D
call verdict_bitmap_snap pascal, 0
loc_E70D:
call sub_DAD7
push (176 shl 16) or 368
push (10 shl 16) or 3996
call sub_DCFC
inc si
cmp si, 400
; Hack (jl loc_E7BB)
; No idea why TASM can't assemble this properly after script_op() was
; decompiled. Seems to be related to the size of this segment; it works
; when removing some instructions further above.
; It still doesn't after decompiling cutscene_animate() though?
db 0Fh, 8Ch, 93h, 00h
test _key_det.hi, high INPUT_CANCEL
jnz short loc_E757
test _key_det.lo, low INPUT_BOMB
jnz short loc_E757
cmp [bp+var_4], 0
jnz short loc_E781
test _key_det.lo, low INPUT_SHOT
jnz short loc_E74A
test _key_det.hi, high INPUT_OK
jz short loc_E75C
loc_E74A:
cmp [bp+@@verdict_bitmap_offset], 0
jnz short loc_E757
mov [bp+var_4], 1
jmp short loc_E75C
; ---------------------------------------------------------------------------
loc_E757:
call sub_E349
jmp short loc_E7C1
; ---------------------------------------------------------------------------
loc_E75C:
test _key_det.lo, low INPUT_DOWN
jz short loc_E76E
cmp [bp+@@verdict_bitmap_offset], 0
jnz short loc_E76E
mov [bp+var_4], 1
loc_E76E:
test _key_det.lo, low INPUT_UP
jz short loc_E781
cmp [bp+@@verdict_bitmap_offset], VERDICT_SCREEN_SIZE
jnz short loc_E781
mov [bp+var_4], 2
loc_E781:
cmp [bp+var_4], 1
jnz short loc_E79A
add [bp+@@verdict_bitmap_offset], (8 * VERDICT_BITMAP_VRAM_W)
cmp [bp+@@verdict_bitmap_offset], VERDICT_SCREEN_SIZE
jbe short loc_E7B5
mov [bp+@@verdict_bitmap_offset], VERDICT_SCREEN_SIZE
jmp short loc_E7B0
; ---------------------------------------------------------------------------
loc_E79A:
cmp [bp+var_4], 2
jnz short loc_E7BB
sub [bp+@@verdict_bitmap_offset], (8 * VERDICT_BITMAP_VRAM_W)
cmp [bp+@@verdict_bitmap_offset], 0
jge short loc_E7B5
mov [bp+@@verdict_bitmap_offset], 0
loc_E7B0:
mov [bp+var_4], 0
loc_E7B5:
call verdict_bitmap_put pascal, [bp+@@verdict_bitmap_offset]
loc_E7BB:
call sub_E349
jmp loc_E6DB
; ---------------------------------------------------------------------------
loc_E7C1:
kajacall KAJA_SONG_FADE, 4
mov si, 100
loc_E7CC:
mov PaletteTone, si
call far ptr palette_show
call sub_DAD7
call sub_E349
dec si
or si, si
jg short loc_E7CC
call cdg_free_all
call super_free
call grc_setclip pascal, large 0, ((RES_X - 1) shl 16) or (RES_Y - 1)
pop di
pop si
leave
retn
sub_E41D endp
maine_01__TEXT ends
; ---------------------------------------------------------------------------
; ===========================================================================
; Segment type: Pure code
SHARED segment word public 'CODE' use16
extern SND_DETERMINE_MODES:proc
SHARED ends
SHARED_ segment word public 'CODE' use16
assume cs:g_SHARED
;org 0Ch
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing
include th04/hardware/grppsafx.asm
extern CDG_PUT_NOALPHA_8:proc
extern SND_SE_PLAY:proc
extern _snd_se_update:proc
extern _bgimage_snap:proc
extern _bgimage_free:proc
extern _game_exit:proc
extern VECTOR2_AT:proc
extern BGIMAGE_PUT_RECT:proc
extern SND_LOAD:proc
extern SND_KAJA_INTERRUPT:proc
extern PI_PUT_QUARTER_MASKED_8:proc
extern PI_LOAD:proc
extern PI_PUT_8:proc
extern PI_PUT_QUARTER_8:proc
extern PI_PALETTE_APPLY:proc
extern PI_FREE:proc
extern GAME_INIT_MAIN:proc
extern _input_reset_sense_held:proc
extern INPUT_WAIT_FOR_CHANGE:proc
extern _snd_bgm_measure:proc
extern FRAME_DELAY:proc
extern CDG_LOAD_ALL_NOALPHA:proc
extern CDG_FREE_ALL:proc
SHARED_ ends
.data
off_10190 dd a_ed00_txt
; "_ED00.TXT"
include th04/formats/cfg_lres[data].asm
a_ed00_txt db '_ED00.TXT',0
aKaikidan1_dat db '<27><><EFBFBD>Y<EFBFBD>k1.dat',0
aMiko db 'miko',0
; char arg0[]
arg0 db 'op',0
db 0
include libs/master.lib/atan8[data].asm
include libs/master.lib/atrtcmod[data].asm
include libs/master.lib/bfnt_id[data].asm
include libs/master.lib/clip[data].asm
include libs/master.lib/edges[data].asm
include libs/master.lib/fil[data].asm
include libs/master.lib/dos_ropen[data].asm
include libs/master.lib/get_machine_98[data].asm
include libs/master.lib/get_machine_at[data].asm
include libs/master.lib/grp[data].asm
include libs/master.lib/js[data].asm
include libs/master.lib/machine[data].asm
include libs/master.lib/pal[data].asm
include libs/master.lib/pf[data].asm
include libs/master.lib/rand[data].asm
include libs/master.lib/sin8[data].asm
include libs/master.lib/tx[data].asm
include libs/master.lib/vs[data].asm
include libs/master.lib/wordmask[data].asm
include libs/master.lib/mem[data].asm
include libs/master.lib/super_entry_bfnt[data].asm
include libs/master.lib/superpa[data].asm
include libs/master.lib/bgm_timerhook[data].asm
include libs/master.lib/bgm[data].asm
include th04/snd/se_priority[data].asm
include th04/hardware/grppsafx[data].asm
include th03/snd/se_state[data].asm
include th04/hardware/bgimage[data].asm
include th05/mem[data].asm
include th05/snd/load[data].asm
include th04/snd/snd[data].asm
include th03/formats/pi_put_masked[data].asm
include th05/formats/pi_buffers[bss].asm
include th05/hardware/vram_planes[data].asm
include th03/formats/cdg[data].asm
include th03/cutscene/cutscene[data].asm
byte_1085E db 0
db 0
public _ALLCAST_BG_FN
_ALLCAST_BG_FN label dword
dd aExed01_pi ; "EXED01.pi"
dd aExed07_pi ; "EXED07.pi"
dd aExed08_pi ; "EXED08.pi"
dd aExed09_pi ; "EXED09.pi"
dd aExed10_pi ; "EXED10.pi"
dd aExed16_pi ; "EXED16.pi"
dd aExed15_pi ; "EXED15.pi"
dd 0
dd aExed01_pi_0 ; "EXED01.pi"
dd aExed11_pi ; "EXED11.pi"
dd aExed11_pi_0 ; "EXED11.pi"
dd aExed11_pi_1 ; "EXED11.pi"
dd aExed03_pi ; "EXED03.pi"
dd aExed16_pi_0 ; "EXED16.pi"
dd aExed15_pi_0 ; "EXED15.pi"
dd 0
dd aExed01_pi_1 ; "EXED01.pi"
dd aExed12_pi ; "EXED12.pi"
dd aExed12_pi_0 ; "EXED12.pi"
dd aExed13_pi ; "EXED13.pi"
dd aExed04_pi ; "EXED04.pi"
dd aExed16_pi_1 ; "EXED16.pi"
dd aExed15_pi_1 ; "EXED15.pi"
dd 0
dd aExed01_pi_2 ; "EXED01.pi"
dd aExed14_pi ; "EXED14.pi"
dd aExed05_pi ; "EXED05.pi"
dd aExed14_pi_0 ; "EXED14.pi"
dd aExed06_pi ; "EXED06.pi"
dd aExed16_pi_2 ; "EXED16.pi"
dd aExed15_pi_2 ; "EXED15.pi"
dd 0
public _ALLCAST_BG_QUARTER
_ALLCAST_BG_QUARTER label word
dw 1, 0, 1, 3, 0, 0, 0, 0
dw 1, 0, 1, 2, 1, 1, 1, 0
dw 1, 2, 0, 1, 0, 2, 2, 0
dw 1, 0, 0, 2, 0, 3, 3, 0
ALLCAST_PTRS dd aProjectOfTouho
dd aNo_1Buumx ; " Project of TOUHOU "...
dd aReimuHakureiSh
dd aNo_2Buumx
dd aReimuHakurei_0
dd aRikaEngineer
dd aMeiraSamurai
dd aMarisaKirisame
dd aMimaGhost
dd aNo_3Buumx
dd aReimuHakurei_1
dd aMarisaKirisa_0
dd aMimaGhost_0
dd aEllenWitch
dd aKotohimePrince
dd aKanaAnaberalPo
dd aRikakoAsakuraS
dd aTiyuriKitashir
dd aYumemiOkazakiP
dd aNo_4Buumx
dd aReimuHakurei_2
dd aMarisaKirisa_1
dd aOrangeOriental
dd aKurumiVampire
dd aElliyGateKeepe
dd aYukaOrientalDe
dd aMugetuMaid
dd aGengetuDemon
dd aNo_5Buumx
dd aReimuHakurei_3
dd aMarisaKirisa_2
dd aMimaGhost_1
dd aYukaOriental_0
dd aSaraGateKeeper
dd aLuizeDemon
dd aAliceWitchOfDe
dd aYukiBlackWitch
dd aMaiWhiteWitch
dd aYumekoMaid
dd aShinkiGoddessO
dd aProgramerZunJu
dd aGraphicsZunJun
dd aMusicComposeZu
dd aP_m_d_ProgramM
dd aSpecialThanksA
dd aAmusementMaker
dd aAndAllTestPlay
ALLCAST_LINES_PER_SCREEN equ $-2
dw 1, 2, 6, 10, 9, 12, 7
db 0
db 0
allcast_line_on_screen dw 0
aExed01_pi db 'EXED01.pi',0
aExed07_pi db 'EXED07.pi',0
aExed08_pi db 'EXED08.pi',0
aExed09_pi db 'EXED09.pi',0
aExed10_pi db 'EXED10.pi',0
aExed16_pi db 'EXED16.pi',0
aExed15_pi db 'EXED15.pi',0
aExed01_pi_0 db 'EXED01.pi',0
aExed11_pi db 'EXED11.pi',0
aExed11_pi_0 db 'EXED11.pi',0
aExed11_pi_1 db 'EXED11.pi',0
aExed03_pi db 'EXED03.pi',0
aExed16_pi_0 db 'EXED16.pi',0
aExed15_pi_0 db 'EXED15.pi',0
aExed01_pi_1 db 'EXED01.pi',0
aExed12_pi db 'EXED12.pi',0
aExed12_pi_0 db 'EXED12.pi',0
aExed13_pi db 'EXED13.pi',0
aExed04_pi db 'EXED04.pi',0
aExed16_pi_1 db 'EXED16.pi',0
aExed15_pi_1 db 'EXED15.pi',0
aExed01_pi_2 db 'EXED01.pi',0
aExed14_pi db 'EXED14.pi',0
aExed05_pi db 'EXED05.pi',0
aExed14_pi_0 db 'EXED14.pi',0
aExed06_pi db 'EXED06.pi',0
aExed16_pi_2 db 'EXED16.pi',0
aExed15_pi_2 db 'EXED15.pi',0
aProjectOfTouho db ' Project of TOUHOU All Cast',0
aNo_1Buumx db 'No.1 <20>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD>ˈٓ`<60>v <20>` Highly Responsive to Prayers 1996,1997',0
aReimuHakureiSh db ' Reimu Hakurei ( Shaman )',0
aNo_2Buumx db 'No.2 <20>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>^<5E>v <20>` The story of eastern wonderland 1997',0
aReimuHakurei_0 db ' Reimu Hakurei ( Shaman )',0
aRikaEngineer db ' Rika ( Engineer )',0
aMeiraSamurai db ' Meira ( Samurai )',0
aMarisaKirisame db ' Marisa Kirisame ( Sorceress )',0
aMimaGhost db ' Mima ( Ghost )',0
aNo_3Buumx db 'No.3 <20>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>v <20>` The Phantasmagoria of Dim.Dream... 1997',0
aReimuHakurei_1 db ' Reimu Hakurei ( Shaman )',0
aMarisaKirisa_0 db ' Marisa Kirisame ( Sorceress )',0
aMimaGhost_0 db ' Mima ( Ghost )',0
aEllenWitch db ' Ellen ( Witch )',0
aKotohimePrince db ' Kotohime ( Princess )',0
aKanaAnaberalPo db ' Kana Anaberal ( Poltergeist )',0
aRikakoAsakuraS db ' Rikako Asakura ( Scientist )',0
aTiyuriKitashir db ' Tiyuri Kitashirakawa ( Assistant professor )',0
aYumemiOkazakiP db ' Yumemi Okazaki ( Professor )',0
aNo_4Buumx db 'No.4 <20>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>z<EFBFBD><7A><EFBFBD>v <20>` Lotus Land Story 1998',0
aReimuHakurei_2 db ' Reimu Hakurei ( Shaman )',0
aMarisaKirisa_1 db ' Marisa Kirisame ( Sorceress )',0
aOrangeOriental db ' Orange ( Oriental demon )',0
aKurumiVampire db ' Kurumi ( Vampire )',0
aElliyGateKeepe db ' Elliy ( Gate keeper )',0
aYukaOrientalDe db ' Yuka ( Oriental demon )',0
aMugetuMaid db ' Mugetu ( Maid )',0
aGengetuDemon db ' Gengetu ( Demon )',0
aNo_5Buumx db 'No.5 <20>u<EFBFBD><75><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Y<EFBFBD>k<EFBFBD>v <20>` Mystic Square 1998',0
aReimuHakurei_3 db ' Reimu Hakurei ( Shaman )',0
aMarisaKirisa_2 db ' Marisa Kirisame ( Sorceress )',0
aMimaGhost_1 db ' Mima ( Ghost )',0
aYukaOriental_0 db ' Yuka ( Oriental demon )',0
aSaraGateKeeper db ' Sara ( Gate keeper )',0
aLuizeDemon db ' Luize ( Demon )',0
aAliceWitchOfDe db ' Alice ( Witch of death )',0
aYukiBlackWitch db ' Yuki ( Black witch )',0
aMaiWhiteWitch db ' Mai ( White witch )',0
aYumekoMaid db ' Yumeko ( Maid )',0
aShinkiGoddessO db ' Shinki ( Goddess of devil',27h,'s world )',0
aProgramerZunJu db ' Programer ZUN (Junya Ota)',0
aGraphicsZunJun db ' Graphics ZUN (Junya Ota)',0
aMusicComposeZu db ' Music Compose ZUN (Junya Ota)',0
aP_m_d_ProgramM db ' P.M.D. Program M.Kajihara(KAJA)',0
aSpecialThanksA db ' Special Thanks Aotaka',0
aAmusementMaker db ' Amusement Makers',0
aAndAllTestPlay db ' and all test player and you ... ',0
aExed db 'EXED',0
include th04/hiscore/alphabet[data].asm
byte_11621 db 0
public _entered_name_cursor
_entered_name_cursor dw 0
aGensou_scr db 'GENSOU.SCR',0
include th05/formats/scoredat_load_for[data].asm
aGensou_scr_2 db 'GENSOU.SCR',0
aHi01_pi db 'hi01.pi',0
aScnum_bft db 'scnum.bft',0
aSctm0_bft db 'sctm0.bft',0
aSctm1_bft db 'sctm1.bft',0
aGxgnbGvbGhvVGv db '<27>X<EFBFBD><58><EFBFBD>[<5B><><EFBFBD>[<5B>h<EFBFBD>ł̃v<CC83><76><EFBFBD>C<EFBFBD>ł́A<CD81>X<EFBFBD>R<EFBFBD>A<EFBFBD>͋L<CD8B>^<5E><><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD>',0
aGxgnbGvbGhvV_0 db '<27>X<EFBFBD><58><EFBFBD>[<5B><><EFBFBD>[<5B>h<EFBFBD>ł̃v<CC83><76><EFBFBD>C<EFBFBD>ł́A<CD81>X<EFBFBD>R<EFBFBD>A<EFBFBD>͋L<CD8B>^<5E><><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD>',0
aName db 'name',0
db 0
x_116E2 dw 336
col_116E4 dw 2
word_116E6 dw 6
y_116E8 dw 48
byte_116EA db 0
include th04/gaiji/verdict[data].asm
byte_11713 db 0
aU__0 db '<27>_',0
aBd db '<27>D',0
aBu db '<27><>',0
aBd_0 db '<27>D',0
aBu_0 db '<27><>',0
aB@b@b@b@b@b@b@ db '<27>@<40>@<40>@<40>@<40>@<40>@<40>@ <20>r<EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD>',0
aUqiUx db '<27><><EFBFBD>Փx',0
aNPiuU_ db '<27>ŏI<C58F><49><EFBFBD>_',0
aGGxi db '<27>~<7E>X<EFBFBD><58><EFBFBD><EFBFBD>',0
aGGaogcpi db '<27>{<7B><><EFBFBD>g<EFBFBD>p<EFBFBD><70><EFBFBD><EFBFBD>',0
aGqbGatbrmcj db '<27>Q<EFBFBD>[<5B><><EFBFBD>B<EFBFBD><42><EFBFBD><EFBFBD>',0
aIlcSObcj db '<27><><EFBFBD><EFBFBD><EFBFBD>ގ<EFBFBD><DE8E><EFBFBD>',0
aGagcgegai db '<27>A<EFBFBD>C<EFBFBD>e<EFBFBD><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
aUU_gagcgeganNv db '<27><><EFBFBD>_<EFBFBD>A<EFBFBD>C<EFBFBD>e<EFBFBD><65><EFBFBD>ō<EFBFBD><C58D>_<EFBFBD><5F>',0
aLcnzvv db '<27>C<EFBFBD><43><EFBFBD><EFBFBD>',0
aPicacovCj db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
aVavVVSrso db '<27><><EFBFBD>Ȃ<EFBFBD><C882>̘r<CC98>O',0
aI db '<27><>',0
aI_0 db '<27><>',0
aU_ db '<27>_',0
a_ude_txt db '_ude.txt',0
aBhbhbhbhbhbhu_ db '<27>H<EFBFBD>H<EFBFBD>H<EFBFBD>H<EFBFBD>H<EFBFBD>H<EFBFBD>_',0
aPicacovVVcvsfT db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD><E994BB><EFBFBD>s<EFBFBD><73>',0
aUde_pi db 'ude.pi',0
aB@vpcB@ db '<27>@<40>P<EFBFBD>ʁ@',0
aB@vqcB@ db '<27>@<40>Q<EFBFBD>ʁ@',0
aB@vrcB@ db '<27>@<40>R<EFBFBD>ʁ@',0
aB@vscB@ db '<27>@<40>S<EFBFBD>ʁ@',0
aB@vtcB@ db '<27>@<40>T<EFBFBD>ʁ@',0
aB@vucB@ db '<27>@<40>U<EFBFBD>ʁ@',0
aNPiuU__0 db '<27>ŏI<C58F><49><EFBFBD>_',0
byte_1183A db 0
db 0
particle_i_1183C dw 0
word_1183E dw 0
byte_11840 db 0
db 0
word_11842 dw 0
word_11844 dw 0
byte_11846 db 0
db 0
word_11848 dw 0
word_1184A dw 0
unk_1184C db 20h
db 20h
db 0
unk_1184F db 20h
db 20h
db 0
aStaff db 'staff',0
aStf00_cdg db 'stf00.cdg',0
aStf01_cdg db 'stf01.cdg',0
aStf02_cdg db 'stf02.cdg',0
aStf03_cdg db 'stf03.cdg',0
aStf04_cdg db 'stf04.cdg',0
aStf05_cdg db 'stf05.cdg',0
aStf06_cdg db 'stf06.cdg',0
aStf07_cdg db 'stf07.cdg',0
aStf08_cdg db 'stf08.cdg',0
aStf09_cdg db 'stf09.cdg',0
aStf10_cdg db 'stf10.cdg',0
aStf01_bft db 'stf01.bft',0
aStf00_bft db 'stf00.bft',0
.data?
public _resident
_resident dd ?
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 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 th05/formats/pi_put_masked[bss].asm
include th05/formats/pi_headers[bss].asm
include th04/hardware/input[bss].asm
include th04/formats/cdg[bss].asm
include libs/master.lib/pfint21[bss].asm
include th04/hardware/egcrect[bss].asm
include th03/cutscene/cutscene[bss].asm
measure_1500E dw ?
word_15010 dw ?
word_15012 dw ?
allcast_screen_plus_one dw ?
allcast_step dw ?
playchar_15018 db ?
db ?
include th04/formats/scoredat[bss].asm
public _glyphballs
_glyphballs glyphball_t (SCOREDAT_NAME_LEN + 1) dup (<?>)
include th03/hiscore/regist[bss].asm
_rank db ?
playchar_15178 db ?
db 3 dup(?)
byte_1517C db ?
db ?
dword_1517E dd ?
dword_15182 dd ?
_verdict_rank db ?
byte_15187 db ?
db 27 dup(?)
byte_151A3 db ?
db ? ;
byte_151A5 db ?
db 27 dup(?)
byte_151C1 db ?
db 2 dup(?)
word_151C4 dw ?
word_151C6 dw ?
word_151C8 dw ?
word_151CA dw ?
byte_151CC db ?
db ?
public _space_window_center, _space_window_w, _space_window_h
public _space_window_w, _space_window_h
_space_window_w dw ?
_space_window_h dw ?
point_151D2 Point <?>
_space_window_center Point <?>
public _space_camera_velocity
_space_camera_velocity Point <?>
word_151DE dw ?
measure_151E0 dw ?
word_151E2 dw ?
extern _particles:orb_particle_t:ORB_PARTICLE_COUNT
extern _orb_trails_center:Point:ORB_TRAIL_COUNT
extern _stars_center:Point:STAR_COUNT
extern _verdict_bitmap:word:(VERDICT_SCREEN_H * 2 * (VERDICT_BITMAP_W / 16))
end