-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathPLYR.ASM
executable file
·12122 lines (10008 loc) · 227 KB
/
PLYR.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
**************************************************************
;To Do for MARK:
;snd on ddunk start
;rndper combat
;fix spear ball
;fix spear ball z
;show hidden pass rating
;show hidden clutch rating
;Jordan layup from in too close
;Do dunks...
;Check all dunk_b code for lack of ball!!!!!!!!!!!!
;Give reasons to pick some teams...
;pick up ball, along sideline
;1 ally opp jump up attempt per inbound for drone playing with a human
;3 successful drone ally oops per period - then stop
;If human goes up for an alley oop and is denied, don't have drone shoot.
;done: Timer runs out on layup from dunk and ball doesn't continue!
;done: Slow down run tick cnt
;done: Turn smoke off when tvpanel is on screen
;done: Midway copyright info - hang logo on top
;done: Chk colors of ABA ball
;done: DDunk white-flash bug
;done: Get rid of all 0,0 ani pts - ball ani pts!!
;done: Chk Vancouver heads - one seemed to be facing down
;done: Better goaltend esp. on-fire
;done: Match make player tables to plyrat tables
;done: Less CPU assist
;done: Less intercepts! Ddunks harder to block!
;done: Lineup #5 swat
;done: Gill/Gilliam
;done: Turn off arrows on top of head more...
;done: Fewer intercepts
;done: Get Sean head darkened (small heads also?)
;done: Look at missed dunk offsets....
;done: Layups more blockable
;done: Alley oop passes should be intercepted more!
;done: Radja head points
;done: New rules for when we flash white on a dunk... - Height!
;done: Don't let knock-downs keep the ball as often
;done: don't swat rebound
;done: don't grab off rim if rim hit time is less than 4 ticks?
;done: One-handed snag blocks = rebound
;done: Do shot delay at end of swats! In seq!
;done: No feet fire when jumping on defense
;done: Debounce shoot on drone dunk - he always laysup
;MARK: Blocking drift? which way?
;MARK: Eldon Campbell was pushed out of a mini-dunk : CRASH!!
;MARK: Random Y vel on big guy pushdowns
;MARK: Turn off falling down pass to alley ooper
;MARK: Ball hits glass wall on blocks! What art?
; Wierd collision on #5 type block
;MARK: Off-screen speed rules: Speed up offense, but slow'em dwn if passed 2
;MARK: Slow down long passes!
;MARK: Better dunk flail
;MARK: In middle of dunk, 2 taps send drone teammate up for double dunk
;MARK: In middle of dunk, 1 tap sends drone teammate out to 3 pt range
;MARK: All three butns send flag to drones to jmp up for alley oop
; All three at once, no effect on passer...
;MARK: Other layups out of dunk... IE the old one!
;MARK: Fall down seqs
;MARK: Home game has expanded create player sfx, etc
;MARK: Ultimate title page
;MARK: Cannonball dunk
;MARK: Chk all img size bits
;MARK: Pushing a jump shooter problem
;MARK: Chk plyr push detect/accuracy
;MARK: Pick up ball bug
;MARK: Add weight att. to gameplay
;MARK: Plyr trails for team fire dunks - outdoor only?!?
;MARK: Perhaps do an extra check at 3pt shot to cause weak 3pt shooters to
; fail!
;MARK: Don't float toward teammate shot, (for put back---alley oop)
;MARK: Get Jordan, Barkley, Shaq look alike heads
;MARK: During HEADCK, also listen for correct name speech!
;MARK: No look into wrong dir
;MARK: jazz up dunks...some how ?
;MARK: Dunks - shadow trails, smoke from body, etc.
;MARK: At end, check all dunk header tables for flip angle correctness!
;MARK: Fix Utah, Golden State, Lakers, court pals
;MARK: Could get rid of pals on all player images!
;MARK: Get Ed paper debris for outdoor court
;MARK: allow drone circus mode in some cases...
; #noalyo is the label in DRONE2.ASM
;MARK: don't attach to ball at block time if ball near grnd
;MARK: Shot clock big bug!
;MARK: Shot clock text on top of G.T. text!
;MARK: Inbound on the run - powerup?
;MARK: Drone big head.
;MARK: Running pass
;MARK: Cut back defender off-screen-back-to-on-screen speed
;MARK: Consider other seqs for ddunks/alleys - careful of range checks
;MARK: Chk Cebalis mug shot
;MARK: Gambling option
;MARK: Fix mug shot Y anim
;MARK: Chk block skill attribute/jump a little higher?
;MARK: Line up trivia question text
;MARK: Attract show create a player
;MARK: Hide some heads in create player
;MARK: Hide some privileges in create player
;MARK: Robotron after 10 consecutive wins... Shoot head in Robotron...
;MARK: NBA dudes in credits... Joe Amati, Greg Lassen, etc.
;MARK: Reuse previous initials at start of next game? Jamie!!!
**************************************************************
;To Do for SHAWN:
;SHAWN: Have drones call for a pass when at positions where the art
; looks good... I can tell you...
;
; Tell drone to be aggressive like at end of qrtr
; or different d coverage - this could be a powerup type move or swirl!
;SHAWN: Don't swat while running @ loose ball
;SHAWN: Have dunking drone glitch to layup in final seconds
;SHAWN: On fire drones didn't even bother with a loose ball
;SHAWN: Drones shouldn't do the same thing @ the same time! They do!!
;SHAWN: Drones do spin move followed immediately by full-court shot
;SHAWN: Make sure smarter drone privilege works!
;SHAWN: Major jitter! Send drone out looking for an alley-oop - jitter city!
;SHAWN: I pass to drone, he shoots!
;SHAWN: Drones have problem picking up loose ball esp. in Z
;SHAWN: Drone did elbows in backcourt, then threw up a full court shot!
;SHAWN: Have drones try to block alley oop passes/dunks
**************************************************************
;To Do for JEFF: (Put DONE in place of your name when complete)
;done: Don't speed thru wipes at buyin scrns and coaching tips
; it is too fast - regular speed will do...
;done: Flash halftime/final stats leader
;done: Add nickname text
;done: Lineup ball/hand for #1 ddunk on right side of court
;done: Take out 2-press ddunk stuff
;done: Check 2PLYR KIT stuff
;done: Make sure bozo on final game stats stays long enough - too fast now?
;done: Don't default to chicken head!! Center head = highest priority!
;done: Player stat screen bullet next to shoulder on create player
;done: Verify next opponent page on team select plyr stat (PHILLY?)
;done: No air ball from ddunk layup!
;done: Make created players go even a little heavier (300 max)
;done: Have Jon turn up speech call vol - "Block it!"
;done: Get rid of "ooohhhhh" on ddunks
;done: Keep putting in sounds
;done: Finish create a player shit
;done: Create player heads on final res. page
;done: Sound calls in diagnostics test mode
;done: Priviliges text/functions
;done: Fix alley-oop speech when it really wasn't one
;done: Get more custom pals for create player
;done: More grunts (on elbows, dunks, in-air flail)
;done: Make rejected speech more intelligent
;done: Rank stuff doesn't work!! Resolve ties on plates
;done: when teammate shoots for 3 and im in alleyoop & catch ball -> 3 pts.
;done: 2 for 1 on 3-ptrs at stats page
;done: Fix 3 pts flashing for 2 point alley oop put in
;done: Put name & trivia pts on prize page (Before question)
;done: Softly off of glass speech happened on pure swish
;done: Names at botm of scrn on stats pages need to go dwn 1 line - not the
; CPU word however!
;done: Too many pixels in between letters for small name in lower attribute
; box. F A G B O Y should look like FAGBOY!
;done: "Player of the game..." at half doesn't always come up
;done: Pump up Hot dog sound priority
;done: Check rules on same-time use of a plyr record -
; gives undefeated record, doubles world record score (?)
;done: World record page needs "Individual stats" displayed
;done: Record stats pages needs "... Team ..." displayed
;done: "Switches hands" when there is a layup out of a dunk
;done: Higher priority for layups-out-of-dunks
;done: No music on start out of attract mode!!
;chkd: Snd system volume reset problem
;done: Fix favored by points on vs. screen
;JEFF: Scroller WORLDTLY when plaques come down
;JEFF: Halftime team swap
;JEFF: Score plate clock digits glitch @ halftime fade
;JEFF: What happens when you go grand champ
;JEFF: Put in secret players
;JEFF: Do attract mode/sound volume
;JEFF: Fix white pix (IRQSKYE?) on stat screen fade down
;JEFF: Cannonball sound effect
;JEFF: Get rid of long delay on sound board reset (at reset game time)
;JEFF: Put in extra trivia questions
;JEFF: Check all secret players, check audio for them as well...
;JEFF: Don't fade down chick singing at end of game....
;JEFF: Put back missed shot with alley oop dunk speech call
; Check variable must_rebound
;JEFF: put grunts on push downs!!!
;JEFF: put noise on big dunks!!!
**************************************************************
;To Do for DAN: (Put DONE in place of your name when complete)
;done: Reduce huge heads
;done: ABA ball off-fire after bucket (other too?)
;done: Legal text - attn New York text
;done: Paul & Cary shit
;done: Flash red/white on player win award text
;done: Make shots always go for adjusting %
;done: Team fire wants to adjust per CMOS timer setting
;done: Outdoor court fade up
;done: Trivia instructions screen & victory page
;done: attract whopper sounds
;done: Dress up board/eprom test
;done: Powerup nodrift...
;done: Power-up stuff
; plyr button moves
; head size(s)
; court
; ABA ball (hidden - not default!)
; Shot perc
;DAN: Tournament ladder! Not! See Jamie in a month...
;DAN: Sound script remaining after game demo
;DAN: Do another powerup for regular sized guys! 80% of what they are now.
;DAN: Team on-fire backboard effects
;DAN: GT inbounding bug - no one picked up the ball
;DAN: Play with scale tables for better range
;DAN: Link in Robotron
;DAN: Do alternate head scale tables
;DAN: Hot spot, 3 from any of many regions (3pt only?), non-consecutive
;DAN: DCS page
;DAN: PIC chip/diagnostics/sound chksums
;DAN: Proof text
;DAN: Games played wants to be in the trivia password
;DAN: TGA unzipper
;DAN: Out of position drifting plyr arrows @ start of qrtrs
;DAN: Chk for bog on release version
;DAN: Verify team fire & valid shot seqs
;DAN: TV Plate for individual players
;DAN: Operator message stuff
;DAN: New imgs (cheer, nba, etc)
;DAN: Design team,thanks screens
;DAN: MDoc credits
;DAN: Press button bozo for team select
;DAN: Put cheerleaders on court - outside perhaps
;DAN: Put in ZIP screens
;DAN: Sound after trivia rules screen
;DAN: Sound after credit screen
;DAN: Implement drone smart
;DAN: Floating in from behind hoop #2 or #1 arrow at start of periods
**************************************************************
*
* Owner: TURMELL
*
* Software: Shawn Liptak, Mark Turmell
* Initiated: 9/17/92
*
* Modified: Shawn Liptak, 9/17/92 -Split from BB.asm
*
* COPYRIGHT (C) 1992 WILLIAMS ELECTRONICS GAMES, INC.
*
*.Last mod - 3/24/93 16:21
**************************************************************
.file "plyr.asm"
.title "basketball player code"
.width 132
.option b,d,l,t
.mnolist
.include "mproc.equ" ;Mproc equates
.include "disp.equ" ;Display proc equates
.include "gsp.equ" ;Gsp asm equates
.include "sys.equ"
.include "audit.equ"
.include "world.equ" ;Court-world defs
.include "game.equ"
.include "macros.hdr" ;Macros
.include "imgtbl.glo"
.include "imgtbl7.glo"
.include "credturb.glo"
.asg 0,SEQT
.include "plyr.equ"
;sounds external
.ref tunehalf_snd
.ref brush20_ascii
.ref swat_snd,sqk1_snd,sqk2_snd,sqk3_snd,sqk4_snd
.ref airball_sp,sht_stunk_sp,misd_mile_sp,way_shrt_sp,misd_evry_sp
.ref scuf1_snd,scuf2_snd,scuf3_snd,scuf4_snd
.ref sqk5_snd,sqk6_snd,pass_snd,fpass_snd
.ref fball_snd,overtime_sp,rainbow_sp
.ref whitsle_snd,baddec_sp,tuneend_snd
;symbols externally defined
.ref print_string2b,kern_chars,mess_justify,mess_cursx,mess_cursy
.ref mess_cursx2
.ref shadow1,shadow2,shadow3,shadow4,shadow5,shadow6
.ref shadow7,shadow8,shadow9,shadow10,shadow11,shadow12
.ref shadow13,shadow14,shadow15,shadow16,shadow17,shadow18
.ref ballshad2,ballshad4,ballshad5,ballshad7
; .ref p1taps
; .ref fatality
; .ref seq_stopfire
.ref brick_count
.ref last_power
.ref qtr_purchased
.ref call_scores
.ref last_name_time
.ref bast18_ascii
.ref player1_data
.ref player2_data
.ref player3_data
.ref player4_data
.if DRONES_2MORE
.ref player5_data
.ref player6_data
.endif
.ref plyr_onfire
.ref pushed_speech
.ref grand_champs_screen
.ref show_hiscore
.ref rebound_delay
.ref def_play_reward,flash_reward,sinecos_get,slamming
.ref start_animate,pass_off,steals_off,idiot_box
.ref GET_ADJ
.ref HANGF_R_P,HANGF_W_P
.ref pass_to_speech
.ref shoots_speech
.ref shot_type,shot_percentage,shot_distance
.ref plyr_getattributes,snd_play1ovr
.ref scores,prt_top_scores
.ref score_add,score_showtvpanel2
.ref score_showtvpanel,tvpanelon
.ref gmqrtr
.ref clock_active
.ref crplate_ptr
.ref shot_clock,shotimer
.ref arw_on1plyr
.ref pushing_delay
.ref cntrs_delay
.ref game_time
.ref sc_proc
.ref stick_number
.ref doalert_snd
.ref flash_bigtxt
.ref player_data
.ref inc_player_stat
.ref stats_page,hint_page
.ref stats_page2
.ref rank_screen
; .ref result_screen
.ref save_player_records
.ref game_purchased
.ref team1,team2
.ref show_ot_msg,scr1
.ref winner_stays_on
.ref print_string_C2
.ref mess_objid
.ref setup_message
; .ref omlgmd_ascii
.ref pal_clean
.ref pal_getf,pal_set
.ref fade_down_half,fade_up_half
.ref SCRTST
.ref IRQSKYE
.ref PCNT
.ref GAMSTATE,HALT
.ref gndx
.ref AUD,AUD1,GET_AUD,STORE_AUDIT
.ref PSTATUS2
.ref RNDPER
.ref game_over
.ref TWOPLAYERS
.ref scalebaby_t,scalehead_t,scalebighead_t,scalehugehead_t
.ref scale63_t,scale66_t
.ref ball_convfmprel
.ref ballobj_p
.ref ballpnum,ballpnumlast,ballpnumshot,ballfree
.ref my_ballpnumlast
.ref ballrimhitcnt,ballbbhitcnt
.ref ballpasstime
.ref ballscorezhit
.ref ballptsforshot
.ref ballprcv_p
.ref ballgoaltcnt
.ref ballsclastp
.ref ballshotinair ;Shooter # if shot in air, else -1
.ref inbound
.ref ballflash
.ref t1dunkcnt
.ref plyr_setptsdown
.ref halftime_showclips
; .ref plyr_smoketrail
.ref drone_main,drone_adjskill
; .ref drone2on
.ref w3run1
.ref w3stand1,w4stand1,w5stand1
.ref _switch_addr
.ref _switch2_addr
.ref SHOTPER
.ref scale_t_size
.ref hangfnt38_ascii
.ref mess_line_spacing
.ref aly_pass_snd
.ref swith_hnd_sp,spn_shtup_sp
.ref dronesmrt
;symbols defined in this file
;uninitialized ram definitions
BSSX reduce_3ptr,16
BSSX kp_scores ,32
BSSX kp_team1 ,16
BSSX kp_team2 ,16
BSSX pleasewt ,16
BSSX PSTATUS ,16 ;Player in game bits (0-3)
;/Must be in order!
BSSX P1CTRL ,16 ;P1 joy/but bits (0-3=UDLR, 4-6=B1-B3)
BSSX P2CTRL ,16 ;P2 (^ 8-14 are on for a on transition
BSSX P3CTRL ,16 ;P3 of 0-6)
BSSX P4CTRL ,16 ;P4
.if DRONES_2MORE
BSSX P5CTRL ,16 ;P5
BSSX P6CTRL ,16 ;P6
.endif
BSSX P1DATA ,PDSIZE ;Player 1 data
BSSX P2DATA ,PDSIZE ;P2
BSSX P3DATA ,PDSIZE ;P3
BSSX P4DATA ,PDSIZE ;P4
.if DRONES_2MORE
BSSX P5DATA ,PDSIZE ;D5 ;always a drone
BSSX P6DATA ,PDSIZE ;D6 ;always a drone
.endif
.bss pld ,PLDSZ*NUMPLYRS ;Plyr secondary data
BSSX plyrobj_t ,32*NUMPLYRS ;*player obj
BSSX plyrproc_t ,32*NUMPLYRS ;*player process
BSSX plyrcharge ,16 ;!0=Dunker rammed an opponent
BSSX plyrpasstype ,16 ;!0=Turbo pass
BSSX plyrairballoff ,16 ;!0=No airball sound
.bss plyrinautorbnd ,16 ;!0=A plyr is in auto rebound
; .bss drnzzcnt ,16 ;Drone zigzag mode cntdn
; .bss drnzzmode ,16 ;Drone zigzag mode (0-?)
BSSX plyrpals_t ,256*16*NUMPLYRS ;Assembled palette for each plyr
BSSX assist_delay ,16
BSSX assist_plyr ,16
BSSX kp_qscrs ,(2*16)*7 ;Keep scores during game play
BSSX kp_qscrs2 ,(2*16)*7 ;Keep scores for attract mode
;
;Ram for secret power-ups (if add any, also add to 'clear_secret_powerup_ram')
;
BSSX pup_lockcombo ,16 ;Flag for locking power-up combos
BSSX pup_bighead ,16 ;Bit 0-3 on = plyr 0-3 has big head
BSSX pup_hugehead ,16 ;Bit 0-3 on = plyr 0-3 has huge head
BSSX pup_showshotper ,16
BSSX pup_notag ,16 ;Bit 0-3 on = dont show plyr 0-3 arrow
BSSX pup_nodrift ,16 ;Bit 0-3 on = no drift for block jumps
BSSX pup_noassistance,16 ;1=turn help off
BSSX pup_aba ,16 ;0=regular ball, !0=ABA ball
BSSX pup_court ,16 ;0=indoor, !0=outdoor
BSSX pup_showhotspots,16 ;Bit 0-3 on = show plyr 0-3 hotspots
BSSX pup_tournament ,16 ;*4
BSSX pup_baby ,16 ;Flag for baby size mode
BSSX pup_nomusic ,16 ;Flag for no game-time music
BSSX pup_goaltend ,16 ;Bit 0-3 on = plyr 0-3 has powerup g.t.
BSSX pup_maxblock ,16 ;Bit 0-3 on = plyr 0-3 has stl power
BSSX pup_maxsteal ,16 ;Bit 0-3 on = plyr 0-3 has stl power
BSSX pup_maxpower ,16 ;Powerup power - can't be pushed down
BSSX pup_maxspeed ,16 ;Bit 0-3 on = plyr 0-3 max runing speed
BSSX pup_hypspeed ,16 ;Bit 0-3 on = plyr 0-3 max runing speed
BSSX pup_trbstealth ,16 ;Bit 0-3 on = plyr 0-3 shoes dont change color
BSSX pup_trbinfinite ,16 ;Bit 0-3 on = plyr 0-3 always has turbo
BSSX pup_nopush ,16 ;Bit 0-3 on = plyr 0-3 can't push
BSSX pup_fastpass ,16 ;Bit 0-3 on = plyr 0-3 has fast passing
BSSX pup_strongmen ,16 ;Grnd champ flag 0,1 or 2 for team #
;For moving during inbound!
; .bss inbound_lead ,16 ;Leading inbound pass flag
.bss drone_attempt ,16 ;Alley oop jump up attempts
; BSSX drone_alley_cnt ,16 ;3 successful drone alley oops/period
;equates for this file
IBX_INB .equ 345
IBZ_INB .equ CZMID+10
IBX_OOB .equ 415
IBZ_OOB .equ CZMID-15
IBX_CRT .equ 395
IBZ_CRT .equ CZMID-15
IBX_DEF .equ 230
IBZ_DEF1 .equ CZMID-50
IBZ_DEF2 .equ CZMID+70
.if DEBUG
BSSX QUICK_TIP ,16 ;Set at game start. 1=quick
.if HEADCK
BSSX debug_plyr_num,16
.endif
.endif
.text
;-----------------------------------------------------------------------------
;-----------------------------------------------------------------------------
SUBR clear_secret_powerup_ram
clr a0
move a0,@pup_lockcombo
move a0,@pup_bighead
move a0,@pup_hugehead
move a0,@pup_showshotper
move a0,@pup_nomusic
SUBR clear_secret_powerup_tmode
clr a0
move a0,@pup_notag
move a0,@pup_nodrift
move a0,@pup_noassistance
move a0,@pup_baby
move a0,@pup_goaltend
move a0,@pup_maxblock
move a0,@pup_maxsteal
move a0,@pup_maxpower
move a0,@pup_maxspeed
move a0,@pup_hypspeed
move a0,@pup_trbstealth
move a0,@pup_trbinfinite
move a0,@pup_nopush
move a0,@pup_fastpass
move a0,@pup_showhotspots
move a0,@pup_strongmen
rets
;-----------------------------------------------------------------------------
;-----------------------------------------------------------------------------
; .if DRONES_2MORE
; SUBR add_drone_to_each_team
;;
;; First add a drone to team 1
;;
; move @PSTATUS,a1
; ori 4,a1 ;Set bit
; move a1,@PSTATUS
;
; move @PSTATUS2,a1
; ori 4,a1 ;Set bit saying this guy has started
; move a1,@PSTATUS2 ;and 50 cent buyin has happened!
;
;;
;; Now add a drone to team 2
;;
; move @PSTATUS,a1
; ori 5,a1 ;Set bit
; move a1,@PSTATUS
;
; move @PSTATUS2,a1
; ori 5,a1 ;Set bit saying this guy has started
; move a1,@PSTATUS2 ;and 50 cent buyin has happened!
; rets
; .endif
********************************
* Start player processes
SUBR plyr_start
; movk 1,a0
; move a0,@>fff80000,L
callr joy_read2
clr a0
move a0,@plyrinautorbnd
move a0,@plyrcharge
move a0,@plyrairballoff
; move a0,@pup_maxsteal
move a0,@pup_strongmen ;Grand champion playing flag
movk 1,a2
movk 1,a3
move @player1_data+PR_TEAMSDEF,a0,L
cmpi ALL_TMS_DEFEATD,a0
; cmpi >7ffffff,a0
jrz #easy0
move @player2_data+PR_TEAMSDEF,a0,L
cmpi ALL_TMS_DEFEATD,a0
; cmpi >7ffffff,a0
jrz #easy0
movk 2,a3
move @player3_data+PR_TEAMSDEF,a0,L
cmpi ALL_TMS_DEFEATD,a0
; cmpi >7ffffff,a0
jrz #easy0
move @player4_data+PR_TEAMSDEF,a0,L
cmpi ALL_TMS_DEFEATD,a0
; cmpi >7ffffff,a0
jrnz #nea
#easy0 move a3,@pup_strongmen ;Grand champion playing flag
; jruc #easy
#nea
; clr a2
; movk ADJDIFF,a0 ;Get difficulty level
; calla GET_ADJ
;;Which drone code do we use?
;;Level 1 uses old, above uses new shit...
; subk 1,a0 ;3
; jrle #regdrn
; movk 1,a2
;#regdrn
; move @PSTATUS,a0
; cmpi 1,a0
; jrz #hard
; cmpi 2,a0
; jrz #hard
; cmpi 4,a0
; jrz #hard
; cmpi 8,a0
; jrnz #easy
;#hard
; movi 200,a0
; calla RNDPER
; jrhi #easy
; movk 1,a2 ;Give hard drones 70% of time
;
;#easy move a2,@drone2on
; move @pup_bighead,a0
; zext a0
; cmpi >eaea,a0
; jrnz #no_3d
; movk >f,a2
; move a2,@pup_maxsteal
; jruc #adjoff
;#no_3d
movk ADJHEADSZ,a0 ;Get head size
calla GET_ADJ ;1-2
subk 1,a0
jrle #adjoff ;No big heads?
move @pup_bighead,a2
movk >f,a14
xor a14,a2
move a2,@pup_bighead
; clr a2
; move a2,@pup_hugehead
#adjoff
.if DEBUG
move @QUICK_TIP,a14
jrz #refon
clr a0
callr plyr_setac
jruc #refoff
#refon
CREATE0 plyr_referee
#refoff
.else
CREATE0 plyr_referee
.endif
movi plyrproc_t+32*NUMPLYRS,a2 ;Set ptrs & cnt to make plyrs
movi plyrobj_t+32*(NUMPLYRS-1),a9
movk NUMPLYRS-1,a8 ;-1 to fall thru for last one
#strtp
CREATE0 plyr_main
move a0,-*a2,L ;Save *proc
subk 32,a9
dsj a8,#strtp
move a13,-*a2,L
; jruc plyr_main ;#0
#*******************************
* Main player control code (Process)
* A8=Plyr # (0-3)
* A9=*plyrobj_t for plyr #
* A13=*PDATA for plyr #
SUBR plyr_main
move a13,a1 ;>Clr PDATA & PSDATA areas
addi PDATA,a1
movi (PRCSIZ-PDATA)/16,a2
clr a0
#clrpd move a0,*a1+
dsj a2,#clrpd
; .ref inmatchup
; move @inmatchup,a0
; jrnz #nohdcng ;br=no powerups on matchup screen
;
; move a8,a0 ;Chk powerup seqs
; sll 4,a0
; addi P1CTRL,a0
; move *a0,a0
; sll 32-7,a0 ;Mask to just stick & 3 buttons
; srl 32-7,a0
; cmpi BUT1_M|JOYD_M,a0 ;Shoot, Down
; jrne #nostl
; move a8,a0
; sll 4,a0
; addi p1taps,a0
; move *a0,a0
; cmpi 5,a0 ;At least 5 taps?
; jrlt #nostl
; move @pup_maxsteal,a0 ;Powerup intercepts (Quick hands)
; movk 1,a14
; sll a8,a14
; xor a14,a0 ;Flip bit
; move a0,@pup_maxsteal
;#nostl
; cmpi BUT3_M|BUT2_M|JOYU_M,a0 ;Turbo, Pass, Up
; jrne #nohdcng
; move @pup_bighead,a0 ;Headsize override
; movk 1,a14
; sll a8,a14
; xor a14,a0 ;Flip bit
; move a0,@pup_bighead
#nohdcng
movi -1,a1
move a1,*a13(plyr_newdir)
movk 1,a0
move a0,*a13(plyr_shtbutn)
movk 30,a0
move a0,*a13(plyr_turndelay)
move a8,*a13(plyr_num)
move a8,a11
movk 1,a7
xor a8,a7
sll 5,a7 ;*32
addi plyrproc_t,a7
move *a7,a7,L
move a7,*a13(plyr_tmproc_p),L
movi P2DATA-P1DATA,a7,W
mpyu a8,a7
addi P1DATA,a7
move a7,*a13(plyr_PDATA_p),L
calla plyr_getattributes ;Set attribute_p
;A10=*Uniform attr (ignores spechds)
;----------
; setup tip-off img
; move @inmatchup,a0
; jrz #nmtch_1
; movk 1,a14
; move a14,*a13(plyr_nojoy)
; move a14,*a13(plyr_autoctrl)
;
; movi #pm1-#pmatch_t,a7,W ;set ptr to tip-off init table for
; mpyu a8,a7 ; this plyr
; addi #pmatch_t,a7
; jruc #mtch_2
;#nmtch_1
movi #pd1-#pdat_t,a7,W ;set ptr to tip-off init table for
mpyu a8,a7 ; this plyr
addi #pdat_t,a7
#mtch_2
move *a7+,a0 ;Plyr PID
move a0,*a13(PROCID)
move *a7+,a1 ;Dir
move a1,*a13(plyr_dir)
move *a7+,a0 ;X offset
move @WORLDTLX+16,a1
add a1,a0
;LOOK!!!
move @gmqrtr,a3 ;if not 1st qrtr, push them all over
jrz #not2 ; to the rgt side inbound
addi 400,a0 ;!!!
#not2
sll 16,a0 ;X
clr a1 ;Y
move *a7+,a3 ;Z
move *a7,a2,L ;OIMG
movi DMAWNZ|M_3D,a4
; cmpi 1,a8
; jrnz #qkfix2
; movi DMAWNZ|M_3D|M_FLIPH,a4
;#qkfix2
movi CLSPLYR|TYPPLYR,a5
clr a6
clr a7
calla BEGINOBJ2
move a8,*a9,L ;Save *obj
movi scale63_t,a0 ;Temp size
move a0,*a8(ODATA_p),L
SLEEPK 2 ;Wait for other plyrs init
;----------
; set up player attribute
move a10,a6 ;A10=*Uniform attr (ignores spechds)
move *a13(plyr_attrib_p),a7,L
move *a7,a0,L ;*scale_t
move a0,*a8(ODATA_p),L
move *a7(PAT_BVEL),a0 ;speed
move a0,*a13(plyr_bvel)
move *a7(PAT_SKILL),a0 ;drone skill
;
; see if & how we might want to screw with PAT_SKILL
;
move @PSTATUS,a1 ;is plyr human or drone?
btst a11,a1
jrnz #hmn
movk 1,a14 ;Drone
xor a11,a14
btst a14,a1
jrz #tdrn ;Teammate is a drone?
#hmn
; movk 2,a14 ;Human
; xor a11,a14
; sll 5,a14 ;*32
; addi plyrproc_t,a14
; move *a14,a14,L
clr a0
jruc #setskl
#tdrn
movk 2,a14 ;We are drones
xor a11,a14
btst a14,a1 ;Human opponent?
jrnz #humop
movk 1,a2 ;at least one isn't
xor a2,a14
btst a14,a1 ;All drones? yes if 0
jrz #setskl
#humop
sll 5,a14
addi player_data,a14
move *a14,a14,L
movk 6,a2
move *a14(PR_COUNT),a1 ;- if no entry
jrn #wimp
move *a14(PR_NUMDEF),a2 ;# teams defeated
;If a player is real good, almost all teams beaten, give hime
;the in the zone spch call at game start
subk 5,a2
jrlt #few
PUSH a0,a1,a14
.ref thr_zone_sp
movi thr_zone_sp,a0
calla snd_play1
PULL a0,a1,a14
;Old tougher drones flag
; move a2,@drone2on
#few
movk 4,a2 ;3
subk 4,a1
jrle #wimp ;1st couple of games?
movk 1,a2
#wimp
sub a2,a0
move *a14(PR_WINSTREAK),a1 ;Won last game? yes if !0
jrnz #setskl
subk 4,a0 ;lower skill for 1st timers (no wins)
#setskl
move a0,*a13(plyr_d_skill)
;----------
; check for conflicting team pals
;
; dont check for conflicting pals when a created palyer
;
move a11,a14 ;player number
sll 5,a14
addi player_data,a14
move *a14,a14,L
move *a14(PR_CREATED_PLYR),a3
jrle #t1a ;br=not a created player
move *a14(PR_UNIFORM_NBR),a3
btst 6,a3
jrnz #altc ;br=home team pal.
jruc #keepc
#t1a
movi team1,a14
move *a14+,a3 ;get team #'s & determine which one
move *a14,a4 ; we are now
btst 1,a11
jrz #t1
SWAP a3,a4
#t1 sll 3,a3
sll 3,a4
addi teampal_t,a3
addi teampal_t,a4
movb *a3,a3
jrn #keepc ;I always keep? yes if neg
movb *a4,a4
move a4,a14
sll 32-4,a3
sll 32-4,a14
cmp a3,a14
jrne #keepc ;Different colors?
move a4,a4
jrn #altc ;Other team always keeps?
btst 1,a11
jrnz #keepc ;2nd team?
#altc addk 32,a6 ;use alternates
#keepc
;----------
; Build plyr palette
move a11,a2
sll 8+4,a2
addi plyrpals_t,a2
PUSH a2
; movi 255,a0
movi 128,a0
move a0,*a2+ ;Set # colors
.ref SHT11 ;MK SPECIAL FLAG
move *a7(PAT_SHOTSKILL),a1 ;Check for special pals
cmpi SHT11,a1
jrne #reg ;Stay with defined pals if !=
move a7,a6
#reg
move *a7(PAT_PALF_p),a1,L ;Copy flesh
; .ref NFL55_p
; movi NFL55_p,a1