-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathBRET.ASM
executable file
·3010 lines (2379 loc) · 60.5 KB
/
BRET.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: 8/24/94
*
* COPYRIGHT (C) 1992 WILLIAMS ELECTRONICS GAMES, INC.
*
**************************************************************
.file "bret.asm"
.title "Bret Hart 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"
******************************************************************************
* EXTERNAL REFERENCES
.ref ADD_IF_SILENT,bounce_off_ropes,change_anim1,change_anim1a
.ref change_anim2a,check_secret_moves
.ref CLIMB_ROPES,climb_turnbuckle,do_taunt,execute_walk
.ref get_opp_plyrmode,JUMP_ROPES,PCNT,mode_dead,get_opp_process
.ref keep_attached,master_keep_attached,mode_choking
.ref mode_inair2,process_ptrs,ck_ignore,mode_puppet
.ref DO_REVERSAL,DO_REVERSAL_MESS,can_pin
.ref FIND_AND_KILL_ENDLESS,ck_teammate_pin,raisearm_check
.ref CHECK_COMBO_GO,drone_change_back,set_raisearm_bit
.ref hrt_combo_punch_anim,hrt_combo_kick_anim
.ref BLOCK_WOOSH,get_powerp_dtime,round_award
.ref blocking_off,std_taunt,std_walk_fast
.ref hyper_speed_on
.ref in_finish_move
.ref p1rounds,p2rounds
.if NUM_BRET_FINISHES
.ref hrt_finish1_move
.if NUM_BRET_FINISHES > 1
.ref hrt_finish2_move
.endif
.endif
******************************************************************************
* ANIMATION SEQUENCES
.ref hrt_3_face_driver2_anim
.ref wres_slave_anim,hrt_zip_anim,start_run_anim
.ref hrt_4_block_anim
.ref hrt_stand2_anim,hrt_stand8_anim
.ref hrt_stand4_anim,hrt_stand6_anim
.ref hrt_torso2_anim,hrt_torso8_anim
.ref hrt_torso4_anim,hrt_torso6_anim
.ref hrt_2_to_4_turn_anim,hrt_8_to_6_turn_anim ;stand
.ref hrt_4_to_2_turn_anim,hrt_6_to_8_turn_anim
.ref hrt_4_to_6_turn_anim,hrt_6_to_4_turn_anim
.ref hrt_2_to_8_turn_anim,hrt_8_to_2_turn_anim
.ref hrt_4_to_8_turn_anim,hrt_6_to_2_turn_anim
.ref hrt_2_to_6_turn_anim,hrt_8_to_4_turn_anim
.ref hrt_2_to_4_turn2_anim,hrt_8_to_6_turn2_anim ;torso
.ref hrt_4_to_2_turn2_anim,hrt_6_to_8_turn2_anim
.ref hrt_4_to_6_turn2_anim,hrt_6_to_4_turn2_anim
.ref hrt_2_to_8_turn2_anim,hrt_8_to_2_turn2_anim
.ref hrt_4_to_8_turn2_anim,hrt_6_to_2_turn2_anim
.ref hrt_2_to_6_turn2_anim,hrt_8_to_4_turn2_anim
.ref hrt_walk1_f2_anim,hrt_walk2_f2_anim,hrt_walk4_f2_anim
.ref hrt_walk5_f2_anim,hrt_walk6_f2_anim,hrt_walk8_f2_anim
.ref hrt_walk1_f4_anim,hrt_walk2_f4_anim,hrt_walk4_f4_anim
.ref hrt_walk5_f4_anim,hrt_walk6_f4_anim,hrt_walk8_f4_anim
.ref hrt_run2_anim,hrt_flying_kick_anim
.ref hrt_2_punch_anim,hrt_4_punch_anim
.ref hrt_2_kick_anim,hrt_4_kick_anim
.ref hrt_hitonground_anim,hrt_hitonground_facedown_anim
.ref hrt_2_butt_anim,hrt_4_butt_anim
.ref hrt_2_knee_anim,hrt_4_knee_anim
; .ref hrt_2_bigboot_anim,hrt_4_bigboot_anim
.ref hrt_2_stomp_anim,hrt_4_stomp_anim
.ref hrt_4_jump_kick_anim
.ref hrt_4_push_anim
.ref hrt_4_grabfling_anim,hrt_hiptoss_anim,hrt_hiptoss2_anim
.ref hrt_2_grabfling_anim
.ref hrt_faceup_getup_anim,hrt_facedown_getup_anim
.ref hrt_heldoh_anim
.ref hrt_pogo_anim
.ref hrt_2_ground_punch_anim,hrt_4_ground_punch_anim
.ref hrt_running_ground_punch_anim
.ref hrt_climb_down_anim,hrt_tbukl_leap_anim
.ref hrt_climb_up_anim,hrt_hh_2_ddt_anim
.ref hrt_running_ddt_anim
.ref hrt_2_hair_pickup_anim,hrt_2_pin_anim
.ref hrt_3_head_held_stand_anim
.ref hrt_4_hair_pickup_anim
.ref hrt_3_head_hold2_anim,hrt_4_knee_fall_anim
.ref hrt_3_head_hold_anim
.ref hrt_4_pin_anim,hrt_fall_back_anim
.ref hrt_4_uppercut_anim
.ref hrt_2_raise_arm_anim,hrt_4_raise_arm_anim
.ref hrt_2_super_punch2_anim
.ref hrt_4_super_punch2_anim
.ref hrt_4_super_punch_anim
.ref hrt_2_super_kick_anim,hrt_4_super_kick_anim
.ref hrt_3_pile_driver_anim,hrt_rake_face_anim
.ref hrt_knees_to_head_anim,hrt_uppercuts_to_head_anim
.ref hrt_roll_uppercut_anim,hrt_4_knee_to_head_anim
.ref hrt_2_shooter_anim,hrt_4_shooter_anim
; .ref hrt_pkup_chair_anim
.ref hrt_2_butts_anim,hrt_4_butts_anim
.ref DAM_MULT,BONUS_MESS
******************************************************************************
* SYMBOLS DEFINED IN THIS FILE
******************************************************************************
* EQUATES FOR THIS FILE
#*****************************************************************************
bret_secret_moves
.long #charge_ddt
.long #neck_grab
.long #grab_fling
.long #hip_toss
.long #grab_fling2
.long #hip_toss2
.long #face_rake
.long #jump_kick
.long #supercut
.long 0
******************************************************************************
*
* SPECIAL MOVE PROCESSES - Secret moves
*
;a8=process of wrestler
SUBR hrt_smove_table
.long hrt_charge_flying_kick
.long hrt_charge_face_rake
.long hrt_hdhold_pile
.long hrt_hdhold_ddt
.long hrt_hdhold_faceslam
.long hrt_grab_toss_air
.long hrt_roll_uppercut
.long hrt_hdhold_combo1
.long hrt_hdhold_combo2
; .long hrt_hdhold_anti_combo
.long std_walk_fast
.long std_taunt
.if NUM_BRET_FINISHES
.long hrt_finish_move1
.endif
.if NUM_BRET_FINISHES > 1
.long hrt_finish_move2
.endif
.long 0
*******************************************************************************
#supercut
.word B_PUNCH, J_ALL
.word J_DOWN, J_REAL_LR
.word J_DOWN, J_REAL_LR
.word 8000h | 16 ;max
.long #scrt_cut
#scrt_cut
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
cmpi MODE_ATTACHED,a0
jrz #out
movi hrt_4_super_punch_anim,a0
calla change_anim1a
WRSND W_BRET,PUNCH_T1,PUNCH_T2
rets
*******************************************************************************
#jump_kick
.word B_SKICK, J_ALL
.word J_AWAY, J_REAL_LR | J_UP | J_DOWN
.word J_AWAY, J_REAL_LR | J_UP | J_DOWN
.word 8000h | 32 ;max
.long #scrt_flykick
#scrt_flykick
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
cmpi MODE_ATTACHED,a0
jrz #out
movi hrt_4_jump_kick_anim,a0
calla change_anim1a
WRSND W_BRET,FLYKICK_T1,FLYKICK_T2
rets
*******************************************************************************
#charge_ddt
move *a13(BUT_VAL_UP),a0
btst PLAYER_SPUNCH_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_powerp_dtime
cmpi 100,a0 ;> min?
jrlt #no_punch
callr #scrt_ddt
setc
rets
#no_punch
clrc
rets
#scrt_ddt
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 #leapddt
;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
#leapddt
;missing noise for a reason !
WRSND W_BRET,FLYKICK_T1,FLYKICK_T2
movi hrt_running_ddt_anim,a0
calla change_anim1a
rets
#norm
;missing noise for a reason !
WRSND W_BRET,FLYKICK_T1,FLYKICK_T2
movi hrt_hh_2_ddt_anim,a0
calla change_anim1a
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 hrt_3_fake_hold_anim
movi hrt_3_fake_hold_anim,a0
calla change_anim1a
rets
#ok2
move *a13(CLOSEST_XDIST),a1
cmpi 90,a1
jrgt #std_grab
movi hrt_3_head_hold2_anim,a0
calla change_anim1a
#out rets
#std_grab
movi hrt_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
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
movi hrt_hiptoss_anim,a0
calla change_anim1a
WRSND W_BRET,GRABFLING_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 hrt,super_punch2_anim
; calla change_anim1a
;
; WRSND W_BRET,SPUNCH_T1,SPUNCH_T2
; rets
;
;#ok2a
; move @PCNT,a14,L ;use 32-bit PCNT!
; move a14,*a13(LAST_FLING_ATTEMPT),L
FACE24 hrt,grabfling_anim
calla change_anim1a
WRSND W_BRET,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_DEAD,a0
jrz #out
cmpi MODE_HEADHELD,a0
jrz #out
cmpi MODE_INAIR,a0
jrz #doit
cmpi MODE_INAIR2,a0
jrz #doit
move *a13(CLOSEST_DIST),a0
cmpi 70h,a0
jrgt #out
#doit
movi hrt_hiptoss_anim,a0
calla change_anim1a
WRSND W_BRET,HIPTOSS_T1,PUNCH_T2
rets
*******************************************************************************
#face_rake
.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 | 30 ;max
.long #scrt_facerake
#scrt_facerake
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 on ground
calla get_opp_plyrmode
cmpi MODE_ONGROUND,a0
jrz #out
cmpi MODE_DEAD,a0
jrz #out
cmpi MODE_HEADHELD,a0
jrz #out
WRSND W_BRET,UPRCUT_T1,UPRCUT_T2
movi hrt_rake_face_anim,a0
calla change_anim1a
rets
#*******************************************************************************
; STRUCTPD
; WORD #CHARGE_TIME ;UDW
#CHARGE_TIME .equ SM_USRW1 ;
hrt_charge_flying_kick
#start_over
clr a14
move a14,*a13(#CHARGE_TIME),W
#loop1
SLEEPK 1
move *a13(#CHARGE_TIME),a14,W
inc a14
move a14,*a13(#CHARGE_TIME),W
move *a8(BUT_VAL_CUR),a0
btst PLAYER_SKICK_BIT,a0
jrz #p1
jruc #loop1
#p1
;no longer holding button
move *a13(#CHARGE_TIME),a14
cmpi 100,a14
jrlt #start_over
move *a8(GETUP_TIME),a0
jrnz #start_over
move *a8(PLYRMODE),a0
cmpi MODE_HEADHELD,a0
jrz #start_over
cmpi MODE_HEADHOLD,a0
jrz #start_over
cmpi MODE_ONGROUND,a0
jrz #start_over
cmpi MODE_DEAD,a0
jrz #start_over
move *a8(CLOSEST_NUM),a0
X32 a0
addi process_ptrs,a0
move *a0,a0,L
move *a0(PLYRMODE),a0
cmpi MODE_ONGROUND,a0
jrz #start_over
cmpi MODE_DEAD,a0
jrz #start_over
;Success! Check for the UNINT bit, then queue it up.
move *a8(ANIMODE),a14
btst MODE_UNINT_BIT,a14
jrnz #start_over
.ref ck_ignore_a8
calla ck_ignore_a8
jrc #start_over
movi hrt_flying_kick_anim,a14
move a14,*a8(SPECIAL_MOVE_ADDR),L
WRSND W_BRET,FLYKICK_T1,FLYKICK_T2
SETMODE INAIR
jruc #start_over
#*******************************************************************************
; STRUCTPD
; WORD #CHARGE_TIME ;UDW
#CHARGE_TIME .equ SM_USRW1 ;
hrt_charge_face_rake
#start_over
clr a14
move a14,*a13(#CHARGE_TIME),W
#loop1
SLEEPK 1
move *a13(#CHARGE_TIME),a14,W
inc a14
move a14,*a13(#CHARGE_TIME),W
move *a8(BUT_VAL_CUR),a0
btst PLAYER_PUNCH_BIT,a0
jrz #p1
jruc #loop1
#p1
;no longer holding button
move *a13(#CHARGE_TIME),a14
cmpi 100,a14
jrlt #start_over
move *a8(GETUP_TIME),a0
jrnz #start_over
move *a8(PLYRMODE),a0
cmpi MODE_HEADHELD,a0
jrz #start_over
cmpi MODE_HEADHOLD,a0
jrz #start_over
cmpi MODE_ONGROUND,a0
jrz #start_over
cmpi MODE_DEAD,a0
jrz #start_over
;Success! Check for the UNINT bit, then queue it up.
move *a8(ANIMODE),a14
btst MODE_UNINT_BIT,a14
jrnz #start_over
movi hrt_rake_face_anim,a14
move a14,*a8(SPECIAL_MOVE_ADDR),L
WRSND W_BRET,UPRCUT_T1,UPRCUT_T2
jruc #start_over
.if NUM_BRET_FINISHES
#******************************************************************************
SUBRP hrt_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 hrt_finish1_move,a0
move a0,*a8(SPECIAL_MOVE_ADDR),L
DIE
.endif
.if NUM_BRET_FINISHES > 1
#******************************************************************************
SUBRP hrt_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 hrt_finish2_move,a0
move a0,*a8(SPECIAL_MOVE_ADDR),L
DIE
.endif
#******************************************************************************
SUBRP hrt_roll_uppercut
#TIMEOUT .equ TSEC
#reset
SLEEPK 1
clr a11
WAITSWITCH_DWN J_DOWN, 0, #reset
movi #TIMEOUT,a11
;this should make it nice and lenient...
WAITSWITCH_DWN J_TOWARD,J_UP|J_DOWN,#reset
WAITSWITCH_DWN B_SPUNCH,J_ALL, #reset
move *a8(ANIMODE),a0
btst MODE_UNINT_BIT,a0
jrnz #reset
move *a8(IMMOBILIZE_TIME),a14
jrnz #reset ;ignore
move *a8(PLYRMODE),a0
cmpi MODE_ONTURNBKL,a0
jreq #reset
cmpi MODE_HEADHOLD,a0
jreq #reset
cmpi MODE_HEADHELD,a0
jreq #reset
WRSND W_BRET,GRABFLING_T1,GRABFLING_T2
movi hrt_roll_uppercut_anim,a0
move a0,*a8(SPECIAL_MOVE_ADDR),L
clr a0
move a0,*a8(RUN_TIME)
; SETMODE NORMAL
jruc #reset
*******************************************************************************
#*
hrt_hdhold_combo1
#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_PUNCH,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 hrt_combo_punch_anim,a14
move a14,*a8(SPECIAL_MOVE_ADDR),L
SLEEPK 20
jruc #lp
*******************************************************************************
#*
hrt_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_DOWN_TOWARD|J_UP_TOWARD,#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 hrt_combo_kick_anim,a14
move a14,*a8(SPECIAL_MOVE_ADDR),L
SLEEPK 20
jruc #lp
#*****************************************************************************
hrt_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
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
movi 35,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_BRET,GRABFLING_T1,GRABFLING_T2
movi hrt_3_pile_driver_anim,a0
move a0,*a8(SPECIAL_MOVE_ADDR),L
SLEEPK 20
jruc #lp
#*****************************************************************************
SUBRP hrt_hdhold_ddt
#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
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