forked from historicalsource/smashtv
-
Notifications
You must be signed in to change notification settings - Fork 1
/
MUTOID.ASM
4524 lines (4305 loc) · 75.3 KB
/
MUTOID.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
.FILE "MUTOID.ASM"
.TITLE "ROBO-RAMA GAME PROGRAM"
.WIDTH 132
.OPTION B,D,L,T
.MNOLIST
;CHANGE TO RED PAL WHEN DAMAGED
;
; INITIATED: APRIL 26,1989
; MODIFIED: !
; SOFTWARE: MARK TURMELL
;
; COPYRIGHT (C) 1989 WILLIAMS ELECTRONICS GAMES, INC.
;
;
; GET THE SYSTEM STUFF
.INCLUDE "MPROC.EQU" ;MPROC EQUATES
.INCLUDE "DISP.EQU" ;DISPLAY PROC. EQUATES
.include "sys.inc" ;z unit system equates
.include "macros.hdr" ;macros definitions
.INCLUDE "IMGTBL.GLO"
.INCLUDE "ROBO.EQU"
.INCLUDE "MUTEXP.TBL"
.INCLUDE "MAC2.ASM" ;MACRO 2 DEFINITIONS
.INCLUDE "AUDIT.EQU"
;
;SOUND HEADERS USED HERE
;
.REF MBANG,BUBL,EXP3,YAMOFF,EXP3HI,LAZSND,VICMSC,EXP3HIA
.REF AWWSND,EESND,ONOSND,WPWPSND,WPSSND,NOWAY,OUCH,CROWD1
.REF MCSPK7
.REF AWWSND2,SOUNDSUP,GOGO,BINGO,MCSPK4,MCSPK8,CIRCUIT
;
;SYMBOLS EXTERNALLY DEFINED
;
.REF CLNPAL,WAVEYX,CHKFREE,O_ITEMS2,BAD0,GET_ADJ
.REF EXPTLXY,EXPLRXY,DEXIT,BOSSON,GAMSTATE,ENDON,BOOM3
.REF GPALOBJ,TTORSO,FRANIM,RANGRAND,SHAKER,XYSKOBJ,CVRT
.REF GETHDR,RANDPER,PLYROBJS,STATUS2,SHK_ON,NEWV
.REF KP_TS,HALT,PCNT,FLASHME,OBJOFF,OBJON,ARMOFF
.REF SCRTSTG,BOOM2,XVEL,YVEL,P1DATA,P2DATA,SCRADD2
.REF ARMOFF2,ADDPCS2,OVALBLD,CLUSTER,KILL_F2_NO,SCRTST
;
;SYMBOLS DEFINED IN THIS FILE
;
.DEF O_MUT,TOID_ON,KIL_SNK,BOOMN,MARM6A,DOSHK0,MUTPTR
.DEF MUT_HIT,EXP_BULL,EXP_BULL2,GETSPK,MCON
;
;UNINITIALIZED RAM DEFINITIONS
;
.BSS MCON,16
.BSS KPPLYR,32
.BSS SNDCNT,16
.BSS POPFLG,8
.BSS POP,8
.BSS DMGSK,16
.BSS DMGPNT,8
.BSS DMG,16
.BSS KPA10,8
.BSS PLYRAD,8
.BSS INAIR,8
.BSS FISTDN,8
.BSS MEMAD,16
.BSS MEROAR,16
.BSS TOTLZRS,8
.BSS HEADV,8
.BSS SKVW,8
.BSS SCNTR,8
.BSS UPDT,16
.BSS MDIR,8
.BSS TIMES,8
.BSS PLS,8 ;SLEEP CNTR USED FOR BOTH FAST AND SLOW POUND
.BSS PRS,8
.BSS FISTLP,32
.BSS FISTRP,32
.BSS PNDRP,32
.BSS PNDLP,32
.BSS POSEL,32
.BSS POSER,32
.BSS FPNDRP,32
.BSS FPNDLP,32
.BSS TOID_ON,8
.BSS TRDSLP,8
.BSS TRDFTRP,32
.BSS TRDFTLP,32
.BSS TRDSDLP,32
.BSS TRDSDRP,32
.BSS MACTION,8
.BSS MTIME,16
.BSS KP_BELL,32
.BSS SNKOUT,8
.BSS MUTPTR,32
;
;EQUATES FOR THIS FILE
;
DNYVEL .EQU 0E000H
DNYVEL2 .EQU 01A000H ;01C000H
UPYVEL .EQU -09000H
UPYVEL2 .EQU -01A000H ;-01C000H
;
;BEAM DATA STRUCTURE
;
PCS .EQU PDATA ;UHB TIMES TO LAY THIS BEAM DOWN
SLP .EQU PDATA+8
;
;MUTOID DATA STRUCTURE
;
TNKL .EQU PDATA ;UHL TANK LEFT PTR
TNKR .EQU PDATA+32 ;UHL TANK RGT PTR
TRSL .EQU PDATA+64 ;UHL TORSO LEFT PTR
TRSR .EQU PDATA+96 ;UHL TORSO RGT PTR
ARML .EQU PDATA+128 ;UHL ARM LEFT PTR
ARMR .EQU PDATA+160 ;UHL ARM RGT PTR
TRDLF .EQU PDATA+192 ;UHL TANK LEFT/FRONT TREAD
TRDRF .EQU PDATA+224 ;UHL TANK RGT/FRONT TREAD
TRDLS .EQU PDATA+256 ;UHL TANK LEFT/SIDE TREAD
TRDRS .EQU PDATA+288 ;UHL TANK RGT/SIDE TREAD
SHADR .EQU PDATA+320 ;UHL SHADOW ON RIGHT SIDE OF TANK
SHADF .EQU PDATA+352 ;UHL SHADOW IN FRONT OF TANK
MHEAD .EQU PDATA+384 ;UHL HEAD PTR
;
MAXPCS .EQU 10
LSTPC .EQU MAXPCS-1
;
;DATA STRUCTURE OF MASTER PIECE POINTER
;
BLDVW .EQU PDATA ;UHB BLADE VIEW 0-3
CDELAY .EQU PDATA+8 ;UHB DELAY BEFORE UPDATING
DLY .EQU PDATA+16 ;UHL DLY VEL UPDATE FOR THIS CNT
GDIE .EQU PDATA+48 ;UHB GONNA DIE FLAG
SKTM .EQU PDATA+56 ;UHW
SKHITS .EQU PDATA+72 ;UHB
;
;UNINITIALIZED RAM DEFINITIONS
;
.BSS OOF,16
.BSS CHEEK,16
.BSS TRAM1,32*MAXPCS+32
.BSS SCRL,8
.BSS TRAM2,32*MAXPCS
.TEXT
;
O_MUT
CREATE DUM_ID,MUTOID
RETS
OCH SLEEP 23
MOVI OUCH,A0
MOVE @MCON,A1
JRZ OCH1
MOVI MCSPK7,A0
OCH1
CALLA ONESND
DIE
MUTOID:
;SHAKE SCREEN
CLR A1
MOVE @CIRCUIT,A0
CMPI 2,A0
JRNZ JJ1
MOVK 1,A1
JJ1 MOVE A1,@MCON
MOVI EXP3HI,A0
CALLA ONESND
CALLR DOSHK0
SLEEP 5
CALLR DOSHK0
SLEEP 5
MOVI EXP3HI,A0
CALLA ONESND
CALLR DOSHK0
SLEEP 5
CALLR DOSHK0
MOVI EXP3HI,A0
CALLA ONESND
SLEEP 5
CALLR DOSHK0
CREATE 0,OCH
MOVE @GAMSTATE,A0,W
MOVI 300+400-90+180,A9
CMPI INAMODE,A0
JRNZ MD1
;NO WAY SOUND CALL
CLR A0
MOVE A0,@SOUNDSUP
;SOUNDS OFF IN DEMO
ADJUST ADJMUSIC ;GET MUSIC ON OFF FOR DEMO
MOVE A0,A0
JRNZ NONO
MOVI NOWAY,A0
CALLA ONESND
NONO MOVI 0FDH,A9
MOVK 1,A0
MOVE A0,@SOUNDSUP
MD1
MOVI 0FFH,A0
MOVB A0,@KP_TS
SLEEP 1
DSJS A9,MD1
; MOVI DLSTZ,A1
; CALLA UNGET
CALLA CLNPAL
SLEEP 1
;TURN ON ALL PIECES
MOVK 13,A9
TP MOVE A9,A0
SLL 5,A0
MOVE @MCON,A1
JRZ NOMC
ADDI MCLIST,A0
JRUC MC
NOMC ADDI ONLIST,A0
MC MOVE *A0,A14,L
CALLA GPALOBJ ;ALLOCATE A COLOR PALETTE
CALLA STFOBJ ;STUFF OBJECT DATA
MOVE A13,*A0(OPLINK),L
CALLA INSOBJ ;INSERT OBJECT INTO LIST
MOVE A0,A8
MOVI 173,A11 ;X
MOVI -70,A10 ;Y
MOVE A10,*A8(OYPOS),W
MOVE A11,*A8(OXPOS),W
CALLA ADJSTWTL
MOVE *A8(OPAL),A0,L
ANDI 0FFFFH,A0
MOVE A0,*A8(OPAL),L
MOVE A9,A0
DEC A0
SLL 5,A0
ADD A13,A0
ADDI TNKL,A0
MOVE A8,*A0,L
DEC A9
JRNZ TP
;OBJECTS ALL ON
MOVB A9,@TOTLZRS
MOVE A9,@DMGPNT
MOVE A9,@DMG
MOVI 150,A9 ;200 ;FIRST LEVEL OF DAMAGE TO GET TO.
MOVE A9,@DMGSK
MOVK 1,A0
MOVB A0,@TOID_ON
MOVB A0,@BOSSON
MOVE A13,@MUTPTR,L
MOVE *A13(TNKL),A8,L
MOVE A13,A10
CLR A9 ;TORSO ON LEFT OF TANK
CREATE TNKPID,TTORSO
MOVE A13,A10
MOVK 1,A9
CREATE TNKPID,TTORSO
CREATE BONPID,BELLY
MOVE *A13(MHEAD),A9,L
CREATE BONPID,DO_HEAD
CREATE BONPID,SKPLYR
CREATE BONPID,GETDOWN
CLR A0 ;ROLL IN FROM DOOR
CALLA GET_ST ;SET INITIAL ACTION
SLEEP 3
TOID_TOP
MOVE @HALT,A0
JRZ TT2
; CLR A0
; MOVE A0,*A8(OXVEL),L
; MOVE A0,*A8(OYVEL),L
; CALLR MOD_VELS
CALLR LINE_UP ;ADJUST ALL PARTS TO MATCH TANK LEFT
SLEEP 1
JRUC TOID_TOP
TT2
CALLR LINE_UP ;ADJUST ALL PARTS TO MATCH TANK LEFT
CALLR MV_TNK
MOVE A8,*A13(TNKL),L
SLEEP 1
JRUC TOID_TOP
GETDOWN
MOVI 180,A9
GETD SLEEP 1
MOVE @HALT,A0
JRNZ GETD
MOVE @MUTPTR,A1,L
MOVE *A1(TNKL),A8,L
MOVI DNYVEL,A0
MOVE A0,*A8(OYVEL),L
DSJ A9,GETD
DIE
SKPLYR
SLEEP 24*60
MOVE @HALT,A0
JRNZ SKPLYR
SKTP
;MAYBE JERK TOWARD PLAYER
MOVE @PLYROBJS,A0,L
MOVB @PCNT,A1
ANDI 1,A1
JREQ COP1
MOVE @PLYROBJS+32,A0,L
COP1 MOVE @MUTPTR,A1,L
MOVE *A1(TNKL),A8,L
CALLA PLTLINE
MOVE A5,A9 ;X
MOVE A6,A10 ;Y
;SHAKE MUTOID MAN
CREATE BONPID,XYADJ
MOVI 30,A11
COP2
MOVE A9,*A8(OXVEL),L
MOVE A10,*A8(OYVEL),L
MOVE *A8(OXVAL),A1,L
MOVE @WORLDTLX,A2,L
SUB A2,A1
CMPI [90,0],A1
;HAS IS HIT LEFT, STOP IT FROM MOVING MORE TO LEFT
JRNC RTGOR
MOVI 020000H,A9
MOVK 1,A11
RTGOR
CMPI [245,0],A1
JRC RTOK
MOVI -020000H,A9
MOVK 1,A11
RTOK
MOVE *A8(OYVAL),A1,L
MOVE @WORLDTLY,A2,L
SUB A2,A1
CMPI [40,0],A1
;HAS IS HIT LEFT, STOP IT FROM MOVING MORE TO LEFT
JRNC RTYGO
MOVI 18000H,A10
; MOVK 1,A11
RTYGO
CMPI [170,0],A1
JRC CONT
MOVI -18000H,A10
MOVK 1,A11
CONT
SLEEP 2
DEC A11
JRNZ COP2
MOVE A11,*A8(OXVEL),L
MOVE A11,*A8(OYVEL),L
SLEEP 5*60
JRUC SKTP
;
MUT_HIT
;A8=PIECE HIT
;A0=BULLET PNTR
;
;IF GRENADE, DO DAMAGE
;IF SPEW, DO DAMAGE
;IF LAZER WEAPON, DO NOTHING
;IF NOT JUST FLASH IMAGE
MMTM SP,A1,A2,A7,A9,A10
MOVE *A8(OID),A1
ANDI 0FFFFH,A1
CMPI CLSENMY|TYPMUT|SUBSNK,A1
JREQ SNKHIT
MOVE *A0(OID),A1
CMPI CLSPLYR|TYPPLBL|SUBLZR,A1
JREQ NADA2
CMPI CLSPLYR|TYPPLBL|SUBGRND,A1
JREQ NF2
CMPI CLSPLYR|TYPPLBL|SUBSPEW,A1
JREQ NADA
;MORE DAMAGE IF SPEW2!
MOVE *A8(OID),A1
ANDI 0FFFFH,A1
CMPI CLSENMY|TYPMUT|SUBHD,A1
JREQ NADA
;A2=P1DATA OR P2DATA
MOVE *A0(OPLINK),A0,L
MOVB *A0(MYPLYR),A0
MOVI P1DATA,A2
CMPI 1,A0
JREQ YU7
CMPI 2,A0
JRNZ YU7A
MOVI P2DATA,A2
YU7
MOVI MUTPT,A1 ;AMOUNT OF SCORE
MOVE A2,@KPPLYR,L
CALLA SCRADD2 ;DO IT!
;
YU7A MOVI 2,A0
CALLR DAMAGE
NF
MOVI 03F3F0000H,A9
CREATE 0,FLASHME
;
NADA MMFM SP,A1,A2,A7,A9,A10
RETS
NADA2
MOVK 15,A0 ;50 ;90 ;60
CALLA RANDPER
JRNC NADA
MOVE @DMG,A2
MOVE @DMGSK,A1
CMP A1,A2
JRNC AHITU
ADDK 1,A2
MOVE A2,@DMG
CMPI 3,A0
JRNC NADA
AHITU
MOVI 5,A0
MOVE A0,@MEMAD
MOVI 15,A0
MOVE A0,@OOF
MOVI EESND,A0
CALLA ONESND
JRUC NADA
NF2
;A2=P1DATA OR P2DATA
MOVE *A0(OPLINK),A0,L
MOVB *A0(MYPLYR),A0
MOVI P1DATA,A2
CMPI 1,A0
JREQ YU8
CMPI 2,A0
JRNZ YU8A
MOVI P2DATA,A2
YU8
;A2=P1DATA OR P2DATA
MOVE A2,@KPPLYR,L
MOVI MUTPT,A1 ;AMOUNT OF SCORE
CALLA SCRADD2 ;DO IT!
;TELL HEAD TO OOF!
YU8A MOVI 15,A0
MOVE A0,@OOF
MOVI 15,A0
CALLR DAMAGE
CALLR GETSPK
JRUC NF
GETSPK
MOVE @SNDCNT,A0
INC A0
MOVE A0,@SNDCNT
ANDI 03H,A0
JRZ S2
SLL 5,A0
MOVE @MCON,A1
JRZ KOP
ADDI SNDLSTZ,A0
JRUC KOP2
KOP ADDI SNDLST,A0
KOP2 MOVE *A0,A0,L
CALLA ONESND
RETS
S2 MOVI 250,A0
CALLA RANDPER
JRC S3
MOVI AWWSND2,A0
CALLA ONESND
RETS
S3 MOVI AWWSND,A0
CALLA ONESND
RETS
SNDLST .LONG AWWSND,OUCH,EXP3HIA,ONOSND
SNDLSTZ .LONG MCSPK7,GOGO,MCSPK4,MCSPK8
DAMAGE
MOVE A0,A2
MOVE @DMG,A1
ADD A0,A1
MOVE A1,@DMG
MOVE @DMGSK,A0
CMP A0,A1
JRNC AHIT
CMPI 15,A2
JRZ DF4
MOVI 500,A0
CALLA RANDPER
JRNC DF5
DF4
PUSH A0
CREATE BONPID,XYADJ
PULL A0
CMPI 200,A0
JRNC DF5
ANDI 03,A0
SLL 5,A0
MOVE @MCON,A1
JRZ NN1
ADDI SNDLSTZ,A0
JRUC NN2
NN1
ADDI OTBL,A0
NN2 MOVE *A0,A0,L
CALLA ONESND
MOVI 20,A0
MOVE A0,@MEMAD
DF5
RETS
OTBL .LONG OUCH,AWWSND,EESND,ONOSND
XYADJ
;ADJUST MUTOID X/Y
MOVK 10,A9 ;14
MOVE @MCON,A0
JRZ I80
MOVK 20,A9 ;14
I80
MOVE @MUTPTR,A0,L
MOVE *A0(TNKL),A8,L
; MOVE *A0(TNKR),A10,L
XY2
MOVE @DMGSK,A0
ANDI 0FFFFH,A0
CMPI 0FFFFH,A0
JREQ DI
MOVE @MCON,A0
JRZ I801
MOVI -5,B0 ;-4
MOVI 5,B1 ;4
JRUC FOUT
I801
MOVI -3,B0 ;-4
MOVI 3,B1 ;4
FOUT CALLA RANGRAND
MOVE *A8(OXPOS),A1
ADD A0,A1
CALLA CKBNDX
JRC HITX
MOVE A1,*A8(OXPOS)
HITX
MOVE @MCON,A0
JRZ I802
MOVI -5,B0 ;-4
MOVI 5,B1 ;4
JRUC FOUT1
I802
MOVI -3,B0 ;-4
MOVI 3,B1 ;4
FOUT1 CALLA RANGRAND
MOVE *A8(OYPOS),A1
ADD A0,A1
CALLA CKBNDY
JRC HITY
MOVE A1,*A8(OYPOS)
HITY
; MOVE *A8(OYPOS),A0
; MOVE A0,*A10(OYPOS)
SLEEP 3
DEC A9
JRNZ XY2
DI DIE
XYADJ2
;ADJUST MUTOID X/Y
MOVK 10,A9 ;14
MOVE @MCON,A0
JRZ I90
MOVK 20,A9 ;14
I90
MOVE @MUTPTR,A0,L
MOVE *A0(TNKL),A8,L
; MOVE *A0(TNKR),A10,L
XY22
MOVI -8,B0 ;-4
MOVI 8,B1 ;4
CALLA RANGRAND
MOVE *A8(OXPOS),A1
ADD A0,A1
CALLA CKBNDX
JRC HITX2
MOVE A1,*A8(OXPOS)
HITX2 MOVI -8,B0 ;-4
MOVI 8,B1 ;4
CALLA RANGRAND
MOVE *A8(OYPOS),A1
ADD A0,A1
CALLA CKBNDY
JRC HITY2
MOVE A1,*A8(OYPOS)
HITY2
; MOVE *A8(OYPOS),A0
; MOVE A0,*A10(OYPOS)
SLEEP 3
DEC A9
JRNZ XY22
DIE
CKBNDX
PUSH A1
MOVE @WORLDTLX,A2,L
SLL 16,A1
SUB A2,A1
CMPI [100,0],A1
;HAS IS HIT LEFT, STOP IT FROM MOVING MORE TO LEFT
JRC RTBAD
CMPI [235,0],A1
JRNC RTBAD
PULL A1
CLRC
RETS
RTBAD PULL A1
SETC
RETS
CKBNDY
PUSH A1
MOVE @WORLDTLY,A2,L
SLL 16,A1
SUB A2,A1
CMPI [40,0],A1
;HAS IS HIT LEFT, STOP IT FROM MOVING MORE TO LEFT
JRC RTBAD
CMPI [160,0],A1
JRNC RTBAD
PULL A1
CLRC
RETS
AHIT
ADDI 40,A0 ;55
MOVE @MCON,A1
JRZ AHIY
ADDI 35,A0 ;25
AHIY
MOVE A0,@DMGSK
CREATE 0,AHITPRC
RETS
AHITPRC
CALLR HITRC2
DIE
HITRC2
MOVB @DMGPNT,A0
INC A0
MOVB A0,@DMGPNT
SLL 5,A0
ADDI JPTBLH,A0
MOVE *A0,A0,L
JUMP A0
JPTBLH .LONG 0,LFARM,RGTARM,BLOCHST,BLOHD,BLOCHST2,KILLMUT,TAG,TAG
TAG RETS
GETDMGSK
MOVI 0250,A1 ;300
MOVE @STATUS2,A0
CMPI 3,A0
JRNZ ONEP
MOVI 300,A1 ;400
ONEP
MOVE @DMGSK,A0
ADD A1,A0
MOVE A0,@DMGSK
RETS
LFARM
CREATE 0,TAG1
CALLR GETDMGSK
MOVI MUTPT3,A1 ;AMOUNT OF SCORE FOR ARMS ETC
MOVE @KPPLYR,A2,L
CALLA SCRADD2 ;DO IT!
RETS
TAG1
MOVI OUCH,A0
CALLA ONESND
;COVER ARM WITH SMALL EXP
MOVI 105,A10
TL0 CREATE 0,COVER
SLEEP 3
DSJS A10,TL0
MOVI ONOSND,A0
CALLA ONESND
SLEEP 25
;BLOW OFF LEFT ARM
MOVE @MUTPTR,A0,L
MOVE *A0(ARML),A10,L ;ARML
CREATE 0,TURN1
CREATE 0,THROWL
SLEEP 40
MOVI EESND,A0
CALLA ONESND
DIE
TAG2
MOVI ONOSND,A0
CALLA ONESND
;COVER ARM WITH SMALL EXP
MOVI 105,A10
TL01 CREATE 0,COVER2 ;COVER2
SLEEP 3
DSJS A10,TL01
SLEEP 25
MOVI AWWSND,A0
CALLA ONESND
;BLOW OFF RGT ARM
MOVE @MUTPTR,A0,L
MOVE *A0(ARMR),A10,L ;ARMR
CREATE 0,TURN1
CREATE 0,THROWR
SLEEP 60
MOVI AWWSND,A0
CALLA ONESND
DIE
RGTARM
CREATE 0,TAG2
CALLR GETDMGSK
MOVI MUTPT3,A1 ;AMOUNT OF SCORE FOR ARMS ETC
MOVE @KPPLYR,A2,L
CALLA SCRADD2 ;DO IT!
RETS
BLOCHST
CREATE 0,THROWC
CALLR GETDMGSK
MOVI ONOSND,A0
CALLA ONESND
MOVI MUTPT3,A1 ;AMOUNT OF SCORE FOR ARMS ETC
MOVE @KPPLYR,A2,L
CALLA SCRADD2 ;DO IT!
RETS
BLOHD
MOVI OUCH,A0
CALLA ONESND
MOVE @MUTPTR,A0,L
MOVE *A0(MHEAD),A10,L ;MHEAD
CREATE 0,TURN1
CREATE 0,THROWH
CALLR GETDMGSK
MOVI MUTPT3,A1 ;AMOUNT OF SCORE FOR ARMS ETC
MOVE @KPPLYR,A2,L
CALLA SCRADD2 ;DO IT!
RETS
BLOCHST2
MOVI NOWAY,A0
CALLA ONESND
MOVE @MUTPTR,A0,L
MOVE *A0(TRSL),A10,L ;TRSL
CREATE 0,TURN1
MOVE @MUTPTR,A0,L
MOVE *A0(TRSR),A10,L ;TRSR
CREATE 0,TURN1
CREATE 0,THROWC2
MOVE @MUTPTR,A0,L
MOVE *A0(MHEAD),A0,L ;MHEAD
MOVE *A0(OFLAGS),A1
ORI M_NOCOLL,A1
MOVE A1,*A0(OFLAGS)
CALLA OBJON
MOVI 131,A1
MOVE A1,*A0(OZPOS)
CALLR GETDMGSK
MOVI MUTPT3,A1 ;AMOUNT OF SCORE FOR ARMS ETC
MOVE @KPPLYR,A2,L
CALLA SCRADD2 ;DO IT!
CLR A0
MOVB A0,@TOTLZRS ;TOTAL LAZER SHOTS HE WILL SHOOT
RETS
KILLMUT
;KILL MUTOID PROCESS
;BLOW UP FATMEN REMAINING!
;KILL SNAKE, LAZERS
MOVI MUTPT2,A1 ;AMOUNT OF SCORE AT END
MOVE @KPPLYR,A2,L
CALLA SCRADD2 ;DO IT!
MOVI OUCH,A0
CALLA ONESND
MOVK 1,A0
MOVB A0,@ENDON
MOVI CLSENMY|TYPORBL,A0
MOVI 0FFFFH,A1
CALLA KILOBJ
MOVI CLSENMY|TYPMUT|SUBSNK,A0
CALLA KILOBJ
BAD1
MOVI CLSENMY|TYPFAT,A0
MOVI 0FFFFH,A1
CALLA EXISTOBJ
JRZ BAD2
;FOUND A FAT
MOVE A0,A8
;NO SCORE FOR THESE FAT GUYS
CALLA KILL_F2_NO ;KILL_FAT
JRUC BAD1
BAD2
MOVI BONPID,A0
CLR A1
NOT A1
CALLA KILALL
MOVI LORDPID,A0
CALLA KILALL
MOVI CLSNEUT|TYPNEUT|SUBCHNK2,A0
CLR A1
NOT A1
CALLA KILOBJ
CREATE 0,SPW2
MOVI 0FFFFH,A0
MOVE A0,@DMGSK
CREATE 0,VIC
RETS
VIC SLEEP 30
;TURN ON VICTORY MUSIC!
MOVI VICMSC,A0
CALLA ONESND
DIE
SPW2
;SPEW BIG
CALLA DOSHK0
CLR A0
MOVE @MUTPTR,A9,L
MOVE *A9(TNKL),A8,L
MOVE A0,*A8(OXVEL),L
MOVE A0,*A8(OYVEL),L
PUSH A13
MOVE A9,A13
CALLR MOD_VELS
PULL A13
MOVI DUM_ID,A0
CLR A1
NOT A1
CALLA KILALL
PUSH A8
MOVE *A9(MHEAD),A8,L
MOVI -01B000H,B0
MOVI 01B000H,B1
CALLA RANGRAND
MOVE A0,*A8(OXVEL),L
MOVI -012000H,B0
MOVI 012000H,B1
CALLA RANGRAND
MOVE A0,*A8(OYVEL),L
MOVI MUG1B,A1
MOVE @MCON,A4
JRZ NOBB
MOVI MUG1BZ,A1
NOBB
MOVE *A8(OFLAGS),A4,W ;NEW OFLAGS
CALLA ANI
MOVI 400,A0
MOVE A0,*A8(OZPOS)
PULL A8
MOVI 180,A9
KM1
MOVK 20,A0
CALLA CHKFREE
JRNE SPEWL0
CREATE 0,SPEW
CREATE 0,SPEW
CREATE 0,SPEW
CREATE 0,SPEW
CREATE 0,SPEW
MOVI BUBL,A0
CALLA ONESND
SPEWL0
SLEEP 1
DEC A9
JRNZ KM1
SLEEP 15H ;55
MOVI YAMOFF,A0
CALLA ONESND
;
;BLOW TANK PIECES OUT TO EDGES!
;
; MOVI CROWD1,A0
; CALLA ONESND
CALLA DOSHK0
SLEEP 10
CREATE 0,SHAKEME
CREATE 0,SMLEXP
SLEEP 3*60
CALLA DOSHK0
CREATE 0,BLOW1
CREATE 0,BLOW2
CREATE 0,BLOW3
CREATE 0,BLOW4
CREATE 0,BLOW5
SLEEP 60*1
CALLA DOSHK0
;WHEN DONE, WE WILL COVER OLD TANK AREA!
MOVE *A8(OYVAL),A0,L
MOVE @WORLDTLY,A4,L
SUB A4,A0
MOVE *A8(OXVAL),A1,L
MOVE @WORLDTLX,A4,L
SUB A4,A1
SRL 16,A1
MOVX A1,A0
MOVI [10H,10H],A1
SUBXY A1,A0
MOVE A0,@EXPTLXY,L
MOVI [060H,050H],A1
ADDXY A1,A0
MOVE A0,@EXPLRXY,L
MOVI 120H,A10
CALLA CLUSTER
SLEEP 60
CREATE 0,BAD0 ;SMART BOMB AND GET RID OF EVERYONE!
;KILL OFF ALL MUTOID OBJECTS
MOVI CLSNEUT|TYPNEUT|SUBCHNK,A0
CLR A1
NOT A1
CALLA KILOBJ
MOVI CLSENMY|TYPMUT,A0
MOVI F_TYPE,A1
CALLA KILOBJ
SLEEP 3*60
CLR A0
MOVB A0,@ENDON
MOVE @MCON,A0
JRZ PIPPEN
CALLA O_ITEMS2
SLEEP 5*60-30
CALLA O_ITEMS2
SLEEP 5*60-30
CALLA O_ITEMS2
SLEEP 5*60-30
CALLA O_ITEMS2
SLEEP 5*60-30
CALLA O_ITEMS2
SLEEP 5*60-30
CALLA O_ITEMS2
SLEEP 5*60-30
PIPPEN CREATE 0,DEXIT
SLEEP 360*60
DIE
SMLEXP MOVI 186H,A9
SM1 SLEEP 1
MOVK 20,A0
CALLA CHKFREE
JRNE DONOT
CREATE 0,SMLE
MOVI EXP3HI,A0
CALLA ONESND
DONOT
DSJ A9,SM1
DIE
SMLE
CALLR SETKBM
MOVE *A0(OFLAGS),A4,W ;SAME FLAGS AS BEFORE
ADDI 0020000H,A3
ADDI 03A0000H,A2
CALLA GANISAG
MOVE A9,A8
MOVI -060000H,B0
MOVI 060000H,B1
CALLA RANGRAND
MOVE A0,*A8(OXVEL),L
MOVI -060000H,B0
MOVI 060000H,B1
CALLA RANGRAND
MOVE A0,*A8(OYVEL),L
MOVI BOOMN,A9
MOVK 1,A1
JSRP FRANIM
MOVE A8,A0
CALLA DELOBJ
DIE
SETKBM
MOVI KBM,A14 ;BLOOD
CALLA GPALOBJ ;ALLOCATE A COLOR PALETTE
CALLA STFOBJ ;STUFF OBJECT DATA
MOVE A13,*A0(OPLINK),L
CALLA INSOBJ ;INSERT OBJECT INTO LIST
MOVE A0,A8
MOVE *A8(OPAL),A0,L
ANDI 0FFFFH,A0
MOVE A0,*A8(OPAL),L
MOVE A8,A9
MOVE @MUTPTR,A8,L