-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathth01_reiiden_2.inc
38752 lines (35156 loc) · 688 KB
/
th01_reiiden_2.inc
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
; (included from th01_reiiden.asm, don't assemble directly)
; ===========================================================================
; Segment type: Pure code
main_28_TEXT segment byte public 'CODE' use16
assume cs:main_28_TEXT
;org 0Fh
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_1B03F proc far
var_C8 = word ptr -0C8h
var_C6 = word ptr -0C6h
var_C4 = word ptr -0C4h
var_C2 = word ptr -0C2h
var_C0 = word ptr -0C0h
var_BE = word ptr -0BEh
var_BC = word ptr -0BCh
var_BA = word ptr -0BAh
var_B8 = word ptr -0B8h
var_B6 = word ptr -0B6h
var_B4 = word ptr -0B4h
var_B2 = word ptr -0B2h
var_B0 = word ptr -0B0h
var_AE = word ptr -0AEh
var_AC = word ptr -0ACh
var_AA = word ptr -0AAh
var_A8 = word ptr -0A8h
var_A6 = word ptr -0A6h
var_A4 = word ptr -0A4h
var_A2 = word ptr -0A2h
var_A0 = word ptr -0A0h
var_9E = word ptr -9Eh
var_9C = word ptr -9Ch
var_9A = word ptr -9Ah
var_98 = byte ptr -98h
var_97 = byte ptr -97h
var_96 = word ptr -96h
var_94 = word ptr -94h
var_92 = word ptr -92h
var_90 = word ptr -90h
var_8E = word ptr -8Eh
var_8C = word ptr -8Ch
var_8A = word ptr -8Ah
var_88 = word ptr -88h
var_86 = word ptr -86h
var_84 = word ptr -84h
var_82 = word ptr -82h
var_80 = word ptr -80h
var_7E = word ptr -7Eh
var_7C = word ptr -7Ch
var_7A = word ptr -7Ah
var_78 = word ptr -78h
var_76 = word ptr -76h
var_74 = word ptr -74h
var_72 = word ptr -72h
var_70 = word ptr -70h
var_6E = word ptr -6Eh
var_6C = word ptr -6Ch
var_6A = word ptr -6Ah
var_68 = word ptr -68h
var_66 = byte ptr -66h
var_65 = byte ptr -65h
var_64 = word ptr -64h
var_62 = word ptr -62h
var_60 = word ptr -60h
var_5E = word ptr -5Eh
var_5C = word ptr -5Ch
var_5A = word ptr -5Ah
var_58 = word ptr -58h
var_56 = word ptr -56h
var_54 = word ptr -54h
var_52 = word ptr -52h
var_50 = word ptr -50h
var_4E = word ptr -4Eh
var_4C = word ptr -4Ch
var_4A = word ptr -4Ah
var_48 = word ptr -48h
var_46 = word ptr -46h
var_44 = word ptr -44h
var_42 = word ptr -42h
var_40 = word ptr -40h
var_3E = word ptr -3Eh
var_3C = word ptr -3Ch
var_3A = word ptr -3Ah
var_38 = word ptr -38h
var_36 = word ptr -36h
var_34 = byte ptr -34h
var_33 = byte ptr -33h
var_32 = word ptr -32h
var_30 = word ptr -30h
var_2E = word ptr -2Eh
var_2C = word ptr -2Ch
var_2A = word ptr -2Ah
var_28 = word ptr -28h
var_26 = word ptr -26h
var_24 = word ptr -24h
var_22 = word ptr -22h
var_20 = word ptr -20h
var_1E = word ptr -1Eh
var_1C = word ptr -1Ch
var_1A = word ptr -1Ah
var_18 = word ptr -18h
var_16 = word ptr -16h
var_14 = word ptr -14h
var_12 = word ptr -12h
var_10 = word ptr -10h
var_E = word ptr -0Eh
var_C = word ptr -0Ch
var_A = word ptr -0Ah
var_8 = word ptr -8
var_6 = word ptr -6
var_4 = word ptr -4
var_2 = byte ptr -2
var_1 = byte ptr -1
enter 0C8h, 0
mov word_39854, 1
push 0
push ds
push offset aBoss2_bos ; "boss2.bos"
push ds
push offset point_3982A
call sub_1568F
mov word_39854, 0
mov ax, point_3982A.x
mov [bp+var_32], ax
mov ax, point_3982A.y
mov [bp+var_30], ax
mov ax, word_3982E
mov [bp+var_2E], ax
mov ax, word_39830
mov [bp+var_2C], ax
mov ax, word_39832
mov [bp+var_2A], ax
mov ax, word_39834
mov [bp+var_28], ax
mov ax, word_39836
mov [bp+var_26], ax
mov ax, word_39838
mov [bp+var_24], ax
mov ax, word_3983A
mov [bp+var_22], ax
mov ax, word_3983C
mov [bp+var_20], ax
mov ax, word_3983E
mov [bp+var_1E], ax
mov ax, word_39840
mov [bp+var_1C], ax
mov ax, word_39842
mov [bp+var_1A], ax
mov ax, word_39844
mov [bp+var_18], ax
mov ax, word_39846
mov [bp+var_16], ax
mov ax, word_39848
mov [bp+var_14], ax
mov ax, word_3984A
mov [bp+var_12], ax
mov ax, word_3984C
mov [bp+var_10], ax
mov ax, word_3984E
mov [bp+var_E], ax
mov ax, word_39850
mov [bp+var_C], ax
mov ax, word_39852
mov [bp+var_A], ax
mov ax, word_39854
mov [bp+var_8], ax
mov ax, word_39856
mov [bp+var_6], ax
mov ax, word_39858
mov [bp+var_4], ax
mov al, byte_3985A
mov [bp+var_2], al
mov al, byte_3985B
mov [bp+var_1], al
push ds
push offset unk_39866
push ds
push offset unk_39864
push ds
push offset unk_3988D
push ds
push offset unk_3987C
push ss
lea ax, [bp+var_32]
push ax
call sub_15851
mov ax, point_3982A.x
mov [bp+var_64], ax
mov ax, point_3982A.y
mov [bp+var_62], ax
mov ax, word_3982E
mov [bp+var_60], ax
mov ax, word_39830
mov [bp+var_5E], ax
mov ax, word_39832
mov [bp+var_5C], ax
mov ax, word_39834
mov [bp+var_5A], ax
mov ax, word_39836
mov [bp+var_58], ax
mov ax, word_39838
mov [bp+var_56], ax
mov ax, word_3983A
mov [bp+var_54], ax
mov ax, word_3983C
mov [bp+var_52], ax
mov ax, word_3983E
mov [bp+var_50], ax
mov ax, word_39840
mov [bp+var_4E], ax
mov ax, word_39842
mov [bp+var_4C], ax
mov ax, word_39844
mov [bp+var_4A], ax
mov ax, word_39846
mov [bp+var_48], ax
mov ax, word_39848
mov [bp+var_46], ax
mov ax, word_3984A
mov [bp+var_44], ax
mov ax, word_3984C
mov [bp+var_42], ax
mov ax, word_3984E
mov [bp+var_40], ax
mov ax, word_39850
mov [bp+var_3E], ax
mov ax, word_39852
mov [bp+var_3C], ax
mov ax, word_39854
mov [bp+var_3A], ax
mov ax, word_39856
mov [bp+var_38], ax
mov ax, word_39858
mov [bp+var_36], ax
mov al, byte_3985A
mov [bp+var_34], al
mov al, byte_3985B
mov [bp+var_33], al
push ds
push offset unk_39898
push ds
push offset unk_39896
push ds
push offset unk_398BF
push ds
push offset unk_398AE
push ss
lea ax, [bp+var_64]
push ax
call sub_15851
add sp, 32h
mov ax, point_3982A.x
mov [bp+var_96], ax
mov ax, point_3982A.y
mov [bp+var_94], ax
mov ax, word_3982E
mov [bp+var_92], ax
mov ax, word_39830
mov [bp+var_90], ax
mov ax, word_39832
mov [bp+var_8E], ax
mov ax, word_39834
mov [bp+var_8C], ax
mov ax, word_39836
mov [bp+var_8A], ax
mov ax, word_39838
mov [bp+var_88], ax
mov ax, word_3983A
mov [bp+var_86], ax
mov ax, word_3983C
mov [bp+var_84], ax
mov ax, word_3983E
mov [bp+var_82], ax
mov ax, word_39840
mov [bp+var_80], ax
mov ax, word_39842
mov [bp+var_7E], ax
mov ax, word_39844
mov [bp+var_7C], ax
mov ax, word_39846
mov [bp+var_7A], ax
mov ax, word_39848
mov [bp+var_78], ax
mov ax, word_3984A
mov [bp+var_76], ax
mov ax, word_3984C
mov [bp+var_74], ax
mov ax, word_3984E
mov [bp+var_72], ax
mov ax, word_39850
mov [bp+var_70], ax
mov ax, word_39852
mov [bp+var_6E], ax
mov ax, word_39854
mov [bp+var_6C], ax
mov ax, word_39856
mov [bp+var_6A], ax
mov ax, word_39858
mov [bp+var_68], ax
mov al, byte_3985A
mov [bp+var_66], al
mov al, byte_3985B
mov [bp+var_65], al
push ds
push offset unk_398CA
push ds
push offset unk_398C8
push ds
push offset unk_398F1
push ds
push offset unk_398E0
push ss
lea ax, [bp+var_96]
push ax
call sub_15851
mov ax, point_3982A.x
mov [bp+var_C8], ax
mov ax, point_3982A.y
mov [bp+var_C6], ax
mov ax, word_3982E
mov [bp+var_C4], ax
mov ax, word_39830
mov [bp+var_C2], ax
mov ax, word_39832
mov [bp+var_C0], ax
mov ax, word_39834
mov [bp+var_BE], ax
mov ax, word_39836
mov [bp+var_BC], ax
mov ax, word_39838
mov [bp+var_BA], ax
mov ax, word_3983A
mov [bp+var_B8], ax
mov ax, word_3983C
mov [bp+var_B6], ax
mov ax, word_3983E
mov [bp+var_B4], ax
mov ax, word_39840
mov [bp+var_B2], ax
mov ax, word_39842
mov [bp+var_B0], ax
mov ax, word_39844
mov [bp+var_AE], ax
mov ax, word_39846
mov [bp+var_AC], ax
mov ax, word_39848
mov [bp+var_AA], ax
mov ax, word_3984A
mov [bp+var_A8], ax
mov ax, word_3984C
mov [bp+var_A6], ax
mov ax, word_3984E
mov [bp+var_A4], ax
mov ax, word_39850
mov [bp+var_A2], ax
mov ax, word_39852
mov [bp+var_A0], ax
mov ax, word_39854
mov [bp+var_9E], ax
mov ax, word_39856
mov [bp+var_9C], ax
mov ax, word_39858
mov [bp+var_9A], ax
mov al, byte_3985A
mov [bp+var_98], al
mov al, byte_3985B
mov [bp+var_97], al
push ds
push offset unk_398FC
push ds
push offset unk_398FA
push ds
push offset unk_39923
push ds
push offset unk_39912
push ss
lea ax, [bp+var_C8]
push ax
call sub_15851
nopcall sub_1B383
push ds
push offset aBoss3_m_ptn ; "boss3_m.ptn"
push 2
call sub_10888
mov byte_3A1B2, 80h ; '?'
push ds
push offset unk_39EC4
call sub_21EFF
add sp, 32h
leave
retf
sub_1B03F endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_1B383 proc far
push bp
mov bp, sp
push si
push di
push ds
push offset aBoss2_grp_0 ; "boss2.grp"
call sub_10C51
add sp, 4
call sub_232A4
mov word_3984E, 0
mov word_39880, 0
mov word_398B2, 0
mov word_398E4, 0
mov word_39916, 0
xor si, si
jmp short loc_1B3D8
; ---------------------------------------------------------------------------
loc_1B3BB:
xor di, di
jmp short loc_1B3D2
; ---------------------------------------------------------------------------
loc_1B3BF:
mov bx, si
imul bx, 3
mov al, _z_Palettes[bx+di]
mov bx, si
imul bx, 3
mov [bx+di+5414h], al
inc di
loc_1B3D2:
cmp di, 3
jl short loc_1B3BF
inc si
loc_1B3D8:
cmp si, 10h
jl short loc_1B3BB
push 1300040h
push 2E00000h
push 300080h
push 40h
push ds
push offset point_3982A
call sub_166D2
push 1300040h
push 2E00000h
push 300080h
push 200h
push ds
push offset point_3985C
call sub_166D2
add sp, 24h
push 1300040h
push 2E00000h
push 3000B0h
push 0C0h ; '?'
push ds
push offset point_3988E
call sub_166D2
push 1300040h
push 2E00000h
push 3000B0h
push 180h
push ds
push offset point_398C0.x
call sub_166D2
add sp, 24h
push 1300040h
push 2E00000h
push 300040h
push 120h
push ds
push offset point_398F2
call sub_166D2
mov word_3983E, 0Ch
mov word_39840, 34h ; '4'
mov word_39842, 0Ch
mov word_39844, 20h ; ' '
mov word_39870, 0Ch
mov word_39872, 34h ; '4'
mov word_39874, 0Ch
mov word_39876, 20h ; ' '
mov word_398A2, 0Ch
mov word_398A4, 34h ; '4'
mov word_398A6, 0Ch
mov word_398A8, 20h ; ' '
mov word_398D4, 0Ch
mov word_398D6, 34h ; '4'
mov word_398D8, 0Ch
mov word_398DA, 20h ; ' '
mov word_39906, 0Ch
mov word_39908, 34h ; '4'
mov word_3990A, 0Ch
mov word_3990C, 20h ; ' '
mov word_39852, 1
mov word_39884, 1
mov word_398B6, 1
mov word_398E8, 1
mov word_3991A, 1
mov word_3A6CA, 0
mov byte_3A6CE, 0
mov word_3A6C8, 10h
mov word_3A1E5, 0Ch
mov word_3A1E7, 8
push 700FFh
call sub_22264
add sp, 16h
pop di
pop si
pop bp
retf
sub_1B383 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_1B53D proc far
var_A = word ptr -0Ah
var_8 = qword ptr -8
arg_0 = word ptr 6
arg_2 = word ptr 8
arg_4 = dword ptr 0Ah
enter 0Ah, 0
mov ax, [bp+arg_2]
sub ax, [bp+arg_0]
mov [bp+var_A], ax
fild [bp+var_A]
fstp [bp+var_8]
pushd 3
fwait
call isqrt
mov [bp+var_A], ax
fild [bp+var_A]
fmul [bp+var_8]
fdiv flt_35B76
call ftol@
les bx, [bp+arg_4]
mov es:[bx], ax
leave
retf
sub_1B53D endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_1B579 proc far
push bp
mov bp, sp
push 0
call sub_169CB
push 2
call sub_108AB
add sp, 4
pop bp
retf
sub_1B579 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_1B58F proc far
push bp
mov bp, sp
cmp word_3A6CA, 0A0h ; '?'
jle loc_1B6CB
cmp word_3A6CA, 12Ch
jge short loc_1B60E
push (7 shl 16) or 398
mov ax, point_3982A.y
add ax, 28
push ax
mov ax, point_3982A.x
add ax, 28
push ax
call _graph_r_vline
push (7 shl 16) or 398
mov ax, point_3985C.y
add ax, 28
push ax
mov ax, point_3985C.x
add ax, 28
push ax
call _graph_r_vline
add sp, 10h
mov ax, point_3982A.x
add ax, 4
cmp ax, x_36C26
jge short loc_1B5F1
mov ax, point_3982A.x
add ax, 20
cmp ax, x_36C26
jg short loc_1B609
loc_1B5F1:
mov ax, point_3985C.x
add ax, 4
cmp ax, x_36C26
jge short loc_1B60E
mov ax, point_3985C.x
add ax, 44
cmp ax, x_36C26
jle short loc_1B60E
loc_1B609:
mov _player_is_hit, 1
loc_1B60E:
cmp word_3A6CA, 0B4h ; '?'
jle loc_1B6CB
cmp word_3A6CA, 140h
jge short loc_1B68A
push (7 shl 16) or 398
mov ax, point_3988E.y
add ax, 28
push ax
mov ax, point_3988E.x
add ax, 28
push ax
call _graph_r_vline
push (7 shl 16) or 398
mov ax, point_398C0.y
add ax, 28
push ax
mov ax, point_398C0.x
add ax, 28
push ax
call _graph_r_vline
add sp, 10h
mov ax, point_3988E.x
add ax, 4
cmp ax, x_36C26
jge short loc_1B66D
mov ax, point_3988E.x
add ax, 14h
cmp ax, x_36C26
jg short loc_1B685
loc_1B66D:
mov ax, point_398C0.x
add ax, 4
cmp ax, x_36C26
jge short loc_1B68A
mov ax, point_398C0.x
add ax, 14h
cmp ax, x_36C26
jle short loc_1B68A
loc_1B685:
mov _player_is_hit, 1
loc_1B68A:
cmp word_3A6CA, 0C8h ; '?'
jle short loc_1B6CB
push (7 shl 16) or 398
mov ax, point_398F2.y
add ax, 28
push ax
mov ax, point_398F2.x
add ax, 28
push ax
call _graph_r_vline
add sp, 8
mov ax, point_398F2.x
add ax, 4
cmp ax, x_36C26
jge short loc_1B6CB
mov ax, point_398F2.x
add ax, 14h
cmp ax, x_36C26
jle short loc_1B6CB
mov _player_is_hit, 1
loc_1B6CB:
cmp word_34A78, 0
jz short loc_1B6D7
mov _player_is_hit, 0
loc_1B6D7:
pop bp
retf
sub_1B58F endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_1B6D9 proc far
push bp
mov bp, sp
mov ax, word_3A6CA
cwd
idiv word_39DE4
cmp dx, 0Ah
jnz short loc_1B70E
push 180015h
mov ax, point_3982A.y
add ax, 20h ; ' '
push ax
mov ax, point_3982A.x
add ax, 1Ch
push ax
push ds
push offset unk_37635
call sub_30368
add sp, 0Ch
push 18h
jmp loc_1B7D1
; ---------------------------------------------------------------------------
loc_1B70E:
mov ax, word_3A6CA
cwd
idiv word_39DE4
cmp dx, 19h
jnz short loc_1B740
push 1C0015h
mov ax, point_3982A.y
add ax, 32
push ax
mov ax, point_3982A.x
add ax, 28
push ax
push ds
push offset unk_37635
call sub_30368
add sp, 0Ch
push 1Ch
jmp loc_1B7D1
; ---------------------------------------------------------------------------
loc_1B740:
mov ax, word_3A6CA
cwd
idiv word_39DE4
cmp dx, 28h ; '('
jnz short loc_1B771
push 200015h
mov ax, point_3982A.y
add ax, 32
push ax
mov ax, point_3982A.x
add ax, 28
push ax
push ds
push offset unk_37635
call sub_30368
add sp, 0Ch
push 20h ; ' '
jmp short loc_1B7D1
; ---------------------------------------------------------------------------
loc_1B771:
mov ax, word_3A6CA
cwd
idiv word_39DE4
cmp dx, 3Ch ; '<'
jnz short loc_1B7A2
push 2C0015h
mov ax, point_3982A.y
add ax, 32
push ax
mov ax, point_3982A.x
add ax, 28
push ax
push ds
push offset unk_37635
call sub_30368
add sp, 0Ch
push 2Ch ; ','
jmp short loc_1B7D1
; ---------------------------------------------------------------------------
loc_1B7A2:
mov ax, word_3A6CA
cwd
idiv word_39DE4
cmp dx, 50h ; 'P'
jnz short loc_1B7D5
push 320015h
mov ax, point_3982A.y
add ax, 32
push ax
mov ax, point_3982A.x
add ax, 28
push ax
push ds
push offset unk_37635
call sub_30368
add sp, 0Ch
push 32h ; '2'
loc_1B7D1:
push 15h
jmp short loc_1B808
; ---------------------------------------------------------------------------
loc_1B7D5:
mov ax, word_3A6CA
cwd
idiv word_39DE4
cmp dx, 6Eh ; 'n'
jnz short loc_1B822
push 44000Ch
mov ax, point_3982A.y
add ax, 32
push ax
mov ax, point_3982A.x
add ax, 28
push ax
push ds
push offset unk_37635
call sub_30368
add sp, 0Ch
push 44000Ch
loc_1B808:
mov ax, point_3985C.y
add ax, 32
push ax
mov ax, point_3985C.x
add ax, 28
push ax
push ds
push offset unk_37635
call sub_30368
add sp, 0Ch
loc_1B822:
pop bp
retf
sub_1B6D9 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_1B824 proc near
var_18 = qword ptr -18h
var_10 = qword ptr -10h
var_6 = word ptr -6
var_4 = word ptr -4
var_2 = word ptr -2
arg_0 = word ptr 4
arg_2 = word ptr 6
enter 6, 0
push [bp+arg_2]
push 8
push ss
lea ax, [bp+var_2]
push ax
push ss
lea ax, [bp+var_4]
push ax
call _vector
add sp, 0Ch
push 0 ; char
mov ax, [bp+var_2]
mov [bp+var_6], ax
fild [bp+var_6]
sub sp, 8
fstp [bp+var_10]
fwait
mov ax, [bp+var_4]
mov [bp+var_6], ax
fild [bp+var_6]
sub sp, 8
fstp [bp+var_18]
fwait
mov ax, point_3988E.y
add ax, 1Ch
push ax ; int
mov ax, point_3988E.x
add ax, 1Ch
push ax ; int
push ds
push offset unk_39EC4 ; __int32
call sub_21C0D
add sp, 1Ah
push [bp+arg_0]
push 8
push ss
lea ax, [bp+var_2]
push ax
push ss
lea ax, [bp+var_4]
push ax
call _vector
add sp, 0Ch
push 0 ; char
mov ax, [bp+var_2]
mov [bp+var_6], ax
fild [bp+var_6]
sub sp, 8
fstp [bp+var_10]
fwait
mov ax, [bp+var_4]
mov [bp+var_6], ax
fild [bp+var_6]
sub sp, 8
fstp [bp+var_18]
fwait
mov ax, point_398C0.y
add ax, 28
push ax ; int
mov ax, point_398C0.x
add ax, 28
push ax ; int
push ds
push offset unk_39EC4 ; __int32
call sub_21C0D
add sp, 1Ah
leave
retn 4
sub_1B824 endp
; =============== S U B R O U T I N E =======================================
; Attributes: bp-based frame
sub_1B8DE proc near
arg_0 = word ptr 4
push bp
mov bp, sp
push si
push di
mov di, [bp+arg_0]
call sub_114CA stdcall, x_39DE6, y_39DF0, x_39DEA, y_39DF4
call sub_114CA stdcall, x_39DEA, y_39DF4, x_39DEE, y_39DF8
call sub_114CA stdcall, x_39DEE, y_39DF8, x_39DE8, y_39DF2
call sub_114CA stdcall, x_39DE8, y_39DF2, x_39DEC, y_39DF6
call sub_114CA stdcall, x_39DEC, y_39DF6, x_39DE6, y_39DF0
add sp, 28h
xor si, si
jmp short loc_1B9B1
; ---------------------------------------------------------------------------
loc_1B956:
movsx eax, word_39DFA
mov bx, si
imul bx, 33h
add bx, di
and bx, 0FFh
add bx, bx
movsx edx, _CosTable8[bx]
imul eax, edx
sar eax, 8
add ax, point_39DFC.x
mov bx, si
add bx, bx
mov [bx+5446h], ax
movsx eax, word_39DFA
mov bx, si
imul bx, 33h
add bx, di
and bx, 0FFh
add bx, bx
movsx edx, _SinTable8[bx]
imul eax, edx
sar eax, 8
add ax, point_39DFC.y
mov bx, si
add bx, bx
mov [bx+5450h], ax
inc si
loc_1B9B1:
cmp si, 5
jl short loc_1B956
call sub_114E3 stdcall, x_39DE6, y_39DF0, x_39DEA, y_39DF4, 7
call sub_114E3 stdcall, x_39DEA, y_39DF4, x_39DEE, y_39DF8, 7
call sub_114E3 stdcall, x_39DEE, y_39DF8, x_39DE8, y_39DF2, 7
call sub_114E3 stdcall, x_39DE8, y_39DF2, x_39DEC, y_39DF6, 7
call sub_114E3 stdcall, x_39DEC, y_39DF6, x_39DE6, y_39DF0, 7
add sp, 32h
pop di