forked from LegendsUnchained/vpx-standalone-alp4k
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bone Busters Inc. (Gottlieb 1989).vbs
2472 lines (2076 loc) · 89.8 KB
/
Bone Busters Inc. (Gottlieb 1989).vbs
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
' Bone Busters Inc. Gottlieb 1989
' Script from the full rebuild for VPX by Aubrel (2021, June)
' Thanks to 32Assassin for sharing a beta version of this table that helped a lot for this rebuild
' (this present script has been improved using 32Assassin's beta table script as a base)
' Aubrel - flasher solenoids fixed
' Aubrel - drain and release kickers fixed (kicker script taken from Big House: it works now :p )
' Aubrel - ballshooter fixed (now it should be fully working)
' Aubrel - input corrections and UseFlipButton option added
' Aubrel - auto plunger added for "Bonus Balls" time (most probably not accurate but it helps and avoids problems)
' Aubrel - drop target cheat added (it should help to fix the table)
' Aubrel - more function lights added (it should help to fix the table)
' Aubrel - Opera jackpot playfield insert lighting fixed (now accurate)
' Aubrel - sound and collision script improved
' Aubrel - tilt lighting fixed and improved (should be now accurate)
' Aubrel - LUTs selection added and LightsLevelUpdate code added
' Aubrel - LightsMod added to improve the lighting (not accurate when enabled)
' Aubrel - ExtraBall and Special inserts fixed (L21a and L22a)
' Outhere - some more DOF solenoid call outs
' Aubrel - DarkLevelUpdate added to improve the lighting
' apophis - added Fleep sounds pacakge. added nFozzy physics and flippers
' apophis - added other physics mods: flipper rubberizer, flipper coil rampup option, target bouncer
' Mike da Spike - added Coins chute DIP Switches
' Aubrel - added again pitch and volume increase for ballrolling on ramps and upper flippers collision sounds. Kicker26 direction/force adjusted to match the real table
' v1.0 - 2015, December, 24th By Max
' Thanks to:
' gtxjoe for his resources and the ramp, the scoop and the flasher dome primitives
' jpsalas for allowing me to use his scripts and resources
' Unclewilly for allowing me to use his scripts and resources
' Destruk/ExtremeMame/Gravitar/TAB for the VP8 table
' Inkochnito for the DIP switches
option Explicit
On Error Resume Next
ExecuteGlobal GetTextFile("controller.vbs")
If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package"
On Error Goto 0
LoadVPM"01520000","sys80.VBS",1.2
Dim VarRol, VarHidden, Luts, LutPos, xxx
'-----------------------------------
'------ Global Cofigurations ------
'-----------------------------------
Const cGameName="bonebstr",UseSolenoids=2,UseLamps=0,UseGI=0, SCoin=""
If Table1.ShowDT=true Then VarRol=0 : VarHidden=1 Else VarRol=1 : VarHidden=0
If B2SOn Then VarHidden=1 'comment this line or set 0 if you have problems with DMD showing; 1 is the default (disabled with dB2S)
'******************* User Options *********************
'******************************************************
'Control Option
Const UseFlipButton = 1 'set to 1 if you want to use the right flipper button for the up-right flipper; 0 is defaut (right magna-save button)
'Visual Options
Luts = array("ColorGradeLUT256x16_1to1","ColorGradeLUT256x16_ModDeSat","ColorGradeLUT256x16_ConSat","ColorGradeLUT256x16_ExtraConSat","ColorGradeLUT256x16_ConSatMD","ColorGradeLUT256x16_ExtraConSatD")
LutPos = 3 'set the nr of the LUT you want to use (0=first in the list above, 1=second, etc; 4 and 5 are "Medium Dark" and "Dark" LUTs); 3 is the default (ExtraConSat)
Const CustInstCards = 0 'set to 1 to get custom instruction cards; 0 is default (standard ones)
Const LightsMod = 0 'set to 1 if you want to improve the lighting (red tubes blinking, Opera Jackpot inserts during attract mode, inserts switched off with tilt); 0 is default (accurate)
Const VisualLock = 0 'set to 1 if you don't want to change the visual settings using Magna-Save buttons; 0 is the default (live changes enabled)
Const DarkLightShow = 0.9 'set values from 0 to 1; 0 removes completely the effect (and gives better performances); 0.9 is the default
' Physics mods
Const RubberizerEnabled = 1 '0 = normal flip rubber, 1 = more lively rubber for flips
Const FlipperCoilRampupMode = 0 '0 = fast, 1 = medium, 2 = slow (tap passes should work)
Const TargetBouncerEnabled = 1 '0 = normal standup targets, 1 = bouncy targets
Const TargetBouncerFactor = 0.8 'Level of bounces. 0.2 - 1.5 are probably usable values
' Volume Options (Volume constants, 1 is max)
Const VolumeDial = 0.5 ' VolumeDial is the actual global volume multiplier for the mechanical sounds.
'//////////////////////////// MECHANICAL SOUNDS ///////////////////////////
'// This part in the script is an entire block that is dedicated to the physics sound system.
'// Various scripts and sounds that may be pretty generic and could suit other WPC systems, but the most are tailored specifically for this table.
'/////////////////////////////// SOUNDS PARAMETERS //////////////////////////////
Dim GlobalSoundLevel, CoinSoundLevel, PlungerReleaseSoundLevel, PlungerPullSoundLevel, NudgeLeftSoundLevel
Dim NudgeRightSoundLevel, NudgeCenterSoundLevel, StartButtonSoundLevel, RollingSoundFactor
CoinSoundLevel = 1 'volume level; range [0, 1]
NudgeLeftSoundLevel = 1 'volume level; range [0, 1]
NudgeRightSoundLevel = 1 'volume level; range [0, 1]
NudgeCenterSoundLevel = 1 'volume level; range [0, 1]
StartButtonSoundLevel = 0.1 'volume level; range [0, 1]
PlungerReleaseSoundLevel = 0.8 '1 wjr 'volume level; range [0, 1]
PlungerPullSoundLevel = 1 'volume level; range [0, 1]
RollingSoundFactor = 1.1/20
'///////////////////////-----Solenoids, Kickers and Flash Relays-----///////////////////////
Dim FlipperUpAttackMinimumSoundLevel, FlipperUpAttackMaximumSoundLevel, FlipperUpAttackLeftSoundLevel, FlipperUpAttackRightSoundLevel
Dim FlipperUpSoundLevel, FlipperDownSoundLevel, FlipperLeftHitParm, FlipperRightHitParm
Dim SlingshotSoundLevel, BumperSoundFactor, KnockerSoundLevel
FlipperUpAttackMinimumSoundLevel = 0.010 'volume level; range [0, 1]
FlipperUpAttackMaximumSoundLevel = 0.635 'volume level; range [0, 1]
FlipperUpSoundLevel = 1.0 'volume level; range [0, 1]
FlipperDownSoundLevel = 0.45 'volume level; range [0, 1]
FlipperLeftHitParm = FlipperUpSoundLevel 'sound helper; not configurable
FlipperRightHitParm = FlipperUpSoundLevel 'sound helper; not configurable
SlingshotSoundLevel = 0.95 'volume level; range [0, 1]
BumperSoundFactor = 4.25 'volume multiplier; must not be zero
KnockerSoundLevel = 1 'volume level; range [0, 1]
'///////////////////////-----Ball Drops, Bumps and Collisions-----///////////////////////
Dim RubberStrongSoundFactor, RubberWeakSoundFactor, RubberFlipperSoundFactor,BallWithBallCollisionSoundFactor
Dim BallBouncePlayfieldSoftFactor, BallBouncePlayfieldHardFactor, PlasticRampDropToPlayfieldSoundLevel, WireRampDropToPlayfieldSoundLevel, DelayedBallDropOnPlayfieldSoundLevel
Dim WallImpactSoundFactor, MetalImpactSoundFactor, SubwaySoundLevel, SubwayEntrySoundLevel, ScoopEntrySoundLevel
Dim SaucerLockSoundLevel, SaucerKickSoundLevel
BallWithBallCollisionSoundFactor = 3.2*4 'volume multiplier; must not be zero
RubberStrongSoundFactor = 0.055/5 'volume multiplier; must not be zero
RubberWeakSoundFactor = 0.075/5 'volume multiplier; must not be zero
RubberFlipperSoundFactor = 0.090*3 'volume multiplier; must not be zero
BallBouncePlayfieldSoftFactor = 0.025 'volume multiplier; must not be zero
BallBouncePlayfieldHardFactor = 0.025 'volume multiplier; must not be zero
DelayedBallDropOnPlayfieldSoundLevel = 0.8 'volume level; range [0, 1]
WallImpactSoundFactor = 0.075 'volume multiplier; must not be zero
MetalImpactSoundFactor = 0.075/3
SaucerLockSoundLevel = 0.9
SaucerKickSoundLevel = 0.9
'///////////////////////-----Gates, Spinners, Rollovers and Targets-----///////////////////////
Dim GateSoundLevel, TargetSoundFactor, SpinnerSoundLevel, RolloverSoundLevel, DTSoundLevel
GateSoundLevel = 0.5/5 'volume level; range [0, 1]
TargetSoundFactor = 0.0050 * 10 'volume multiplier; must not be zero
DTSoundLevel = 0.50 'volume multiplier; must not be zero
RolloverSoundLevel = 0.50 'volume level; range [0, 1]
'///////////////////////-----Ball Release, Guides and Drain-----///////////////////////
Dim DrainSoundLevel, BallReleaseSoundLevel, BottomArchBallGuideSoundFactor, FlipperBallGuideSoundFactor
DrainSoundLevel = 0.8 'volume level; range [0, 1]
BallReleaseSoundLevel = 1 'volume level; range [0, 1]
BottomArchBallGuideSoundFactor = 0.2 'volume multiplier; must not be zero
FlipperBallGuideSoundFactor = 0.015 'volume multiplier; must not be zero
'///////////////////////-----Loops and Lanes-----///////////////////////
Dim ArchSoundFactor
ArchSoundFactor = 0.025/5 'volume multiplier; must not be zero
'Dev Options
Const TestLamps=0 'set to 1 to show function lamps in desktop mode; 0 is default (for devs only)
Const DTCheat=0 'set to 1 to enable DT cheat using BuyIn button (2); 0 is default (for devs only)
'******************************************************
'******************************************************
Const PrivateMod = 0 'set to 1 if you want to use nice imported primitives; 0 is default (meshs and UVs not included)
If DarkLightShow > 1 Then DarkLightShow = 1 'ensure you don't go above 1
Table1.ColorGradeImage = Luts(LutPos)
If LutPos = 4 Then LightsLevelUpdate 1, 1 'set lights for "Medium Dark" LUT
If LutPos = 5 Then LightsLevelUpdate 2, 1 'set lights for "Dark" LUT
If CustInstCards=1 Then
If PrivateMod=0 Then RightCardCust.Visible=1:LeftCardCust.Visible=1 Else RightCardCustM.Visible=1:LeftCardCustM.Visible=1
End If
If TestLamps=0 Then
For each xxx in Test_Lamps : xxx.Image="Background" : Next
End If
'*************************************************************
'Solenoid Call backs
'*************************************************************
SolCallback(1)= "Solenoid1"
SolCallback(2)= "Solenoid2"
SolCallback(3)= "Solenoid3"
SolCallback(4)= "SetLamp 104,"
SolCallback(5)= "Solenoid5"
SolCallback(6)= "Solenoid6"
SolCallback(7)= "SetLamp 107,"
SolCallback(8)= "SolKnocker"
SolCallback(9)= "SolTrough"
SolCallback(sLRFlipper) = "SolRFlipper"
SolCallback(sLLFlipper) = "SolLFlipper"
' Added By Outhere
'DOF 108,2 5 Bank Reset (Drop Targets)
'DOF 114,2 Left BallShooter
'DOF 113,2 BallRelease
'DOF 110,2 TopRightKicker
'******************************************************
'FLIPPERS
'******************************************************
Const ReflipAngle = 20
Sub SolLFlipper(Enabled)
If Enabled Then
LF.Fire 'FlipperLeft.rotatetoend
FlipperLeftUp.RotateToEnd
If FlipperLeft.currentangle < FlipperLeft.endangle + ReflipAngle Then
RandomSoundReflipUpLeft FlipperLeft
Else
SoundFlipperUpAttackLeft FlipperLeft
RandomSoundFlipperUpLeft FlipperLeft
End If
Else
FlipperLeft.RotateToStart
FlipperLeftUp.RotateToStart
If FlipperLeft.currentangle < FlipperLeft.startAngle - 5 Then
RandomSoundFlipperDownLeft FlipperLeft
End If
FlipperLeftHitParm = FlipperUpSoundLevel
End If
End Sub
Sub SolRFlipper(Enabled)
If Enabled Then
RF.Fire 'FlipperRight.rotatetoend
If FlipperRight.currentangle > FlipperRight.endangle - ReflipAngle Then
RandomSoundReflipUpRight FlipperRight
Else
SoundFlipperUpAttackRight FlipperRight
RandomSoundFlipperUpRight FlipperRight
End If
Else
FlipperRight.RotateToStart
If FlipperRight.currentangle > FlipperRight.startAngle + 5 Then
RandomSoundFlipperDownRight FlipperRight
End If
FlipperRightHitParm = FlipperUpSoundLevel
End If
End Sub
Sub FlipperLeft_Collide(parm)
CheckLiveCatch Activeball, FlipperLeft, LFCount, parm
LeftFlipperCollide parm
if RubberizerEnabled <> 0 then Rubberizer(parm)
End Sub
Sub FlipperLeftUp_Collide(parm)
LeftFlipperCollide parm
End Sub
Sub FlipperRight_Collide(parm)
CheckLiveCatch Activeball, FlipperRight, RFCount, parm
RightFlipperCollide parm
if RubberizerEnabled <> 0 then Rubberizer(parm)
End Sub
Sub FlipperRightUp_Collide(parm)
RightFlipperCollide parm
End Sub
sub Rubberizer(parm)
if parm < 10 And parm > 2 And Abs(activeball.angmomz) < 10 then
'debug.print "parm: " & parm & " momz: " & activeball.angmomz &" vely: "& activeball.vely
activeball.angmomz = -activeball.angmomz * 2
activeball.vely = activeball.vely * 1.2
'debug.print ">> newmomz: " & activeball.angmomz&" newvely: "& activeball.vely
Elseif parm <= 2 and parm > 0.2 Then
'debug.print "* parm: " & parm & " momz: " & activeball.angmomz &" vely: "& activeball.vely
activeball.angmomz = -activeball.angmomz * 0.5
activeball.vely = activeball.vely * (1.2 + rnd(1)/3 )
'debug.print "**** >> newmomz: " & activeball.angmomz&" newvely: "& activeball.vely
end if
end sub
'*******************************************
' FlippersPol late 80s early 90's
'*******************************************
dim LF : Set LF = New FlipperPolarity
dim RF : Set RF = New FlipperPolarity
InitPolarity
Sub InitPolarity()
dim x, a : a = Array(LF, RF)
for each x in a
x.AddPoint "Ycoef", 0, FlipperRight.Y-65, 1 'disabled
x.AddPoint "Ycoef", 1, FlipperRight.Y-11, 1
x.enabled = True
x.TimeDelay = 60
Next
AddPt "Polarity", 0, 0, 0
AddPt "Polarity", 1, 0.05, -5
AddPt "Polarity", 2, 0.4, -5
AddPt "Polarity", 3, 0.6, -4.5
AddPt "Polarity", 4, 0.65, -4.0
AddPt "Polarity", 5, 0.7, -3.5
AddPt "Polarity", 6, 0.75, -3.0
AddPt "Polarity", 7, 0.8, -2.5
AddPt "Polarity", 8, 0.85, -2.0
AddPt "Polarity", 9, 0.9,-1.5
AddPt "Polarity", 10, 0.95, -1.0
AddPt "Polarity", 11, 1, -0.5
AddPt "Polarity", 12, 1.1, 0
AddPt "Polarity", 13, 1.3, 0
addpt "Velocity", 0, 0, 1
addpt "Velocity", 1, 0.16, 1.06
addpt "Velocity", 2, 0.41, 1.05
addpt "Velocity", 3, 0.53, 1'0.982
addpt "Velocity", 4, 0.702, 0.968
addpt "Velocity", 5, 0.95, 0.968
addpt "Velocity", 6, 1.03, 0.945
LF.Object = FlipperLeft
LF.EndPoint = EndPointLp
RF.Object = FlipperRight
RF.EndPoint = EndPointRp
End Sub
Sub TriggerLF_Hit() : LF.Addball activeball : End Sub
Sub TriggerLF_UnHit() : LF.PolarityCorrect activeball : End Sub
Sub TriggerRF_Hit() : RF.Addball activeball : End Sub
Sub TriggerRF_UnHit() : RF.PolarityCorrect activeball : End Sub
Dim RFUp
Sub FlipperTimer_Timer
'FlipperRightUp Control
If Controller.Switch(35)=True And Controller.Lamp(0)=True Then
FlipperRightUp.RotateToEnd
If RFUp=0 Then PlaySoundAtVol SoundFX("fx_Flipperup",DOFContactors),FlipperRightUp,VolumeDial
RFUp = 1
Else
FlipperRightUp.RotateToStart
If RFUp=1 Then PlaySoundAtVol SoundFX("fx_Flipperdown",DOFContactors),FlipperRightUp,VolumeDial
RFUp = 0
End If
FlipperLeftGottlieb.objRotz = FlipperLeft.CurrentAngle-90
FlipperLeftUpGottlieb.objRotz = FlipperLeftUp.CurrentAngle-90
FlipperRightGottlieb.objRotz= FlipperRight.CurrentAngle-90
FlipperRightUpGottlieb.objRotz= FlipperRightUp.CurrentAngle-90
'ninuzzu's FLIPPER SHADOWS
FlipperLeftSh.RotZ = FlipperLeft.CurrentAngle
FlipperLeftUpSh.RotZ = FlipperLeftUp.CurrentAngle
FlipperRightSh.RotZ = FlipperRight.CurrentAngle
End Sub
'******************************************************
'Other Solenoids
'******************************************************
Sub SolTrough(Enabled)
If Enabled Then
bsTrough.entrysol_on
Kicker56.DestroyBall
End If
End Sub
Sub Solenoid1(Enabled)
If Enabled Then
If Controller.Lamp(13)=True Then 'S Relay Enabled
SetLamp 100,1 'Top Right Lights 1
SetLamp 101,1 'Top Right Lights 2
Else
SetLamp 100,0
SetLamp 101,0
bsRightKicker.ExitSol_On
End If
Else
SetLamp 100,0
SetLamp 101,0
End If
End Sub
Sub Solenoid2(Enabled)
If Enabled Then
If Controller.Lamp(13)=True Then 'S Relay Enabled
SetLamp 102,1 'Right Side Light
Else
SetLamp 102,0
bsCenterKicker.ExitSol_On
End If
Else
SetLamp 102,0
End If
End Sub
Sub Solenoid3(Enabled)
If Enabled Then
If Controller.Lamp(13)=True Then 'S Relay Enabled
SetLamp 103,1 'Top-Left Flipper Light
' BallShooter.fire : PlaySoundAt SoundFX("plunger",DOFContactors),BallShooter 'Doesn't work: datasheet is wrong? (Made only with L12)
Else
SetLamp 103,0
End If
Else
SetLamp 103,0
End If
End Sub
Sub Solenoid5(Enabled)
If Enabled Then
If Controller.Lamp(13)=True Then 'S Relay Enabled
SetLamp 105,1 'Center Rollover Lights
Else
SetLamp 105,0
If Controller.switch(46)=True Then 'Up-Right Kicker
SoundSaucerKick 1, Kicker46
Kicker46.DestroyBall
Set RaiseBall = Kicker46.CreateBall
RaiseBallSW = True
TopRightKickerTimer.Enabled = True
Kicker46.Enabled = True
Controller.switch(46) = False
End If
End If
Else
SetLamp 105,0
End If
End Sub
Sub Solenoid6(Enabled)
If Enabled Then
If Controller.Lamp(13)=True Then 'S Relay Enabled
SetLamp 106,1 'Top-Left Spot Target and Center Ramp Lights
Else
SetLamp 106,0
DTLow.DropSol_On '5 Bank Reset (Drop Targets)
DOF 108,2 ' Added By Outhere
dim xx
If LightsMod=0 Then
If Controller.Lamp(7)=True Then 'Opera Jackpot Lights On
For each xx in BlinkInserts2:xx.State = 2: Next
End If
Else
If Controller.Lamp(7)=True Or Controller.Lamp(0)=False Then 'Opera Jackpot Lights On (L0 is not accurate but gives better attract mode)
For each xx in BlinkInserts2:xx.State = 2: Next
End If
End If
End If
Else
SetLamp 106,0
End If
End Sub
Sub SolRelayA(Enabled) 'L14
If Enabled Then
Else
End If
End Sub
Sub SolRelayB(Enabled) 'L15
If Enabled Then
Else
End If
End Sub
Sub SolRelayC(Enabled) 'L18
If Enabled Then
Else
End If
End Sub
Sub SolRelayQ(Enabled) 'InGame (L0)
dim xx
If Enabled Then
If LightsMod=1 Then 'needed only with LightsMod
For each xx in BlinkInserts2:xx.State = 0: Next 'Opera Jackpot Lights Off
End If
Else
For each xx in BlinkInserts2:xx.State = 0: Next 'Opera Jackpot Lights Off
End If
End Sub
Sub SolRelayS(Enabled) 'Solenoid Switch Function (L13)
If Enabled Then
L21.State=0
L22.State=0
Else
L21a.State=0
If Controller.Lamp(21)=True Then L21.State=1
L22a.State=0
If Controller.Lamp(22)=True Then L22.State=1
End If
End Sub
Sub SolRelayT(Enabled) 'Tilt / GI Switch Down (L1)
If Enabled Then
dim xx
For each xx in GI:xx.State = 0: Next
If LightsMod=0 Then
DarkLevelUpdate 2
For each xx in TubeLights:xx.State = 1: Next
Else
DarkLevelUpdate 3
For each xx in TubeLights:xx.State = 2: Next 'blinking only with LightsMod
For each xx in AlwaysOn:xx.State = 0: Next
End If
If Controller.Switch(43)=True Then PlungerAuto.Fire : SoundPlungerReleaseBall() 'it helps with Bonus Balls
Else
DarkLevelUpdate 0
For each xx in GI:xx.State = 1: Next
For each xx in TubeLights:xx.State = 0: Next
If LightsMod=1 Then
For each xx in AlwaysOn:xx.State = 1: Next
End If
PlaySound SoundFX("fx_relay",DOFContactors)
End If
End Sub
Sub SolBallRelease(Enabled) 'L2
If Enabled Then
If Controller.Switch(43)=True Then PlungerAuto.Fire : SoundPlungerReleaseBall() 'to fire the ball before adding an other one (used only with Bonus Balls)
bsTrough.ExitSol_On
DOF 113,2 ' Added By Outhere
Else
End If
End Sub
Sub SolBallShooter(Enabled) ' L12
If Enabled Then
BallShooter.fire
SoundBallShooterReleaseBall()
DOF 114,2 ' Added By Outhere
Else
End If
End Sub
Sub SolLeftBallGate(Enabled) 'L16
If Enabled Then
LeftBallGate.RotateToEnd : PlaySoundAtVol SoundFX("fx_Flipperup",DOFContactors),LeftBallGate,VolumeDial
Else
LeftBallGate.RotateToStart : PlaySoundAtVol SoundFX("fx_Flipperup",DOFContactors),LeftBallGate,VolumeDial
End If
End Sub
Sub SolRightBallGate(Enabled) 'L17
If Enabled Then
RightBallGate.RotateToEnd : PlaySoundAtVol SoundFX("fx_Flipperup",DOFContactors),RightBallGate,VolumeDial
Else
RightBallGate.RotateToStart : PlaySoundAtVol SoundFX("fx_Flipperup",DOFContactors),RightBallGate,VolumeDial
End If
End Sub
Sub SolKnocker(Enabled)
If enabled Then
KnockerSolenoid 'Add knocker position object
End If
End Sub
'--------------------------
'------ Table Init ------
'--------------------------
Dim bsTrough, bsCenterKicker, bsRightKicker, DTLow, RaiseBallSW, RaiseBall
Sub Table1_Init
vpmInit Me
On Error Resume Next
With Controller
.GameName = cGameName
If Err Then MsgBox "Can't start Game" & cGameName & vbNewLine & Err.Description : Exit Sub
.SplashInfoLine = "Bone Busters Inc."&chr(13)&"Gottlieb 1989"
.HandleMechanics=0
.HandleKeyboard=0
.ShowDMDOnly=1
.ShowFrame=0
.ShowTitle=0
.hidden=0
.Games(cGameName).Settings.Value("rol") = VarRol
On Error Resume Next
Controller.SolMask(0)=0
vpmTimer.AddTimer 2000,"Controller.SolMask(0)=&Hffffffff'" 'ignore all solenoids - then add the timer to renable all the solenoids after 2 seconds
.Run GetPlayerHWnd
If Err Then MsgBox Err.Description
On Error Goto 0
End With
On Error Goto 0
PinMAMETimer.Interval=PinMAMEInterval
PinMAMETimer.Enabled=1
vpmNudge.TiltObj=Array(Bumper,DropTarget00,DropTarget10,DropTarget20,DropTarget30,DropTarget40,FlipperLeft,FlipperLeftUp,FlipperRight,FlipperRightUp)
vpmNudge.TiltSwitch=57
vpmNudge.Sensitivity=2
Set bsTrough=New cvpmBallStack
bsTrough.InitSw 56,0,0,55,0,0,0,0
bsTrough.initkick Kicker55,75,5
'bsTrough.InitExitSnd SoundFX("ballrelease",DOFContactors), SoundFX("Solenoid",DOFContactors)
bsTrough.Balls=3
bsTrough.addball 0
Set bsCenterKicker=New cvpmBallStack
bsCenterKicker.InitSaucer Kicker26,26,220,11
'bsCenterKicker.InitExitSnd SoundFX("Popper",DOFContactors), SoundFX("Solenoid",DOFContactors)
Set bsRightKicker=New cvpmBallStack
bsRightKicker.InitSaucer Kicker36,36,180,5
'bsRightKicker.InitExitSnd SoundFX("Popper",DOFContactors), SoundFX("Solenoid",DOFContactors)
Set DTLow=New cvpmDropTarget
DTLow.InitDrop Array(DropTarget00,DropTarget10,DropTarget20,DropTarget30,DropTarget40),Array(0,10,20,30,40)
DTLow.InitSnd SoundFX("dtdrop",DOFDropTargets), SoundFX("dtreset",DOFDropTargets)
captiveball.CreateBall
captiveball.Kick 0,1
'to enable GI from start
For each xxx in GI:xxx.State = 1: Next
DarkLevelUpdate 0
For each xxx in AlwaysOn : xxx.State=1 : Next
For each xxx in BlinkInserts : xxx.State=2 : Next
If LightsMod=1 Then
For each xxx in BlinkInserts2 : xxx.State=2 : Next
End If
If PrivateMod=1 Then
For each xxx in Walls : xxx.Visible=False : xxx.SideVisible=False : Next
For each xxx in Ramps : xxx.Visible=False : Next
GI015.BulbHaloHeight=54
S6a.BulbHaloHeight=100
Else
For each xxx in PrimitivesMod : xxx.Visible=False : Next
Wall023.Visible=False
End If
End Sub
' Drain hole and kickers
Sub Kicker26_Hit:bsCenterKicker.AddBall 0 : SoundSaucerLock : End Sub
Sub Kicker26_UnHit: SoundSaucerKick 1, Kicker26 : End Sub
Sub Kicker36_Hit:bsRightKicker.AddBall 0 : SoundSaucerLock : End Sub
Sub Kicker36_UnHit: SoundSaucerKick 1, Kicker36 : End Sub
Sub Kicker56_Hit:bsTrough.AddBall 0 : RandomSoundDrain Kicker56 : End Sub
Sub Kicker55_UnHit: SoundPlungerReleaseBall() : End Sub
Sub Kicker46_Hit()
Kicker46.Enabled = False
Controller.switch (46) = True
SoundSaucerLock
End Sub
Sub TopRightKickerTimer_Timer()
If RaiseBallSW = True then
RaiseBall.z = raiseball.z + 10
If RaiseBall.z > 150 Then
Kicker46.Kick 180, 10
SoundSaucerKick 1, Kicker46
Set RaiseBall = Nothing
TopRightKickerTimer.Enabled = False
RaiseBallSW = False
DOF 110,2 ' Added By Outhere
End If
End If
End Sub
'Drop Targets
Sub DropTarget00_dropped:DTLow.Hit 1:End Sub
Sub DropTarget10_dropped:DTLow.Hit 2:End Sub
Sub DropTarget20_dropped:DTLow.Hit 3:End Sub
Sub DropTarget30_dropped:DTLow.Hit 4:End Sub
Sub DropTarget40_dropped:DTLow.Hit 5:End Sub
'Stand Up Target
Sub Target01_Hit:vpmTimer.PulseSw 1:End Sub
Sub Target11_Hit:vpmTimer.PulseSw 11:End Sub
Sub Target21_Hit:vpmTimer.PulseSw 21:End Sub
Sub Target31_Hit:vpmTimer.PulseSw 31:End Sub
Sub Target41_Hit:vpmTimer.PulseSw 41:End Sub
Sub Target51_Hit:vpmTimer.PulseSw 51:End Sub
'Slingshots
Sub sw22_Slingshot:vpmTimer.PulseSw(22) : RandomSoundSlingshotLeft Primitive3 : End Sub
Sub sw23_Slingshot:vpmTimer.PulseSw(23) : RandomSoundSlingshotRight Primitive2 : End Sub
'Star Triggers
Sub SW02_Hit:Controller.Switch(2)=1 : End Sub
Sub SW02_Unhit:Controller.Switch(2)=0:End Sub
Sub SW03_Hit:Controller.Switch(3)=1 : End Sub
Sub SW03_Unhit:Controller.Switch(3)=0:End Sub
Sub SW32_Hit:Controller.Switch(32)=1 : End Sub
Sub SW32_Unhit:Controller.Switch(32)=0:End Sub
Sub SW33_Hit:Controller.Switch(33)=1 : End Sub
Sub SW33_unHit:Controller.Switch(33)=0:End Sub
'Wire Triggers
Sub SW12_Hit:Controller.Switch(12)=1 : End Sub
Sub SW12_Unhit:Controller.Switch(12)=0:End Sub
Sub SW13_Hit:Controller.Switch(13)=1 : End Sub
Sub SW13_Unhit:Controller.Switch(13)=0:End Sub
Sub SW15_Hit:Controller.Switch(15)=1 : End Sub
Sub SW15_Unhit:Controller.Switch(15)=0:End Sub
Sub SW25_Hit:Controller.Switch(25)=1 : ActiveBall.VelY=ActiveBall.VelY/2 : End Sub
Sub SW25_Unhit:Controller.Switch(25)=0:End Sub
Sub SW34_Hit:Controller.Switch(34)=1 : End Sub
Sub SW34_Unhit:Controller.Switch(34)=0:End Sub
Sub SW42_Hit:Controller.Switch(42)=1 : End Sub
Sub SW42_Unhit:Controller.Switch(42)=0:End Sub
Sub SW43_Hit:Controller.Switch(43)=1 : End Sub
Sub SW43_Unhit:Controller.Switch(43)=0:End Sub
'Spinners
Sub Spinner14_Spin:vpmTimer.PulseSw 14:End Sub
Sub Spinner24_Spin:vpmTimer.PulseSw 24:End Sub
'WireRamp Triggers
Sub SW04_Hit:Controller.Switch(4)=1 : PlaySound "wireramp",1, Vol(ActiveBall)*VolumeDial/10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall) : End Sub
Sub SW04_Unhit:Controller.Switch(4)=0:End Sub
Sub UpMetalRampEnd_Hit : StopSound "wireramp" : End Sub
Sub SW05_Hit:Controller.Switch(5)=1 : PlaySound "wireramp",1, Vol(ActiveBall)*VolumeDial/10, AudioPan(ActiveBall), 0, Pitch(ActiveBall), 0, 0, AudioFade(ActiveBall) : End Sub
Sub SW05_Unhit:Controller.Switch(5)=0:End Sub
Sub CenterMetalRampEnd_Hit : StopSound "wireramp" : End Sub
'Scoring Rubber
Sub sw50_hit:vpmTimer.PulseSw(50):End Sub
'Gate Trigger
Sub Gate44_Hit
vpmTimer.PulseSw(44)
If ActiveBall.VelY > 0 Then
ActiveBall.VelY = ActiveBall.VelY/3
End If
End Sub
Sub GateInv_Hit
ActiveBall.VelY = ActiveBall.VelY/3
End Sub
'Bumpers
Sub Bumper_Hit:vpmTimer.PulseSw(52):RandomSoundBumperMiddle Bumper:End Sub
'Gottlieb Bone Busters
'added by Inkochnito
'added coins chute by Mike da Spike
Sub editDips
Dim vpmDips:Set vpmDips=New cvpmDips
With vpmDips
.AddForm 700,400,"Bone Busters - DIP switches"
.AddFrame 2,4,190,"Left Coin Chute (Coins/Credit)",&H0000001F,Array("4/1",&H0000000D,"2/1",&H0000000A,"1/1",&H00000000,"1/2",&H00000010) 'Dip 1-5
.AddFrame 2,80,190,"Right Coin Chute (Coins/Credit)",&H00001F00,Array("4/1",&H00000D00,"2/1",&H00000A00,"1/1",&H00000000,"1/2",&H00001000) 'Dip 9-13
.AddFrame 2,160,190,"Center Coin Chute (Coins/Credit)",&H001F0000,Array("4/1",&H000D0000,"2/1",&H000A0000,"1/1",&H00000000,"1/2",&H00010000) 'Dip 17-21
.AddFrame 2,240,190,"3rd coin chute credits control",&H20000000,Array("no effect",0,"add 9",&H20000000)'dip 30
.AddFrame 207,4,190,"Maximum credits",49152,Array("8 credits",0,"10 credits",32768,"15 credits",&H00004000,"20 credits",49152)'dip 15&16
.AddFrame 207,80,190,"Coin chute 1 and 2 control",&H00002000,Array("seperate",0,"same",&H00002000)'dip 14
.AddFrame 207,126,190,"Playfield special",&H00200000,Array("replay",0,"extra ball",&H00200000)'dip 22
.AddFrame 207,172,190,"High games to date control",&H00000020,Array("no effect",0,"reset high games 2-5 on power off",&H00000020)'dip 6
.AddFrame 207,218,190,"Auto-percentage control",&H00000080,Array("disabled (normal high score mode)",0,"enabled",&H00000080)'dip 8
.AddFrame 207,264,190,"Extra ball && special timing",&H40000000,Array("shorter",0,"longer",&H40000000)'dip 31
.AddChk 207,316,150,Array("Bonus ball feature",&H80000000)'dip 32
.AddFrame 412,4,190,"High game to date awards",&H00C00000,Array("not displayed and no award",0,"displayed and no award",&H00800000,"displayed and 2 replays",&H00400000,"displayed and 3 replays",&H00C00000)'dip 23&24
.AddFrame 412,80,190,"Balls per game",&H01000000,Array("5 balls",0,"3 balls",&H01000000)'dip 25
.AddFrame 412,126,190,"Replay limit",&H04000000,Array("no limit",0,"one per game",&H04000000)'dip 27
.AddFrame 412,172,190,"Novelty",&H08000000,Array("normal",0,"extra ball and replay scores 500K",&H08000000)'dip 28
.AddFrame 412,218,190,"Game mode",&H10000000,Array("replay",0,"extra ball",&H10000000)'dip 29
.AddChk 2,316,100,Array("Match feature",&H02000000)'dip 26
.AddChk 412,316,100,Array("Attract sound",&H00000040)'dip 7
.AddLabel 50,340,300,20,"After hitting OK, press F3 to reset game with new settings."
.ViewDips
End With
End Sub
Set vpmShowDips=GetRef("EditDips")
Dim DarkState : DarkState = 0
Sub DarkLevelUpdate(Level)
Dim Offset
Offset = Level - DarkState
If Offset <> 0 Then
Select Case Level
Case 0
FlasherDark.Opacity = 0
Case 1
FlasherDark.Opacity = 70 * DarkLightShow
Case 2
FlasherDark.Opacity = 80 * DarkLightShow
Case 3
FlasherDark.Opacity = 90 * DarkLightShow
End Select
LightsLevelUpdate Offset, DarklightShow
DarkState = Level
End If
End Sub
Sub LightsLevelUpdate(Offset, Coef)
Dim obj
For each obj in AllFlashers
obj.Opacity = obj.Opacity * 1.3^(Offset*Coef)
Next
For each obj in FlasherLights
obj.Intensity = obj.Intensity * 1.35^(Offset*Coef)
Next
For each obj in GI
obj.Intensity = obj.Intensity * 1.25^(Offset*Coef)
Next
For each obj in AlwaysOn
obj.Intensity = obj.Intensity * 1.3^(Offset*Coef)
Next
For each obj in PFLights
obj.Intensity = obj.Intensity * 1.4^(Offset*Coef)
Next
For each obj in BlinkInserts
obj.Intensity = obj.Intensity * 1.35^(Offset*Coef)
Next
For each obj in BlinkInserts2
obj.Intensity = obj.Intensity * 1.35^(Offset*Coef)
Next
For each obj in TubeLights
obj.Intensity = obj.Intensity * 1.45^(Offset*Coef)
Next
End Sub
'-------------------------------
'------ Keybord Handler ------
'-------------------------------
Sub Table1_KeyDown(ByVal keycode)
If keycode = LeftFlipperKey Then FlipperActivate FlipperLeft, LFPress
If keycode = RightFlipperKey Then FlipperActivate FlipperRight, RFPress
If keycode = LeftTiltKey Then Nudge 90, 5:SoundNudgeLeft()
If keycode = RightTiltKey Then Nudge 270, 5:SoundNudgeRight()
If keycode = CenterTiltKey Then Nudge 0, 3:SoundNudgeCenter()
If DTCheat=1 Then 'cheat for drop targets using BuyIn button (2)
If keycode = KeyFront Then Controller.switch(0)=True:Controller.switch(10)=True:Controller.switch(20)=True:Controller.switch(30)=True:Controller.switch(40)=True
End If
If VisualLock = 0 Then
If keycode = LeftMagnaSave Then
If LutPos = 5 Then LutPos = 0:LightsLevelUpdate -2, 1 Else LutPos = LutPos +1 'Max LUTs number is set to 5; so back to 0 and Lights level reseted for standard LUTs.
If LutPos > 3 Then LightsLevelUpdate 1, 1 'LUTs 4 and 5 are "Medium Dark" and "Dark LUTs" so Lights Level should be updated
Table1.ColorGradeImage = Luts(LutPos)
End If
End If
If keycode = RightMagnaSave Then Controller.Switch(35)=1
If KeyCode = PlungerKey Then Plunger.Pullback:SoundPlungerPull()
If keycode = LeftFlipperKey Then Controller.Switch(53)=1
If UseFlipButton=0 Then
If keycode = RightFlipperKey Then Controller.Switch(45)=1
Else
If keycode = RightFlipperKey Then Controller.Switch(45)=1 : Controller.Switch(35)=1
End If
If keycode = keyInsertCoin1 or keycode = keyInsertCoin2 or keycode = keyInsertCoin3 or keycode = keyInsertCoin4 Then
Select Case Int(rnd*3)
Case 0: PlaySound ("Coin_In_1"), 0, CoinSoundLevel, 0, 0.25
Case 1: PlaySound ("Coin_In_2"), 0, CoinSoundLevel, 0, 0.25
Case 2: PlaySound ("Coin_In_3"), 0, CoinSoundLevel, 0, 0.25
End Select
End If
if keycode=StartGameKey then soundStartButton()
If vpmKeyDown(KeyCode) Then Exit Sub
End Sub
Sub Table1_KeyUp(ByVal keycode)
If keycode = LeftFlipperKey Then FlipperDeActivate FlipperLeft, LFPress
If keycode = RightFlipperKey Then FlipperDeActivate FlipperRight, RFPress
If keycode = PlungerKey Then Plunger.Fire : SoundPlungerReleaseBall()
If keycode = RightMagnaSave Then Controller.Switch(35)=0 'FlipperRightUp.RotateToStart
If keycode = LeftFlipperKey Then Controller.Switch(53)=0
If UseFlipButton=0 Then
If keycode = RightFlipperKey Then Controller.Switch(45)=0
Else
If keycode = RightFlipperKey Then Controller.Switch(45)=0 : Controller.Switch(35)=0
End If
If vpmKeyUp(KeyCode) Then Exit Sub
End Sub
'**********************************************************************************************************
'Digital Display
'**********************************************************************************************************
Dim Digits(40)
Digits(0)=Array(a00, a05, a0c, a0d, a08, a01, a06, a0f, a02, a03, a04, a07, a0b, a0a, a09, a0e)
Digits(1)=Array(a10, a15, a1c, a1d, a18, a11, a16, a1f, a12, a13, a14, a17, a1b, a1a, a19, a1e)
Digits(2)=Array(a20, a25, a2c, a2d, a28, a21, a26, a2f, a22, a23, a24, a27, a2b, a2a, a29, a2e)
Digits(3)=Array(a30, a35, a3c, a3d, a38, a31, a36, a3f, a32, a33, a34, a37, a3b, a3a, a39, a3e)
Digits(4)=Array(a40, a45, a4c, a4d, a48, a41, a46, a4f, a42, a43, a44, a47, a4b, a4a, a49, a4e)
Digits(5)=Array(a50, a55, a5c, a5d, a58, a51, a56, a5f, a52, a53, a54, a57, a5b, a5a, a59, a5e)
Digits(6)=Array(a60, a65, a6c, a6d, a68, a61, a66, a6f, a62, a63, a64, a67, a6b, a6a, a69, a6e)
Digits(7)=Array(a70, a75, a7c, a7d, a78, a71, a76, a7f, a72, a73, a74, a77, a7b, a7a, a79, a7e)
Digits(8)=Array(a80, a85, a8c, a8d, a88, a81, a86, a8f, a82, a83, a84, a87, a8b, a8a, a89, a8e)
Digits(9)=Array(a90, a95, a9c, a9d, a98, a91, a96, a9f, a92, a93, a94, a97, a9b, a9a, a99, a9e)
Digits(10)=Array(aa0, aa5, aac, aad, aa8, aa1, aa6, aaf, aa2, aa3, aa4, aa7, aab, aaa, aa9, aae)
Digits(11)=Array(ab0, ab5, abc, abd, ab8, ab1, ab6, abf, ab2, ab3, ab4, ab7, abb, aba, ab9, abe)
Digits(12)=Array(ac0, ac5, acc, acd, ac8, ac1, ac6, acf, ac2, ac3, ac4, ac7, acb, aca, ac9, ace)
Digits(13)=Array(ad0, ad5, adc, add, ad8, ad1, ad6, adf, ad2, ad3, ad4, ad7, adb, ada, ad9, ade)
Digits(14)=Array(ae0, ae5, aec, aed, ae8, ae1, ae6, aef, ae2, ae3, ae4, ae7, aeb, aea, ae9, aee)
Digits(15)=Array(af0, af5, afc, afd, af8, af1, af6, aff, af2, af3, af4, af7, afb, afa, af9, afe)
Digits(16)=Array(b00, b05, b0c, b0d, b08, b01, b06, b0f, b02, b03, b04, b07, b0b, b0a, b09, b0e)
Digits(17)=Array(b10, b15, b1c, b1d, b18, b11, b16, b1f, b12, b13, b14, b17, b1b, b1a, b19, b1e)
Digits(18)=Array(b20, b25, b2c, b2d, b28, b21, b26, b2f, b22, b23, b24, b27, b2b, b2a, b29, b2e)
Digits(19)=Array(b30, b35, b3c, b3d, b38, b31, b36, b3f, b32, b33, b34, b37, b3b, b3a, b39, b3e)
Digits(20)=Array(b40, b45, b4c, b4d, b48, b41, b46, b4f, b42, b43, b44, b47, b4b, b4a, b49, b4e)
Digits(21)=Array(b50, b55, b5c, b5d, b58, b51, b56, b5f, b52, b53, b54, b57, b5b, b5a, b59, b5e)
Digits(22)=Array(b60, b65, b6c, b6d, b68, b61, b66, b6f, b62, b63, b64, b67, b6b, b6a, b69, b6e)
Digits(23)=Array(b70, b75, b7c, b7d, b78, b71, b76, b7f, b72, b73, b74, b77, b7b, b7a, b79, b7e)
Digits(24)=Array(b80, b85, b8c, b8d, b88, b81, b86, b8f, b82, b83, b84, b87, b8b, b8a, b89, b8e)
Digits(25)=Array(b90, b95, b9c, b9d, b98, b91, b96, b9f, b92, b93, b94, b97, b9b, b9a, b99, b9e)
Digits(26)=Array(ba0, ba5, bac, bad, ba8, ba1, ba6, baf, ba2, ba3, ba4, ba7, bab, baa, ba9, bae)
Digits(27)=Array(bb0, bb5, bbc, bbd, bb8, bb1, bb6, bbf, bb2, bb3, bb4, bb7, bbb, bba, bb9, bbe)
Digits(28)=Array(bc0, bc5, bcc, bcd, bc8, bc1, bc6, bcf, bc2, bc3, bc4, bc7, bcb, bca, bc9, bce)
Digits(29)=Array(bd0, bd5, bdc, bdd, bd8, bd1, bd6, bdf, bd2, bd3, bd4, bd7, bdb, bda, bd9, bde)
Digits(30)=Array(be0, be5, bec, bed, be8, be1, be6, bef, be2, be3, be4, be7, beb, bea, be9, bee)
Digits(31)=Array(bf0, bf5, bfc, bfd, bf8, bf1, bf6, bff, bf2, bf3, bf4, bf7, bfb, bfa, bf9, bfe)
Digits(32)=Array(ac18, ac16, acc1, acd1, ac19, ac17, ac15, acf1, ac11, ac13, ac12, ac14, acb1, aca1, ac10, ace1)
Digits(33)=Array(ad18, ad16, adc1, add1, ad19, ad17, ad15, adf1, ad11, ad13, ad12, ad14, adb1, ada1, ad10, ade1)
Digits(34)=Array(ae18, ae16, aec1, aed1, ae19, ae17, ae15, aef1, ae11, ae13, ae12, ae14, aeb1, aea1, ae10, aee1)
Digits(35)=Array(af18, af16, afc1, afd1, af19, af17, af15, aff1, af11, af13, af12, af14, afb1, afa1, af10, afe1)
Digits(36)=Array(b9, b7, b0c1, b0d1, b100, b8, b6, b0f1, b2, b4, b3, b5, b0b1, b0a1, b1,b0e1)
Digits(37)=Array(b109, b107, b1c1, b1d1, b110, b108, b106, b1f1, b102, b104, b103, b105, b1b1, b1a1, b101,b1e1)
Digits(38)=Array(b119, b117, b2c1, b2d1, b120, b118, b116, b2f1, b112, b114, b113, b115, b2b1, b2a1, b111, b2e1)
Digits(39)=Array(b129, b127, b3c1, b3d1, b130, b128, b126, b3f1, b122, b3b1, b123, b125, b3b1, b3a1, b121, b3e1)
Sub DisplayTimer_Timer
Dim ChgLED, ii, jj, num, chg, stat, obj, b, x
ChgLED=Controller.ChangedLEDs(&Hffffffff, &Hffffffff)
If Not IsEmpty(ChgLED)Then
If Table1.ShowDT = true Then
For ii=0 To UBound(chgLED)
num=chgLED(ii, 0) : chg=chgLED(ii, 1) : stat=chgLED(ii, 2)
if (num < 40) then
For Each obj In Digits(num)
If chg And 1 Then obj.State=stat And 1
chg=chg\2 : stat=stat\2
Next
else
end if
Next
End if
End If
End Sub
'***************************************************
' JP's VP10 Fading Lamps & Flashers
' Based on PD's Fading Light System
' SetLamp 0 is Off
' SetLamp 1 is On
' fading for non opacity objects is 4 steps
'***************************************************
Dim LampState(200), FadingLevel(200)
Dim FlashSpeedUp(200), FlashSpeedDown(200), FlashMin(200), FlashMax(200), FlashLevel(200)
InitLamps() ' turn off the lights and flashers and reset them to the default parameters
LampTimer.Interval = 5 'lamp fading speed
LampTimer.Enabled = 1
' Lamp & Flasher Timers
Sub LampTimer_Timer()
Dim chgLamp, num, chg, ii,loop0
chgLamp = Controller.ChangedLamps
If Not IsEmpty(chgLamp) Then
For ii = 0 To UBound(chgLamp)
LampState(chgLamp(ii, 0) ) = chgLamp(ii, 1) 'keep the real state in an array
FadingLevel(chgLamp(ii, 0) ) = chgLamp(ii, 1) + 4 'actual fading step
'Special Handling
If chgLamp(ii,0) = 0 Then SolRelayQ chgLamp(ii,1) 'InGame Q Relay
If chgLamp(ii,0) = 1 Then SolRelayT chgLamp(ii,1) 'Tilt T Relay
If chgLamp(ii,0) = 2 Then SolBallRelease chgLamp(ii,1)
'If chgLamp(ii,0) = 4 Then SolSound16 chgLamp(ii,1) 'Sound 16?
If chgLamp(ii,0) = 12 Then SolBallShooter chgLamp(ii,1)
If chgLamp(ii,0) = 13 Then SolRelayS chgLamp(ii,1) 'Switching S Relay
'If chgLamp(ii,0) = 14 Then SolRelayA chgLamp(ii,1) 'Playboard Aux Lamp A Relay
If chgLamp(ii,0) = 15 Then SolRelayB chgLamp(ii,1) 'Lightbox Aux Lamp B Relay aka sequentitial light show
If chgLamp(ii,0) = 16 Then SolLeftBallGate chgLamp(ii,1)
If chgLamp(ii,0) = 17 Then SolRightBallGate chgLamp(ii,1)
'If chgLamp(ii,0) = 18 Then SolRelayC chgLamp(ii,1) 'Skull Motor C Relay
'If chgLamp(ii,0) = 19 Then Topper chgLamp(ii,1) ' Skull Jaw Relay
Next
End If
UpdateLamps
End Sub
Sub UpdateLamps()
NFadeL 3, L3
NFadeL 5, L5