-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDOINK.ASM
executable file
·4072 lines (3266 loc) · 81.6 KB
/
DOINK.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
**************************************************************
*
* Software: Jamie Rivett
* Initiated: 9/3/93
*
* COPYRIGHT (C) 1992 WILLIAMS ELECTRONICS GAMES, INC.
*
**************************************************************
.file "doink.asm"
.title "doink specific game code"
.width 132
.option b,d,l,t
.mnolist
.include "macros.h"
.include "jjxm.h"
.include "mproc.equ" ;Mproc equates
.include "display.equ" ;Display proc equates
.include "gsp.equ" ;Gsp asm equates
.include "sys.equ"
.include "game.equ"
.include "plyr.equ"
.include "anim.equ"
.include "audit.equ"
.include "sound.h"
.include "ring.equ"
.include "lifebar.h"
.include "damage.equ"
;temp! - 314
.include "tmpdebug.h"
******************************************************************************
* EXTERNAL REFERENCES
.ref BLOCK_WOOSH,get_opp_process,calc_line_x,can_pin
.ref PSTATUS,is_final_match,FINAL_PTR
.ref DO_REVERSAL,DO_REVERSAL_MESS,FIND_AND_KILL_ENDLESS
.ref ADD_IF_SILENT,JUMP_ROPES,CLIMB_ROPES
.ref get_powerk_dtime
.ref set_getup_time,set_raisearm_bit
.ref get_punch_dtime
.ref get_rope_x,ck_teammate_pin,raisearm_check
.ref inc_getup_time
.ref change_anim1,change_anim1a
.ref change_anim2,change_anim2a
.ref process_ptrs
.ref keep_attached
.ref get_opp_plyrmode
.ref wres_collis_off
.ref convert_facing
.ref check_secret_moves
.ref change_walk_anim
.ref set_rotate_anim
.ref execute_walk
.ref bounce_off_ropes
.ref climb_turnbuckle
.ref ADD_VOICE,round_award
.ref HALT,clear_combo_meter
.ref mode_choking
.ref master_keep_attached
.ref PCNT,init_reduce_bog
.ref RNDPER,is_8_on_1
.ref current_round,change_wrestler
.ref p1rounds,p2rounds,hitonground_tbl,arw_bwait
;from DCSSOUND.ASM
.ref triple_sound
;from WRESTLE.ASM
.ref drone_change_back
.ref read_switches
.ref BONUS_MESS
.ref blocking_off
.ref hyper_speed_on
.ref in_finish_move,royal_rumble
.ref p1rounds,p2rounds
.if NUM_DOINK_FINISHES
.ref dnk_finish1_move
.if NUM_DOINK_FINISHES > 1
.ref dnk_finish2_move
.endif
.endif
.ref in_finish_move,finish_completed
;animation sequence
.ref dnk_3_pile_driver_anim
.ref start_run_anim
.ref dnk_4_earslap_anim
.ref dnk_2_earslap_anim
.ref dnk_4_slap_anim
.ref dnk_2_slap_anim
; .ref dnk_4_slap2_anim
; .ref dnk_2_slap2_anim
.ref dnk_head_hit_dizzy_anim
.ref dnk_knockdwn_anim
.ref dnk_4_hammer_anim
.ref wres_slave_anim
.ref dnk_zip_anim
.ref dnk_2_raise_arm_anim,dnk_4_raise_arm_anim
.ref dnk_stand2_anim,dnk_stand8_anim
.ref dnk_stand4_anim,dnk_stand6_anim
.ref dnk_torso2_anim,dnk_torso8_anim
.ref dnk_torso4_anim,dnk_torso6_anim
.ref dnk_2_to_4_turn_anim,dnk_8_to_6_turn_anim ;stand
.ref dnk_4_to_2_turn_anim,dnk_6_to_8_turn_anim
.ref dnk_4_to_6_turn_anim,dnk_6_to_4_turn_anim
.ref dnk_2_to_8_turn_anim,dnk_8_to_2_turn_anim
.ref dnk_4_to_8_turn_anim,dnk_6_to_2_turn_anim
.ref dnk_2_to_6_turn_anim,dnk_8_to_4_turn_anim
.ref dnk_2_to_4_turn2_anim,dnk_8_to_6_turn2_anim ;torso
.ref dnk_4_to_2_turn2_anim,dnk_6_to_8_turn2_anim
.ref dnk_4_to_6_turn2_anim,dnk_6_to_4_turn2_anim
.ref dnk_2_to_8_turn2_anim,dnk_8_to_2_turn2_anim
.ref dnk_4_to_8_turn2_anim,dnk_6_to_2_turn2_anim
.ref dnk_2_to_6_turn2_anim,dnk_8_to_4_turn2_anim
.ref dnk_walk1_f2_anim,dnk_walk2_f2_anim,dnk_walk4_f2_anim
.ref dnk_walk5_f2_anim,dnk_walk6_f2_anim,dnk_walk8_f2_anim
.ref dnk_walk1_f4_anim,dnk_walk2_f4_anim,dnk_walk4_f4_anim
.ref dnk_walk5_f4_anim,dnk_walk6_f4_anim,dnk_walk8_f4_anim
.ref dnk_2_punch_anim,dnk_4_punch_anim
.ref dnk_2_buzz_anim,dnk_4_buzz_anim
.ref dnk_2_buzz2_anim,dnk_4_buzz2_anim
.ref dnk_2_butt_anim,dnk_4_butt_anim
.REF dnk_combo_uppercut_to_head_anim
.ref dnk_4_combo_kick_anim
.REF CHECK_COMBO_GO
.ref dnk_2_kick_anim,dnk_4_kick_anim
.ref dnk_2_spin_kick_anim,dnk_4_spin_kick_anim
.ref dnk_2_knee_anim,dnk_4_knee_anim
.ref dnk_2_box_anim,dnk_4_box_anim
.ref dnk_run_anim,dnk_run2_anim
.ref dnk_4_blbowdrop_anim
.ref dnk_2_hair_pickup_anim,dnk_4_hair_pickup_anim
.ref dnk_2_lbowdrop_anim,dnk_4_lbowdrop_anim
.ref dnk_2_grabfling_anim
.ref dnk_4_grabfling_anim
.ref dnk_heldoh_anim
.ref dnk_diveofftb_anim
.ref dnk_fly_cline_anim
.ref dnk_flying_kick_anim
.ref dnk_4_head_hit_anim,dnk_head_hit3_anim
.ref dnk_2_head_hit_anim,dnk_head_hit2_anim
.ref dnk_fall_back_anim
.ref dnk_4_losebal_dizzy_anim
.ref dnk_hitonground_anim
.ref dnk_4_stomp_anim,dnk_2_stomp_anim
.ref dnk_4_bstomp_anim
.ref dnk_climb_up_anim,dnk_climb_down_anim
.ref dnk_4_block_anim
.ref dnk_2_hiptoss_anim,dnk_4_hiptoss_anim
.ref dnk_2_hiptoss2_anim,dnk_4_hiptoss2_anim
.ref dnk_4_push_anim
.ref dnk_4_bigboot_anim,dnk_2_bigboot_anim
.ref dnk_4_losebal_anim
.ref dnk_dizzy_anim
.ref dnk_2_pin_anim
.ref dnk_4_pin_anim
.ref dnk_belly_anim
.ref ck_ignore ;Ignore button press?
; .ref dnk_pkup_chair_anim
.ref dnk_3_knee_to_head_anim
.ref dnk_3_knees_to_head_anim
.ref dnk_uppercut_to_head_anim
.ref dnk_uppercuts_to_head_anim
.ref dnk_get_buzz_anim
.ref dnk_3_head_hold2_anim
.ref dnk_3_head_hold_anim
.ref dnk_2_butts_anim,dnk_4_butts_anim
.ref dnk_3_head_held_stand_anim
.ref dnk_3_head_slam_anim
.ref dnk_4_knee_fall_anim
******************************************************************************
* SYMBOLS DEFINED IN THIS FILE
******************************************************************************
* EQUATES FOR THIS FILE
#*****************************************************************************
doink_secret_moves
;These secret moves are triggered only after a move list seq has ended! You
;can't hold on the last button press and have it trigger!
;Button held down moves need to be first entry
.long #charge_buzz
.long #grab_fling
.long #hip_toss
.long #grab_fling2
.long #hip_toss2
.long #earslap
.long #hammer
.long #neck_grab
.long #boxing_pnch
; .long #charge_flying_kick
.long 0
******************************************************************************
*
* SPECIAL MOVE PROCESSES - Secret moves
*
;a8=process of wrestler
SUBR dnk_smove_table
.long dnk_charge_flykick
.long dnk_hdhold_slam
.long dnk_hdhold_combo1
.long dnk_hdhold_pile
.long dnk_hdhold_combo2
.long dnk_hdhold_buzz
; .long dnk_hdhold_anti_combo
.long dnk_grab_toss_air
.long std_walk_fast
.long std_taunt
.if NUM_DOINK_FINISHES
.long dnk_finish_move1
.endif
.if NUM_DOINK_FINISHES > 1
.long dnk_finish_move2
.endif
.long 0
*******************************************************************************
#charge_buzz
move *a13(BUT_VAL_UP),a0
btst PLAYER_PUNCH_BIT,a0
jrz #no_punch
;FIX!! Give some jumping velocity
; move *a13(PLYRMODE),a0
; cmpi MODE_ONTURNBKL,a0
; jrz #no_punch
move *a13(PLYRNUM),a0
calla get_punch_dtime
cmpi 100,a0 ;> min?
jrlt #no_punch
callr #scrt_buzz
setc
rets
#no_punch
clrc
rets
#scrt_buzz
move *a13(PLYRMODE),a0
cmpi MODE_HEADHELD,a0
jrz #out
cmpi MODE_HEADHOLD,a0
jrz #out
move *a13(ANIMODE),a0
btst MODE_UNINT_BIT,a0
jrnz #out
;Don't do it when he is on ground
calla get_opp_plyrmode
; cmpi MODE_ONGROUND,a0
; jrz #out
cmpi MODE_DEAD,a0
jrz #out
move *a13(PLYRMODE),a0
cmpi MODE_RUNNING,a0
jrz #leapbuzz
;If stick is toward opponent, then do sliding/leaping buzzer
move *a13(STICK_VAL_CUR),a0
move *a13(NEW_FACING_DIR),a1
andi 0ch,a1
cmp a0,a1
jrnz #norm
#leapbuzz
;missing noise for a reason !
WRSND W_DOINK,HDBUTT_T1
FACE24 dnk,buzz2_anim
calla change_anim1a
rets
#norm
;missing noise for a reason !
WRSND W_DOINK,HDBUTT_T1
FACE24 dnk,buzz_anim
calla change_anim1a
rets
*******************************************************************************
; BITS MASK
#boxing_pnch
.word B_PUNCH, J_ALL
.word B_PUNCH, J_ALL
.word B_PUNCH, J_ALL
.word B_PUNCH, J_ALL
.word B_PUNCH, J_ALL
.word B_PUNCH, J_ALL
.word B_PUNCH, J_ALL
.word 8000h | 60 ;max
.long scrt_glove
scrt_glove
move *a13(ANIMODE),a0
btst MODE_UNINT_BIT,a0
jrnz #out
;Don't do it when he is on ground
calla get_opp_plyrmode
cmpi MODE_ONGROUND,a0
jrz #out
cmpi MODE_DEAD,a0
jrz #out
cmpi MODE_HEADHELD,a0
jrz #out
MOVE *A13(COMBO_COUNT),A0
JRNZ #out
FACE24 dnk,box_anim
calla change_anim1a
WRSND W_DOINK,SPUNCH_T1,SPUNCH_T2
rets
*******************************************************************************
#hammer
.word B_SKICK, J_ALL
.word J_TOWARD, J_REAL_LR
.word J_TOWARD, J_REAL_LR
.word 8000h | 32 ;max
.long scrt_hammer
scrt_hammer
move *a13(ANIMODE),a0
btst MODE_UNINT_BIT,a0
jrnz #out
move *a13(PLYRMODE),a0
cmpi MODE_ONTURNBKL,a0
jrz #out
movi dnk_4_hammer_anim,a0
calla change_anim1a
;missing noise for a reason !
WRSND W_DOINK,HDBUTT_T2
rets
*******************************************************************************
#earslap
.word B_PUNCH, J_ALL
.word J_TOWARD, J_REAL_LR
.word J_DOWN_TOWARD, J_REAL_LR
.word J_DOWN, J_REAL_LR
.word 8000h | 50 ;max
.long #scrt_earslap
#scrt_earslap
move *a13(ANIMODE),a0
btst MODE_UNINT_BIT,a0
jrnz #out
move *a13(PLYRMODE),a0
cmpi MODE_ONTURNBKL,a0
jrz #out
;Don't do it when he is dead or held
calla get_opp_plyrmode
; cmpi MODE_ONGROUND,a0
; jrz #out
cmpi MODE_DEAD,a0
jrz #out
cmpi MODE_HEADHELD,a0
jrz #out
movi dnk_4_earslap_anim,a0
calla change_anim1a
WRSND W_DOINK,FLYKICK_T1,FLYKICK_T2
rets
*******************************************************************************
#neck_grab
.word B_SPUNCH, J_ALL
.word J_TOWARD, J_REAL_LR
.word J_TOWARD, J_REAL_LR
.word 8000h | 32 ;max
.long #scrt_neck
#scrt_neck
move *a13(ANIMODE),a0
btst MODE_UNINT_BIT,a0
jrnz #out
;Don't do it when he is on ground
calla get_opp_plyrmode
cmpi MODE_ONGROUND,a0
jrz #out
cmpi MODE_DEAD,a0
jrz #out
cmpi MODE_HEADHELD,a0
jrz #out
move *a13(LAST_HEADHOLD),a14,L
move @PCNT,a0,L
sub a14,a0
cmpi 2*60,a0
jrge #ok2
;This head grab is too close (in terms of time) to most recent grab
.ref dnk_3_fake_hold_anim
movi dnk_3_fake_hold_anim,a0
calla change_anim1a
rets
#ok2
WRSND W_DOINK,GRABFLING_T1,PUNCH_T2
move *a13(CLOSEST_XDIST),a1
cmpi 90,a1
jrgt #std_grab
movi dnk_3_head_hold2_anim,a0
calla change_anim1a
rets
#std_grab
movi dnk_3_head_hold_anim,a0
calla change_anim1a
rets
*******************************************************************************
#grab_fling2
.word B_SPUNCH | J_AWAY, J_REAL_LR | J_UP | J_DOWN
.word 8000h | 10 ;max
.long #scrt_grabfling2
#hip_toss2
.word B_PUNCH | J_AWAY, J_REAL_LR | J_UP | J_DOWN
.word 8000h | 10 ;max
.long #scrt_grabfling2
#scrt_grabfling2
move *a13(ANIMODE),a0
btst MODE_UNINT_BIT,a0
jrnz #out
;If opponent is running, do a hip toss
calla get_opp_plyrmode
cmpi MODE_BOUNCING,a0
jrz #yes
cmpi MODE_RUNNING,a0
jrz #yes
cmpi MODE_HEADHELD,a0
jrz #ck2
rets
*******************************************************************************
#grab_fling
; .word B_SPUNCH | J_AWAY, J_REAL_LR | J_UP | J_DOWN
; .word 8000h | 10 ;max
; .long #scrt_grabfling
.word B_SPUNCH, J_ALL
.word J_AWAY, J_REAL_LR
.word J_AWAY, J_REAL_LR
.word 8000h | 32 ;max
.long #scrt_grabfling
#scrt_grabfling
;Make this miss, rotate to missed opponent,
;and stay rotated to flung opponent, also make
;this work from both angles!
move *a13(ANIMODE),a0
btst MODE_UNINT_BIT,a0
jrnz #out
;If opponent is running, do a hip toss
calla get_opp_plyrmode
cmpi MODE_BOUNCING,a0
jrz #yes
cmpi MODE_RUNNING,a0
jrnz #nope
#yes
FACE24 dnk,hiptoss_anim
calla change_anim1a
WRSND W_DOINK,HIPTOSS_T1,PUNCH_T2
rets
#nope
;Don't fling when he is on ground
calla get_opp_plyrmode
cmpi MODE_HEADHELD,a0
jrz #out
cmpi MODE_ONGROUND,a0
jrz #out
cmpi MODE_DEAD,a0
jrz #out
; move *a13(LAST_FLING_ATTEMPT),a14,L
; move @PCNT,a0,L
; sub a14,a0
; cmpi 3*60,a0
; jrge #ok2a
;
; FACE24 dnk,slap_anim
; calla change_anim1a
;
; WRSND W_DOINK,SPUNCH_T1,SPUNCH_T2
; rets
;
;#ok2a
; move @PCNT,a14,L ;use 32-bit PCNT!
; move a14,*a13(LAST_FLING_ATTEMPT),L
FACE24 dnk,grabfling_anim
calla change_anim1a
WRSND W_DOINK,GRABFLING_T1,PUNCH_T2
rets
*******************************************************************************
#hip_toss
; .word B_PUNCH | J_AWAY, J_REAL_LR | J_UP | J_DOWN
; .word 8000h | 10 ;max
; .long #scrt_hiptoss
.word B_PUNCH, J_ALL
.word J_AWAY, J_REAL_LR
.word J_AWAY, J_REAL_LR
.word 8000h | 32 ;max
.long #scrt_hiptoss
#scrt_hiptoss
move *a13(ANIMODE),a0
btst MODE_UNINT_BIT,a0
jrnz #out
;Don't do it when he is on ground
calla get_opp_plyrmode
cmpi MODE_ONGROUND,a0
jrz #out
; cmpi MODE_BLOCK,a0
; jrz #out
cmpi MODE_DEAD,a0
jrz #out
cmpi MODE_HEADHELD,a0
jrz #ck2
cmpi MODE_INAIR,a0
jrz #doit
cmpi MODE_INAIR2,a0
jrz #doit
move *a13(CLOSEST_DIST),a0
cmpi 70h,a0
jrgt #out
#doit
FACE24 dnk,hiptoss_anim
calla change_anim1a
WRSND W_DOINK,HIPTOSS_T1,PUNCH_T2
#out rets
#ck2
move *a13(USR_VAR2),a0
jrnz #doit
rets
.if NUM_DOINK_FINISHES
#******************************************************************************
SUBRP dnk_finish_move1
#TIMEOUT .equ TSEC
#end_wait
SLEEP TSEC/4
move @p1rounds,a0 ; Get player 1 rounds
move @p2rounds,a1 ; Get player 2 rounds
or a1,a0 ; Put em together
cmpi 2,a0 ; Anybody got 2?
jrlt #end_wait ; br = no
#reset
clr a11
move a11,@in_finish_move
SLEEPK 1
WAITSWITCH_DWN J_UP,0,#reset
movi #TIMEOUT,a11
move a11,@in_finish_move
WAITSWITCH_DWN J_DOWN,0,#reset
WAITSWITCH_DWN J_TOWARD,J_DOWN|J_UP,#reset
WAITSWITCH_DWN J_TOWARD,J_DOWN|J_UP,#reset
WAITSWITCH_DWN B_PUNCH,J_ALL,#reset
movi dnk_finish1_move,a0
move a0,*a8(SPECIAL_MOVE_ADDR),L
DIE
.endif
.if NUM_DOINK_FINISHES > 1
#******************************************************************************
SUBRP dnk_finish_move2
#TIMEOUT .equ TSEC
#end_wait
SLEEP TSEC/4
move @p1rounds,a0 ; Get player 1 rounds
move @p2rounds,a1 ; Get player 2 rounds
or a1,a0 ; Put em together
cmpi 2,a0 ; Anybody got 2?
jrlt #end_wait ; br = no
#reset
clr a11
move a11,@in_finish_move
SLEEPK 1
WAITSWITCH_DWN J_UP,0,#reset
movi #TIMEOUT,a11
move a11,@in_finish_move
WAITSWITCH_DWN J_UP,0,#reset
WAITSWITCH_DWN J_RIGHT,J_UP,#reset
WAITSWITCH_DWN J_RIGHT,J_UP,#reset
WAITSWITCH_DWN B_SPUNCH,J_ALL,#reset
movi dnk_finish2_move,a0
move a0,*a8(SPECIAL_MOVE_ADDR),L
DIE
.endif
#*******************************************************************************
dnk_hdhold_slam
#TIMEOUT .equ 60
#lp0
SLEEPK 1
#lp
move *a8(PLYRMODE),a0
cmpi MODE_HEADHOLD,a0
jrz #cont
cmpi MODE_HEADHELD,a0
jrnz #lp0
#cont
clr a11
; WAITSWITCH_DWN J_UP,0,#lp
WAITSWITCH_DWN J_DOWN,0,#lp
movi #TIMEOUT,a11
WAITSWITCH_DWN J_DOWN,0,#lp
WAITSWITCH_DWN B_SKICK,J_ALL,#lp
#contz
move *a8(PLYRMODE),a0
cmpi MODE_HEADHOLD,a0
jrz #slam
cmpi MODE_HEADHELD,a0
jrnz #lp0
move *a8(I_WILL_DIE),A14
jrnz #lp0
;Do reversal unless I have been immobilized!
;If not, set immobilize time for opponent and reverse
move *a8(IMMOBILIZE_TIME),a14
jrnz #lp0 ;ignore
CALLA DO_REVERSAL
CALLA DO_REVERSAL_MESS
;target WHOHITME -- don't hit anyone else
SMRTTGT a8,WHOHITME
;immobilize WHOHITME
move *a8(WHOHITME),a0,L
jruc #is_reversal
#slam
move *a8(IMMOBILIZE_TIME),a14
jrnz #lp0 ;ignore
movk 1,a10
CREATE MESSAGE_PID,BONUS_MESS
;target WHOIHIT -- don't hit anyone else
SMRTTGT a8,WHOIHIT
;immobilize WHOIHIT
move *a8(WHOIHIT),a0,L
#is_reversal
movk 15,a14
move a14,*a0(IMMOBILIZE_TIME)
CALLA FIND_AND_KILL_ENDLESS
WRSND W_DOINK,FLYKICK_T1,FLYKICK_T2
movi dnk_3_head_slam_anim,a14
move a14,*a8(SPECIAL_MOVE_ADDR),L
SLEEPK 20
jruc #lp
#*****************************************************************************
dnk_hdhold_pile
#TIMEOUT .equ 60
#lp0
SLEEPK 1
#lp
move *a8(PLYRMODE),a0
cmpi MODE_HEADHOLD,a0
jrz #cont
cmpi MODE_HEADHELD,a0
jrnz #lp0
#cont
clr a11
; WAITSWITCH_DWN J_AWAY,0,#lp
WAITSWITCH_DWN J_TOWARD,0,#lp
movi #TIMEOUT,a11
WAITSWITCH_DWN J_TOWARD,0,#lp
WAITSWITCH_DWN B_SPUNCH,J_ALL,#lp
#contz
move *a8(PLYRMODE),a0
cmpi MODE_HEADHOLD,a0
jrz #slam
cmpi MODE_HEADHELD,a0
jrnz #lp0
move *a8(I_WILL_DIE),A14
jrnz #lp0
move *a8(IMMOBILIZE_TIME),a14
jrnz #lp0 ;ignore
CALLA DO_REVERSAL
CALLA DO_REVERSAL_MESS
;target WHOHITME -- don't hit anyone else
SMRTTGT a8,WHOHITME
;immobilize WHOHITME
move *a8(WHOHITME),a0,L
jruc #is_reversal
#slam
move *a8(IMMOBILIZE_TIME),a14
jrnz #lp0 ;ignore
movk 7,A10 ;Pile driver
CREATE MESSAGE_PID,BONUS_MESS
;target WHOIHIT -- don't hit anyone else
SMRTTGT a8,WHOIHIT
;immobilize WHOIHIT
move *a8(WHOIHIT),a0,L
#is_reversal
movk 15,a14
move a14,*a0(IMMOBILIZE_TIME)
CALLA FIND_AND_KILL_ENDLESS
WRSND W_DOINK,FLYKICK_T1,FLYKICK_T2
movi dnk_3_pile_driver_anim,a14
move a14,*a8(SPECIAL_MOVE_ADDR),L
SLEEPK 20
jruc #lp
;#******************************************************************************
;
;;Could start this process only when opponent is in combo mode!
;
;dnk_hdhold_anti_combo
;
;#TIMEOUT .equ 30
;
;#lp0
; SLEEPK 1
;#lp
;;Is my opponent in combo mode?
;; move *a8(IMMOBILIZE_TIME),a14
;; jrz #lp0
;; move *a8(CLOSEST_NUM),a0
;; X32 a0
;; addi process_ptrs,a0
;; move *a0,a0,L
;; move *a0(COMBO_COUNT),a0
;; jrz #lp0
;
; clr a11
;
; WAITSWITCH_DWN B_SPUNCH,J_ALL,#lp
;
; movk #TIMEOUT,a11
;
; WAITSWITCH_DWN B_SPUNCH,J_ALL,#lp
; WAITSWITCH_DWN B_SPUNCH,J_ALL,#lp
;
;;Is my opponent in combo mode?
; move *a8(CLOSEST_NUM),a0
; X32 a0
; addi process_ptrs,a0
; move *a0,a0,L
; move *a0(COMBO_COUNT),a0
; jrz #lp0
;
; move *a8(ANTI_COMBO_TIME),a0 ;Time stamp
; move @PCNT,a14
; sub a0,a14
; abs a14
; cmpi 80,a14
; jrge #lp0
; move *a8(I_WILL_DIE),A14
; jrnz #lp0
;
;;Combo breaker message!
; CALLA DO_REVERSAL
; CALLA DO_REVERSAL_MESS
;
; clr a0
; move a0,*a8(IMMOBILIZE_TIME)
;
; move *a8(WHOHITME),a14,L
; movk 15,a0
; move a0,*a14(IMMOBILIZE_TIME)
;
; ;target WHOHITME
; SMRTTGT a8,WHOHITME
;
; CALLA FIND_AND_KILL_ENDLESS
;
; WRSND W_DOINK,FLYKICK_T1,FLYKICK_T2
; movi dnk_3_pile_driver_anim,a14
; move a14,*a8(SPECIAL_MOVE_ADDR),L
;
; SLEEPK 20
;
; jruc #lp
;
*******************************************************************************
#*
dnk_hdhold_combo1
#TIMEOUT .equ 60
#lp0
SLEEPK 1
#lp
move *a8(PLYRMODE),a0
cmpi MODE_HEADHOLD,a0
jrnz #lp0
; cmpi MODE_HEADHELD,a0
; jrnz #lp0
;#cont
;In combo mode?
calla CHECK_COMBO_GO
jrlt #lp0
clr a11
WAITSWITCH_DWN J_TOWARD,0,#lp
movi #TIMEOUT,a11
WAITSWITCH_DWN J_TOWARD,0,#lp
WAITSWITCH_DWN B_SPUNCH,J_ALL,#lp
move *a8(PLYRMODE),a0
cmpi MODE_HEADHOLD,a0
jrz #slam
cmpi MODE_HEADHELD,a0
jrnz #lp0
#slam
move *a8(IMMOBILIZE_TIME),a14
jrnz #lp0 ;ignore
;Start combo rules here
; move *a8(ATTACH_PROC),a14,L
; movk 15,a0
; move a0,*a14(IMMOBILIZE_TIME)
;target WHOIHIT
SMRTTGT a8,WHOIHIT
CALLA FIND_AND_KILL_ENDLESS
movi dnk_combo_uppercut_to_head_anim,a14
move a14,*a8(SPECIAL_MOVE_ADDR),L
SLEEPK 20
jruc #lp
*******************************************************************************
#*
dnk_hdhold_combo2
#TIMEOUT .equ 60
#lp0
SLEEPK 1
#lp
move *a8(PLYRMODE),a0
cmpi MODE_HEADHOLD,a0
jrnz #lp0
; jrz #cont
; cmpi MODE_HEADHELD,a0
; jrnz #lp0
;#cont
;In combo mode?
calla CHECK_COMBO_GO
jrlt #lp0
clr a11
WAITSWITCH_DWN J_TOWARD,0,#lp
movi #TIMEOUT,a11
WAITSWITCH_DWN J_TOWARD,0,#lp
WAITSWITCH_DWN B_SKICK,J_ALL,#lp
move *a8(PLYRMODE),a0
cmpi MODE_HEADHOLD,a0
jrz #slam
cmpi MODE_HEADHELD,a0
jrnz #lp0
#slam
move *a8(IMMOBILIZE_TIME),a14