forked from nmlgc/ReC98
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathth04_op.asm
6618 lines (5828 loc) · 124 KB
/
th04_op.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 : 492DA6ACEE8714C252630BCE0D3C12FD
; File Name : th04/OP.EXE
; Format : MS-DOS executable (EXE)
; Base Address: 0h Range: 0h-133E0h Loaded length: 11A40h
; Entry Point : 0:0
; OS type : MS DOS
; Application type: Executable 16bit
.286 ; Force the .model directive to create 16-bit default segments...
.model large op_02_TEXT
__LARGE__ equ 1
.386 ; ... then switch to what we actually need.
; And yes, we can't move this to an include file for some reason.
include ReC98.inc
include th04/th04.asm
include th04/music/music.inc
extern SCOPY@:proc
extern _execl:proc
extern _getch:proc
extern _memcpy:proc
extern _strlen:proc
; ===========================================================================
; Segment type: Pure code
_TEXT segment word public 'CODE' use16
assume cs:_TEXT
assume es:nothing, ds:_DATA, fs:nothing, gs:nothing
include libs/master.lib/bfnt_entry_pat.asm
include libs/master.lib/bfnt_extend_header_skip.asm
include libs/master.lib/bfnt_header_read.asm
include libs/master.lib/bfnt_header_analysis.asm
include libs/master.lib/atrtcmod.asm
include libs/master.lib/bcloser.asm
include libs/master.lib/bfill.asm
include libs/master.lib/bfnt_palette_set.asm
include libs/master.lib/bgetc.asm
include libs/master.lib/palette_black_in.asm
include libs/master.lib/palette_black_out.asm
include libs/master.lib/bopenr.asm
include libs/master.lib/bread.asm
include libs/master.lib/bseek.asm
include libs/master.lib/bseek_.asm
include libs/master.lib/dos_axdx.asm
include libs/master.lib/dos_keyclear.asm
include libs/master.lib/dos_puts2.asm
include libs/master.lib/dos_read.asm
include libs/master.lib/dos_seek.asm
include libs/master.lib/dos_setvect.asm
include libs/master.lib/egc.asm
include libs/master.lib/file_append.asm
include libs/master.lib/file_close.asm
include libs/master.lib/file_create.asm
include libs/master.lib/file_exist.asm
include libs/master.lib/file_read.asm
include libs/master.lib/file_ropen.asm
include libs/master.lib/file_seek.asm
include libs/master.lib/file_write.asm
include libs/master.lib/dos_close.asm
include libs/master.lib/dos_ropen.asm
include libs/master.lib/grcg_boxfill.asm
include libs/master.lib/grcg_byteboxfill_x.asm
include libs/master.lib/grcg_hline.asm
include libs/master.lib/grcg_polygon_c.asm
include libs/master.lib/grcg_round_boxfill.asm
include libs/master.lib/grcg_setcolor.asm
include libs/master.lib/get_machine_98.asm
include libs/master.lib/get_machine_at.asm
include libs/master.lib/get_machine_dosbox.asm
include libs/master.lib/check_machine_fmr.asm
include libs/master.lib/get_machine.asm
include libs/master.lib/gaiji_backup.asm
include libs/master.lib/gaiji_entry_bfnt.asm
include libs/master.lib/gaiji_read.asm
include libs/master.lib/gaiji_write.asm
include libs/master.lib/graph_400line.asm
include libs/master.lib/graph_clear.asm
include libs/master.lib/graph_copy_page.asm
include libs/master.lib/graph_extmode.asm
include libs/master.lib/graph_pi_free.asm
include libs/master.lib/graph_pi_load_pack.asm
include libs/master.lib/graph_pack_put_8.asm
include libs/master.lib/graph_show.asm
include libs/master.lib/graph_start.asm
include libs/master.lib/js_end.asm
include libs/master.lib/keybeep.asm
include libs/master.lib/make_linework.asm
include libs/master.lib/palette_init.asm
include libs/master.lib/palette_show.asm
include libs/master.lib/pfclose.asm
include libs/master.lib/pfgetc.asm
include libs/master.lib/pfread.asm
include libs/master.lib/pfrewind.asm
include libs/master.lib/pfseek.asm
include libs/master.lib/random.asm
include libs/master.lib/rottbl.asm
include libs/master.lib/smem_release.asm
include libs/master.lib/smem_wget.asm
include libs/master.lib/soundio.asm
include libs/master.lib/text_clear.asm
include libs/master.lib/txesc.asm
include libs/master.lib/vsync.asm
include libs/master.lib/vsync_wait.asm
include libs/master.lib/palette_white_in.asm
include libs/master.lib/hmem_lallocate.asm
include libs/master.lib/mem_assign_dos.asm
include libs/master.lib/mem_assign.asm
include libs/master.lib/memheap.asm
include libs/master.lib/mem_unassign.asm
include libs/master.lib/super_free.asm
include libs/master.lib/super_entry_pat.asm
include libs/master.lib/super_entry_at.asm
include libs/master.lib/super_entry_bfnt.asm
include libs/master.lib/super_cancel_pat.asm
include libs/master.lib/super_put_rect.asm
include libs/master.lib/super_put.asm
include libs/master.lib/respal_exist.asm
include libs/master.lib/respal_free.asm
include libs/master.lib/pfint21.asm
db 0
include libs/master.lib/js_start.asm
include libs/master.lib/draw_trapezoid.asm
include th03/formats/pfopen.asm
include libs/master.lib/pf_str_ieq.asm
include libs/master.lib/js_sense.asm
include libs/master.lib/bgm_bell_org.asm
include libs/master.lib/bgm_mget.asm
include libs/master.lib/bgm_read_sdata.asm
include libs/master.lib/bgm_timer.asm
include libs/master.lib/bgm_pinit.asm
include libs/master.lib/bgm_timerhook.asm
include libs/master.lib/bgm_play.asm
include libs/master.lib/bgm_sound.asm
include libs/master.lib/bgm_effect_sound.asm
include libs/master.lib/bgm_stop_play.asm
include libs/master.lib/bgm_set_tempo.asm
include libs/master.lib/bgm_init_finish.asm
include libs/master.lib/bgm_stop_sound.asm
include libs/master.lib/graph_gaiji_puts.asm
include libs/master.lib/graph_gaiji_putc.asm
_TEXT ends
; ===========================================================================
; Segment type: Pure code
op_01_TEXT segment byte public 'CODE' use16
assume cs:op_01_TEXT
;org 0Ch
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A74C proc near
var_C = word ptr -0Ch
var_A = byte ptr -0Ah
var_9 = byte ptr -9
var_8 = byte ptr -8
var_7 = byte ptr -7
var_6 = byte ptr -6
var_5 = byte ptr -5
var_4 = word ptr -4
enter 0Ch, 0
push ds
push offset aMiko_cfg ; "MIKO.CFG"
call file_ropen
push ss
lea ax, [bp+var_A]
push ax
push 0Ah
call file_read
call file_close
mov ax, [bp+var_4]
mov [bp+var_C], ax
mov word ptr _humaconfig+2, ax
mov word ptr _humaconfig, 0
les bx, _humaconfig
mov al, [bp+var_A]
mov es:[bx+0Fh], al
mov al, [bp+var_9]
mov es:[bx+3Ah], al
mov al, [bp+var_8]
mov es:[bx+3Bh], al
mov al, [bp+var_7]
mov es:[bx+10h], al
mov al, [bp+var_6]
mov es:[bx+18h], al
mov al, [bp+var_5]
mov es:[bx+49h], al
cmp byte ptr es:[bx+3Ah], 6
ja short loc_A7B5
cmp byte ptr es:[bx+3Ah], 0
jnz short loc_A7BE
loc_A7B5:
les bx, _humaconfig
mov byte ptr es:[bx+3Ah], 3
loc_A7BE:
les bx, _humaconfig
cmp byte ptr es:[bx+3Bh], 2
jbe short loc_A7CE
mov byte ptr es:[bx+3Bh], 2
loc_A7CE:
les bx, _humaconfig
cmp byte ptr es:[bx+10h], 3
jb short loc_A7DE
mov byte ptr es:[bx+10h], 0
loc_A7DE:
les bx, _humaconfig
cmp byte ptr es:[bx+18h], 3
jb short locret_A7EE
mov byte ptr es:[bx+18h], 0
locret_A7EE:
leave
retn
sub_A74C endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A7F0 proc near
var_8 = byte ptr -8
var_7 = byte ptr -7
var_6 = byte ptr -6
var_5 = byte ptr -5
var_4 = byte ptr -4
var_3 = byte ptr -3
var_2 = byte ptr -2
enter 8, 0
push ds
push offset aMiko_cfg ; "MIKO.CFG"
call file_append
pushd 0
push 0
call file_seek
les bx, _humaconfig
mov al, es:[bx+0Fh]
mov [bp+var_8], al
mov al, es:[bx+3Ah]
mov [bp+var_7], al
mov al, es:[bx+3Bh]
mov [bp+var_6], al
mov al, es:[bx+10h]
mov [bp+var_5], al
mov al, es:[bx+18h]
mov [bp+var_4], al
mov al, es:[bx+49h]
mov [bp+var_3], al
push ss
lea ax, [bp+var_8]
push ax
push 6
call file_write
pushd 9
push 0
call file_seek
mov al, [bp+var_8]
add al, [bp+var_7]
add al, [bp+var_6]
add al, [bp+var_5]
add al, [bp+var_4]
add al, [bp+var_3]
mov [bp+var_2], al
push ss
lea ax, [bp+var_2]
push ax
push 1
call file_write
call file_close
leave
retn
sub_A7F0 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A873 proc near
var_A = byte ptr -0Ah
var_9 = byte ptr -9
var_8 = byte ptr -8
var_7 = byte ptr -7
var_6 = byte ptr -6
var_5 = byte ptr -5
var_1 = byte ptr -1
enter 0Ah, 0
lea ax, [bp+var_A]
push ss
push ax
push ds
push offset unk_F3D1
mov cx, 0Ah
call SCOPY@
push ds
push offset aMiko_cfg ; "MIKO.CFG"
call file_append
pushd 0
push 0
call file_seek
les bx, _humaconfig
mov al, es:[bx+0Fh]
mov [bp+var_A], al
mov al, es:[bx+3Ah]
mov [bp+var_9], al
mov al, es:[bx+3Bh]
mov [bp+var_8], al
mov al, es:[bx+10h]
mov [bp+var_7], al
mov al, es:[bx+18h]
mov [bp+var_6], al
mov al, es:[bx+49h]
mov [bp+var_5], al
mov al, [bp+var_A]
add al, [bp+var_9]
add al, [bp+var_8]
add al, [bp+var_7]
add al, [bp+var_6]
add al, [bp+var_5]
mov [bp+var_1], al
push ss
lea ax, [bp+var_A]
push ax
push 0Ah
call file_write
call file_close
leave
retn
sub_A873 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A8F1 proc near
push bp
mov bp, sp
les bx, _humaconfig
mov byte ptr es:[bx+11h], 0
mov al, es:[bx+3Ah]
mov es:[bx+0Ch], al
mov al, es:[bx+3Bh]
mov es:[bx+0Eh], al
mov byte ptr es:[bx+12h], 30h ; '0'
mov byte ptr es:[bx+13h], 30h ; '0'
call sub_D708
or ax, ax
jnz short loc_A96A
les bx, _humaconfig
mov byte ptr es:[bx+3Eh], 0
call sub_CCC8
call sub_A7F0
call gaiji_restore
kajacall KAJA_SONG_FADE, 10
call sub_E0AC
les bx, _humaconfig
cmp byte ptr es:[bx+1Ah], 0
jnz short loc_A957
pushd 0
push ds
push offset aMain ; "main"
push ds
push offset aMain ; "main"
jmp short loc_A962
; ---------------------------------------------------------------------------
loc_A957:
pushd 0
push ds
push offset path ; "deb"
push ds
push offset path ; "deb"
loc_A962:
call _execl
add sp, 0Ch
loc_A96A:
pop bp
retn
sub_A8F1 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A96C proc near
push bp
mov bp, sp
les bx, _humaconfig
mov byte ptr es:[bx+11h], 6
mov byte ptr es:[bx+0Ch], 3
mov byte ptr es:[bx+0Eh], 2
mov byte ptr es:[bx+12h], 30h ; '0'
mov byte ptr es:[bx+13h], 36h ; '6'
call sub_D708
or ax, ax
jnz short loc_A9C7
les bx, _humaconfig
mov byte ptr es:[bx+3Eh], 0
call sub_CCC8
call sub_A7F0
call gaiji_restore
kajacall KAJA_SONG_FADE, 10
call sub_E0AC
pushd 0
push ds
push offset aMain ; "main"
push ds
push offset aMain ; "main"
call _execl
add sp, 0Ch
loc_A9C7:
pop bp
retn
sub_A96C endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_A9C9 proc near
push bp
mov bp, sp
les bx, _humaconfig
mov byte ptr es:[bx+11h], 0
mov byte ptr es:[bx+0Ch], 3
mov byte ptr es:[bx+0Eh], 3
inc byte ptr es:[bx+3Eh]
cmp byte ptr es:[bx+3Eh], 4
jbe short loc_A9EF
mov byte ptr es:[bx+3Eh], 1
loc_A9EF:
les bx, _humaconfig
mov al, es:[bx+3Eh]
mov ah, 0
dec ax
mov bx, ax
cmp bx, 3
ja short loc_AA6E
add bx, bx
jmp cs:off_AAAD[bx]
loc_AA08:
les bx, _humaconfig
mov byte ptr es:[bx+12h], 30h ; '0'
mov byte ptr es:[bx+13h], 33h ; '3'
mov byte ptr es:[bx+19h], 0
mov byte ptr es:[bx+3Ch], 3
jmp short loc_AA6E
; ---------------------------------------------------------------------------
loc_AA22:
les bx, _humaconfig
mov byte ptr es:[bx+12h], 31h ; '1'
mov byte ptr es:[bx+13h], 30h ; '0'
mov byte ptr es:[bx+19h], 0
mov byte ptr es:[bx+3Ch], 0
jmp short loc_AA6E
; ---------------------------------------------------------------------------
loc_AA3C:
les bx, _humaconfig
mov byte ptr es:[bx+12h], 30h ; '0'
mov byte ptr es:[bx+13h], 32h ; '2'
mov byte ptr es:[bx+19h], 1
mov byte ptr es:[bx+3Ch], 2
jmp short loc_AA6E
; ---------------------------------------------------------------------------
loc_AA56:
les bx, _humaconfig
mov byte ptr es:[bx+12h], 31h ; '1'
mov byte ptr es:[bx+13h], 31h ; '1'
mov byte ptr es:[bx+19h], 1
mov byte ptr es:[bx+3Ch], 1
loc_AA6E:
push 1
call palette_black_out
call super_free
freePISlotLarge 0
call sub_CCC8
call sub_A7F0
call gaiji_restore
call sub_E0AC
pushd 0
push ds
push offset aMain ; "main"
push ds
push offset aMain ; "main"
call _execl
add sp, 0Ch
pop bp
retn
sub_A9C9 endp
; ---------------------------------------------------------------------------
off_AAAD dw offset loc_AA08
dw offset loc_AA22
dw offset loc_AA3C
dw offset loc_AA56
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_AAB5 proc near
var_2 = word ptr -2
arg_0 = word ptr 4
arg_2 = word ptr 6
enter 2, 0
push si
push di
mov si, [bp+arg_2]
mov ax, si
imul ax, 14h
add ax, 0E0h
mov di, ax
push 100h
push ax
push 800010h
call sub_E378
call grcg_setcolor pascal, GC_RMW, [bp+arg_0]
mov [bp+var_2], si
mov bx, si
cmp bx, 5
ja short loc_AB59
add bx, bx
jmp cs:off_ABCB[bx]
loc_AAF3:
push (272 shl 16) or 224
push 10
call _cdg_put_nocolors
les bx, _humaconfig
mov al, es:[bx+0Fh]
mov ah, 0
add ax, 16h
mov [bp+var_2], ax
jmp short loc_AB59
; ---------------------------------------------------------------------------
loc_AB12:
cmp byte_13286, 0
jnz short loc_AB24
call grcg_setcolor pascal, (GC_RMW shl 16) + 12
loc_AB24:
push (272 shl 16) or 244
push 11
jmp short loc_AB54
; ---------------------------------------------------------------------------
loc_AB2E:
push (272 shl 16) or 264
push 12
jmp short loc_AB54
; ---------------------------------------------------------------------------
loc_AB38:
push (272 shl 16) or 284
push 13
jmp short loc_AB54
; ---------------------------------------------------------------------------
loc_AB42:
push (272 shl 16) or 304
push 14
jmp short loc_AB54
; ---------------------------------------------------------------------------
loc_AB4C:
push (272 shl 16) or 324
push 15
loc_AB54:
call _cdg_put_nocolors
loc_AB59:
GRCG_OFF_CLOBBERING dx
cmp [bp+arg_0], 8
jnz short loc_ABC4
call _cdg_put pascal, 256, di, 35
call _cdg_put pascal, 352, di, 36
pushd 180h
push 2800010h
call sub_E378
mov word_FD7C, 2
mov bx, [bp+var_2]
shl bx, 2
pushd dword ptr [bx+9Eh] ; s
call _strlen
add sp, 4
shl ax, 3
mov dx, 270h
sub dx, ax
push dx
push 180000Fh
mov bx, [bp+var_2]
shl bx, 2
pushd dword ptr [bx+9Eh]
call sub_DEB4
loc_ABC4:
pop di
pop si
leave
retn 4
sub_AAB5 endp
; ---------------------------------------------------------------------------
db 0
off_ABCB dw offset loc_AAF3
dw offset loc_AB12
dw offset loc_AB2E
dw offset loc_AB38
dw offset loc_AB42
dw offset loc_AB4C
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_ABD7 proc near
var_4 = word ptr -4
var_2 = word ptr -2
arg_0 = word ptr 4
arg_2 = word ptr 6
enter 4, 0
push si
push di
mov di, 0E0h
mov ax, [bp+arg_2]
shl ax, 4
add ax, 0E0h
mov [bp+var_4], ax
cmp [bp+arg_2], 7
jnz short loc_ABF7
mov [bp+var_4], 154h
loc_ABF7:
push 0E0h
push [bp+var_4]
push 0C00010h
call sub_E378
loc_AC08:
call grcg_setcolor pascal, GC_RMW, [bp+arg_0]
mov bx, [bp+arg_2]
cmp bx, 7
ja loc_AD9A
add bx, bx
jmp cs:off_AE18[bx]
loc_AC24:
push (224 shl 16) or 224
push 16
call _cdg_put_nocolors
push (320 shl 16) or 224
les bx, _humaconfig
mov al, es:[bx+0Fh]
mov ah, 0
add ax, 21
push ax
call _cdg_put_nocolors
les bx, _humaconfig
mov al, es:[bx+0Fh]
mov ah, 0
add ax, 6
loc_AC57:
mov si, ax
jmp loc_AD9A
; ---------------------------------------------------------------------------
loc_AC5C:
push (224 shl 16) or 240
push 17
call _cdg_put_nocolors
push 14000F0h
les bx, _humaconfig
mov al, es:[bx+3Ah]
mov ah, 0
push ax
call _cdg_put_nocolors
mov si, 0Ah
jmp loc_AD9A
; ---------------------------------------------------------------------------
loc_AC85:
push (224 shl 16) or 256
push 18
call _cdg_put_nocolors
push 1400100h
les bx, _humaconfig
mov al, es:[bx+3Bh]
mov ah, 0
push ax
call _cdg_put_nocolors
mov si, 0Bh
jmp loc_AD9A
; ---------------------------------------------------------------------------
loc_ACAE:
push (224 shl 16) or 272
push 19
call _cdg_put_nocolors
les bx, _humaconfig
cmp byte ptr es:[bx+10h], 0
jnz short loc_ACCB
mov ax, 1Ch
jmp short loc_ACD8
; ---------------------------------------------------------------------------
loc_ACCB:
les bx, _humaconfig
mov al, es:[bx+10h]
mov ah, 0
add ax, 18h
loc_ACD8:
mov [bp+var_2], ax
push (320 shl 16) or 272
push ax
call _cdg_put_nocolors
les bx, _humaconfig
mov al, es:[bx+10h]
mov ah, 0
add ax, 0Ch
jmp loc_AC57
; ---------------------------------------------------------------------------
loc_ACF7:
push (224 shl 16) or 288
push 20
call _cdg_put_nocolors
les bx, _humaconfig
cmp byte ptr es:[bx+18h], 0
jnz short loc_AD14
mov ax, 1Ch
jmp short loc_AD25
; ---------------------------------------------------------------------------
loc_AD14:
les bx, _humaconfig
mov al, es:[bx+18h]
mov ah, 0
push ax
mov ax, 1Fh
pop dx
sub ax, dx
loc_AD25:
mov [bp+var_2], ax
push (320 shl 16) or 288
push ax
call _cdg_put_nocolors
les bx, _humaconfig
mov al, es:[bx+18h]
mov ah, 0
add ax, 0Fh
jmp loc_AC57
; ---------------------------------------------------------------------------
loc_AD44:
push (272 shl 16) or 304
les bx, _humaconfig
mov al, es:[bx+49h]
mov ah, 0
mov dx, 21h ; '!'
sub dx, ax
push dx
call _cdg_put_nocolors
mov di, 100h
les bx, _humaconfig
mov al, es:[bx+49h]
mov ah, 0
add ax, 12h
jmp loc_AC57
; ---------------------------------------------------------------------------
loc_AD72:
push (272 shl 16) or 320
push 31
call _cdg_put_nocolors
mov di, 100h
mov si, 14h
jmp short loc_AD9A
; ---------------------------------------------------------------------------
loc_AD87:
push (272 shl 16) or 340
push 15
call _cdg_put_nocolors
mov di, 100h
mov si, 15h
loc_AD9A:
GRCG_OFF_CLOBBERING dx
cmp [bp+arg_0], 8
jnz short loc_AE11
call _cdg_put pascal, di, [bp+var_4], 35
cmp di, 256
jnz short loc_ADBD
lea ax, [di+60h]
push ax
jmp short loc_ADC0
; ---------------------------------------------------------------------------
loc_ADBD:
push 384
loc_ADC0:
push [bp+var_4]
push 36
call _cdg_put
pushd 180h
push 2800010h
call sub_E378
mov word_FD7C, 2
mov bx, si
shl bx, 2
pushd dword ptr [bx+9Eh] ; s
call _strlen
add sp, 4
shl ax, 3
mov dx, 270h
sub dx, ax
push dx
push 180000Fh
mov bx, si
shl bx, 2
pushd dword ptr [bx+9Eh]
call sub_DEB4
loc_AE11:
pop di
pop si
leave
retn 4
sub_ABD7 endp
; ---------------------------------------------------------------------------
db 0
off_AE18 dw offset loc_AC24
dw offset loc_AC5C
dw offset loc_AC85
dw offset loc_ACAE
dw offset loc_ACF7
dw offset loc_AD44
dw offset loc_AD72
dw offset loc_AD87
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_AE28 proc near
arg_0 = byte ptr 4
arg_2 = byte ptr 6
push bp
mov bp, sp
mov al, byte_F3DB
cbw
push ax
push 1
call fp_10DAA
mov al, [bp+arg_0]
add byte_F3DB, al
mov al, byte_F3DB
cbw
or ax, ax
jge short loc_AE4B
mov al, [bp+arg_2]
mov byte_F3DB, al
loc_AE4B:
mov al, byte_F3DB
cmp al, [bp+arg_2]
jle short loc_AE58
mov byte_F3DB, 0
loc_AE58:
cmp byte_13286, 0
jnz short loc_AE76
mov al, byte_F3DB
cbw
cmp ax, 1
jnz short loc_AE76
cmp byte_10DA8, 0
jnz short loc_AE76
mov al, [bp+arg_0]
add byte_F3DB, al
loc_AE76:
mov al, byte_F3DB
cbw
push ax
push 8
call fp_10DAA
call snd_se_reset
call snd_se_play pascal, 1
call snd_se_update
pop bp
retn 4
sub_AE28 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_AE96 proc near
push bp
mov bp, sp
push si
cmp byte_F446, 0
jnz short loc_AEEB
mov byte_F3DD, 0
mov byte_10DAC, 0
push 0C000E0h
push 12000A0h
call sub_E378
xor si, si
jmp short loc_AED6
; ---------------------------------------------------------------------------
loc_AEC0:
push si
mov al, byte_F3DB
cbw
cmp ax, si
jnz short loc_AECE
mov ax, 8
jmp short loc_AED1
; ---------------------------------------------------------------------------
loc_AECE:
mov ax, 1
loc_AED1:
push ax
call sub_AAB5
inc si
loc_AED6:
cmp si, 6
jl short loc_AEC0
mov fp_10DAA, offset sub_AAB5
mov byte_F446, 1
mov byte_10DAC, 0
loc_AEEB:
cmp _input, INPUT_NONE
jnz short loc_AEF7
mov byte_10DAC, 1
loc_AEF7:
cmp byte_10DAC, 0
jz loc_B043
test _input.lo, low INPUT_UP
jz short loc_AF0E
push 5
push 0FFFFh
call sub_AE28