-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathth05_maine.asm
6447 lines (5752 loc) · 132 KB
/
th05_maine.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;
; +-------------------------------------------------------------------------+
; | This file has been generated by The Interactive Disassembler (IDA) |
; | Copyright (c) 2009 by Hex-Rays, <[email protected]> |
; +-------------------------------------------------------------------------+
;
; 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 _tolower:proc
extern __ctype:byte
group_01 group maine_01_TEXT, SCORE_TEXT, maine_01__TEXT
; ===========================================================================
_TEXT segment word public 'CODE' use16
extern PALETTE_BLACK_IN:proc
extern PALETTE_BLACK_OUT:proc
extern FILE_APPEND:proc
extern FILE_CLOSE:proc
extern FILE_READ:proc
extern FILE_ROPEN:proc
extern FILE_SEEK:proc
extern FILE_WRITE:proc
extern GRCG_BOXFILL:proc
extern GRCG_BYTEBOXFILL_X:proc
extern GRCG_CIRCLEFILL:proc
extern GRC_SETCLIP:proc
extern GRCG_HLINE:proc
extern GRCG_SETCOLOR:proc
extern GRCG_VLINE:proc
extern GAIJI_PUTCA:proc
extern GAIJI_PUTSA:proc
extern GRAPH_COPY_PAGE:proc
extern IATAN2:proc
extern IHYPOT:proc
extern PALETTE_SHOW:proc
extern IRAND:proc
extern TEXT_CLEAR:proc
extern TEXT_PUTSA:proc
extern SUPER_FREE:proc
extern SUPER_ENTRY_BFNT:proc
extern SUPER_PUT_RECT:proc
extern SUPER_PUT:proc
extern SUPER_CONVERT_TINY:proc
extern SUPER_PUT_TINY_SMALL:proc
extern GRAPH_GAIJI_PUTS:proc
extern GRAPH_GAIJI_PUTC:proc
_TEXT ends
; ===========================================================================
maine_01_TEXT segment byte public 'CODE' use16
assume cs:group_01
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_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$qi 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$qiiiii
call sub_B37C
inc si
loc_B309:
cmp si, 8
jl short loc_B2EE
call @pi_put_quarter_8$qiiii pascal, di, [bp+arg_0], 0, [bp+@@quarter]
call sub_B37C
call @pi_put_quarter_8$qiiii 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$qinxc
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
call @frame_delay$qi pascal, 2
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
public @allcast_animate$qv
@allcast_animate$qv 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$qinxc
call @pi_palette_apply$qi 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$qi pascal, 0
graph_accesspage 0
graph_showpage al
pop bp
retn
@allcast_animate$qv endp
maine_01_TEXT ends
SCORE_TEXT segment byte public 'CODE' use16
@scoredat_decode$qv procdesc near
@scoredat_encode$qv procdesc near
@HISCORE_SCOREDAT_LOAD_FOR$QI procdesc pascal near \
playchar:word
; =============== 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_func
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_func
call scoredat_encode_func
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_16 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)