-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathFog, The (Gottlieb 1979) v2.5 for 10.7.vbs
3737 lines (3244 loc) · 106 KB
/
Fog, The (Gottlieb 1979) v2.5 for 10.7.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
'/////////////////////////////////////////////////////////
' THE FOG Gottlieb (1979) /
' Created by: HiRez00 /
' /
' /
' Original VPX table: Space Walk by BorgDog /
' /
' Special Thanks to: Rascal, BorgDog, and Loserman76 /
' /
' DOF by Arngrim /
' SSF by Thalamus /
' /
'/////////////////////////////////////////////////////////
Option Explicit
Randomize
'+++++++++++++++++++++++
'+ TABLE NOTES +
'+++++++++++++++++++++++
'
' There and 13 LUT brightness levels built into this table.
' Hold down LEFT MAGNASAVE and then press RIGHT MAGNASAVE to adjust / cycle through the different LUT brightness levels.
' The LUT you choose will be automatically saved when you exit the table.
' While table is active during gameplay, you can change the music track by pressing the RIGHT MAGNASAVE.
' You can press the LEFT MAGNASAVE at any time to TURN OFF the current music track completely.
' You can also use the TABLE OPTIONS below to customize when music tracks will play during the game.
' Hold doown the LEFT FLIPPER for 2-3 seconds to access the table's OPTIONS MENU.
'+++++++++++++++++++++++
'+ TABLE OPTIONS +
'+++++++++++++++++++++++
'--------------------------------------------------------------------------------------------------------------------
MusicOption1 = 1 '1 = Attract Audio ON 0 = Attract Audio OFF
MusicOption2 = 1 '1 = Gameplay Audio ON 0 = Gameplay Audio OFF
MusicOption3 = 1 '1 = Game Over Audio ON 0 = Game Over Audio OFF
'--------------------------------------------------------------------------------------------------------------------
alternateflippers = False 'True enables alternative green flippers, False sets flippers back to factory flippers
'--------------------------------------------------------------------------------------------------------------------
AddBallShadow = 1 '1 = Ball Shadows ON 0 = Ball Shawdows OFF - Turn OFF if using Ambient Occlusion
'--------------------------------------------------------------------------------------------------------------------
AddFlipperShadows = 1 '1 = Flipper Shadows ON 0 = Flipper Shawdows OFF - Turn OFF if using Ambient Occlusion
'--------------------------------------------------------------------------------------------------------------------
EndGameFog = False 'True = Fog Animation at End ON False = Fog Animation at End OFF - Set to FALSE for slow CPUS
'--------------------------------------------------------------------------------------------------------------------
BackGlassBreak = True 'True = Glass Break Effect on B2S Backglass ON False = Glass Break Effect on B2S Backglass OFF
'--------------------------------------------------------------------------------------------------------------------
'----- Phsyics Mods -----
Const RubberizerEnabled = 0 '0 = normal flip rubber, 1 = more lively rubber for flips, 2 = a different rubberizer
Const FlipperCoilRampupMode = 0 '0 = fast, 1 = medium, 2 = slow (tap passes should work)
Const TargetBouncerEnabled = 1 '0 = normal standup targets, 1 = bouncy targets, 2 = orig TargetBouncer
Const TargetBouncerFactor = 1 'Level of bounces. Recommmended value of 0.7 when TargetBouncerEnabled=1, and 1.1 when TargetBouncerEnabled=2
'+++++++++++++++++++++++
'+ END TABLE OPTIONS +
'+++++++++++++++++++++++
' Thalamus 2018-07-24
' Added/Updated "Positional Sound Playback Functions" and "Supporting Ball & Sound Functions"
' Thalamus 2018-11-01 : Improved directional sounds
' !! NOTE : Table not verified yet !!
' Options
' Volume devided by - lower gets higher sound
Const VolDiv = 2000 ' Lower number, louder ballrolling/collition sound
Const VolCol = 10 ' Ball collition divider ( voldiv/volcol )
' The rest of the values are multipliers
'
' .5 = lower volume
' 1.5 = higher volume
Const VolBump = 2 ' Bumpers volume.
Const VolGates = 1 ' Gates volume.
Const VolMetal = 1 ' Metals volume.
Const VolRH = 1 ' Rubber hits volume.
Const VolPo = 1 ' Rubber posts volume.
Const VolPi = 1 ' Rubber pins volume.
Const VolTarg = 1 ' Targets volume.
Const VolKick = 1 ' Kicker volume.
Const VolSpin = 1.5 ' Spinners volume.
Const VolFlip = 1 ' Flipper volume.
Const cGameName = "the_fog_1979"
Const Ballsize = 50
'Const Ballmass = 1
Const HSFileName="The_Fog_1979.txt"
dim award
Dim balls
Dim ebcount
Dim credit, freeplay
Dim score(2)
Dim sreels(2)
Dim player, players, maxplayers
Dim Add10, Add100, Add1000
Dim state
Dim tilt, tiltsens
Dim Replay1Table(3)
Dim Replay2Table(3)
Dim Replay3Table(3)
dim replay1, replay2, replay3, replays
dim hisc, hiscstate, showhisc
Dim bumperlitscore
Dim bumperoffscore
Dim Bonus, dbonus
Dim Bonuslight(19)
Dim ballinplay
Dim matchnumb
dim plungeball
dim tflash
dim eflash
dim fivek
Dim rep(2)
Dim eg
Dim starstate
Dim abonus(2,4)
Dim OperatorMenu, options, objekt
Dim i,j,e,t,a,light
Dim alternateflippers
Dim AddBallShadow
Dim AddFlipperShadows
Dim MusicOption1
Dim MusicOption2
Dim MusicOption3
Dim EndGameFog
Dim BackGlassBreak
Dim FileObj
Dim ScoreFile
Dim TextStr,TextStr2
Dim TargetIsDropped(15)
On Error Resume Next
ExecuteGlobal GetTextFile("controller.vbs")
If Err Then MsgBox "Can't open controller.vbs"
On Error Goto 0
Sub Table1_Init()
LoadEM
If MusicOption1 = 1 then AttractMusic: End If
maxplayers=2
Replay1Table(1)=90000
Replay1Table(2)=120000
Replay1Table(3)=140000
Replay2Table(1)=120000
Replay2Table(2)=140000
Replay2Table(3)=180000
Replay3Table(1)=150000
Replay3Table(2)=180000
Replay3Table(3)=200000
set sreels(1) = ScoreReel1
set sreels(2) = ScoreReel2
set abonus(1,1)=ABonus1
set abonus(1,2)=ABonus2
set abonus(1,3)=ABonus3
set abonus(1,4)=ABonus4
set abonus(2,1)=ABonus4
set abonus(2,2)=ABonus3
set abonus(2,3)=ABonus2
set abonus(2,4)=ABonus1
set bonuslight(1)=bonus1
set bonuslight(2)=bonus2
set bonuslight(3)=bonus3
set bonuslight(4)=bonus4
set bonuslight(5)=bonus5
set bonuslight(6)=bonus6
set bonuslight(7)=bonus7
set bonuslight(8)=bonus8
set bonuslight(9)=bonus9
set bonuslight(10)=bonus10
set bonuslight(11)=bonus11
set bonuslight(12)=bonus12
set bonuslight(13)=bonus13
set bonuslight(14)=bonus14
set bonuslight(15)=bonus15
set bonuslight(16)=bonus16
set bonuslight(17)=bonus17
set bonuslight(18)=bonus18
set bonuslight(19)=bonus19
turnoff
hideoptions
credit=0
hisc=150000
matchnumb=5
score(1)=000000
score(2)=000000
replays=2
balls=5
freeplay=0
HSA1=8
HSA2=18
HSA3=26
showhisc=1
loadhs
bipreel.setvalue 0
creditreel.setvalue credit
Replay1=Replay1Table(Replays)
Replay2=Replay2Table(Replays)
Replay3=Replay3Table(Replays)
player=1
plungeball=0
if balls=3 then
bumperlitscore=1000
bumperoffscore=1000
InstCard.image="InstCard3balls"
else
bumperlitscore=100
bumperoffscore=100
InstCard.image="InstCard5balls"
end if
OptionBalls.imageA="OptionsBalls"&Balls
OptionReplays.imageA="OptionsReplays"&replays
OptionFreeplay.imageA="OptionsFreeplay"&freeplay
OptionShowhisc.imageA="OptionsYN"&showhisc
RepCard.image = "ReplayCard"&replays
If showhisc=0 then
for each objekt in hiscStuff: objekt.visible = 0: next
else
UpdatePostIt
end if
If B2SOn then
'for each objekt in backdropstuff : objekt.visible = 0 : next
Else
'for each objekt in backdropstuff : objekt.visible = 1 : next
End If
scorereel1.setvalue(score(1))
scorereel2.setvalue(score(2))
tilt=false
startGame.enabled=true
Drain.CreateBall
dim j : for j = 0 to 15
TargetIsDropped(j) = false
next
LoadLUT
End Sub
'*************
' JP'S LUT
'*************
Dim bLutActive, LUTImage
Dim x
Sub LoadLUT
bLutActive = False
x = LoadValue(cGameName, "LUTImage")
If(x <> "") Then LUTImage = x Else LUTImage = 0
UpdateLUT
End Sub
Sub SaveLUT
SaveValue cGameName, "LUTImage", LUTImage
End Sub
Sub NextLUT: LUTImage = (LUTImage +1 ) MOD 13: UpdateLUT: SaveLUT: End Sub
Sub UpdateLUT
Select Case LutImage
Case 0: Table1.ColorGradeImage = "LUT0"
Case 1: Table1.ColorGradeImage = "LUT1"
Case 2: Table1.ColorGradeImage = "LUT2"
Case 3: Table1.ColorGradeImage = "LUT3"
Case 4: Table1.ColorGradeImage = "LUT4"
Case 5: Table1.ColorGradeImage = "LUT5"
Case 6: Table1.ColorGradeImage = "LUT6"
Case 7: Table1.ColorGradeImage = "LUT7"
Case 8: Table1.ColorGradeImage = "LUT8"
Case 9: Table1.ColorGradeImage = "LUT9"
Case 10: Table1.ColorGradeImage = "LUT10"
Case 11: Table1.ColorGradeImage = "LUT11"
Case 12: Table1.ColorGradeImage = "LUT12"
End Select
End Sub
sub startGame_timer
playsound "poweron"
lightdelay.enabled=true
me.enabled=false
end sub
sub lightdelay_timer
If credit > 0 or freeplay=1 Then DOF 121, DOFOn
for i = 1 to maxplayers
if score(i)>99999 then EVAL("p100k"&i).setvalue 1 'int(score(i)/100000)
next
gamov.text="Game Over"
gamov.timerenabled=1
tilttxt.timerenabled=1
For each light in GIlights:light.state=1:Next
bumperpulse.Enabled= True 'TURN ON BUMPERPULSE TIMER FOR FADING FLASHER EFFECT ON BUMPER, SEE SCRIPT NEAR BOTTOM - RASCAL
BumperLight1.state=1
if matchnumb=0 then
matchtxt.text="00"
else
matchtxt.text=matchnumb*10
end if
if B2SOn then
for i = 1 to 2
Controller.B2SSetScorePlayer i, Score(i) MOD 100000
if score(i)>99999 then Controller.B2SSetScoreRollover 24+i, 1
next
Controller.B2SSetData 6,1
Controller.B2ssetCredits Credit
Controller.B2ssetMatch 34, Matchnumb*10
Controller.B2SSetGameOver 35,1
end if
me.enabled=0
end Sub
sub gamov_timer
if state=false then
If B2SOn then Controller.B2SSetGameOver 35,0
gamov.text=""
gtimer.enabled=true
end if
gamov.timerenabled=0
end sub
sub gtimer_timer
if state=false then
gamov.text="Game Over"
If B2SOn then Controller.B2SSetGameOver 35,1
gamov.timerenabled=1
gamov.timerinterval= (INT (RND*10)+5)*100
end if
me.enabled=0
end sub
sub tilttxt_timer
if state=false then
tilttxt.text=""
If B2SOn then Controller.B2SSetTilt 33,0
ttimer.enabled=true
end if
tilttxt.timerenabled=0
end sub
sub ttimer_timer
if state=false then
tilttxt.text="TILT"
If B2SOn then Controller.B2SSetTilt 33,1
tilttxt.timerenabled=1
tilttxt.timerinterval= (INT (RND*10)+5)*100
end if
me.enabled=0
end sub
Sub Table1_KeyDown(ByVal keycode)
if keycode=AddCreditKey then
playsoundAtVol "coin3", drain, 1
coindelay.enabled=true
end if
If keycode = LeftMagnaSave Then bLutActive = True: EndMusic
If keycode = RightMagnaSave Then
If bLutActive Then NextLUT: End If
If bLutActive = False and state=true Then NextTrack: End If
If bLutActive = False and state=false and eg=1 and EndDelay3.Enabled = False Then OutroMusic: End If
End If
if keycode=StartGameKey and EndDelay3.Enabled = False and (credit>0 or freeplay=1) And Not HSEnterMode=true and FogFlasher.Visible = False and startGame.enabled=0 and lightdelay.enabled=0 then
if state=false then
state=true
if freeplay=0 then credit=credit-1
If credit < 1 and freeplay=0 Then DOF 121, DOFOff
if freeplay=0 then creditreel.setvalue credit
ballinplay=1
If B2SOn Then
Controller.B2SSetData 88,0
Controller.B2SSetData 80,0
Controller.B2SSetData 81,0
Controller.B2ssetCredits Credit
Controller.B2sStartAnimation "Startup"
Controller.B2ssetballinplay 32, Ballinplay
Controller.B2ssetplayerup 30, 1
Controller.B2SSetData 80,1
Controller.B2SSetData 85,1
Controller.B2ssetcanplay 31, 1
Controller.B2SSetGameOver 0
End If
Pup1.setvalue(1)
tilt=false
playsound "initialize"
players=1
EndMusic
NextTrack
canplayreel.setvalue(players)
newgame.enabled=true
else if state=true and players < 2 and Ballinplay=1 then
if freeplay=0 then credit=credit-1
If credit < 0 and freeplay=0 Then DOF 121, DOFOff
players=players+1
if freeplay=0 then creditreel.setvalue credit
If B2SOn then
Controller.B2ssetCredits Credit
Controller.B2ssetcanplay 31, 2
End If
canplayreel.setvalue(players)
playsound "click"
end if
end if
end if
If HSEnterMode Then HighScoreProcessKey(keycode)
If keycode = PlungerKey Then
Plunger.PullBack
PlaySoundAtVol "plungerpull", plunger, 1
End If
If keycode=LeftFlipperKey and State = false and OperatorMenu=0 And Not HSEnterMode=true then
OperatorMenuTimer.Enabled = true
end if
If keycode=LeftFlipperKey and State = false and OperatorMenu=1 then
Options=Options+1
If Options=6 then Options=1
playsound "drop1"
Select Case (Options)
Case 1:
Option1.visible=true
Option5.visible=False
Case 2:
Option2.visible=true
Option1.visible=False
Case 3:
Option3.visible=true
Option2.visible=False
Case 4:
Option4.visible=true
Option3.visible=False
Case 5:
Option5.visible=true
Option4.visible=False
End Select
end if
If keycode=RightFlipperKey and State = false and OperatorMenu=1 then
PlaySound "cluper"
Select Case (Options)
Case 1:
if Balls=3 then
Balls=5
InstCard.image="InstCard5balls"
else
Balls=3
InstCard.image="InstCard3balls"
end if
OptionBalls.imageA = "OptionsBalls"&Balls
Case 2:
if Freeplay=0 then
Freeplay=1
else
Freeplay=0
end if
OptionFreeplay.imageA = "OptionsFreeplay"&freeplay
Case 3:
if showhisc=0 then
showhisc=1
for each objekt in hiscStuff: objekt.visible = 1: next
UpdatePostIt
else
for each objekt in hiscStuff: objekt.visible = 0: next
showhisc=0
end if
OptionShowhisc.imageA = "OptionsYN"&showhisc
Case 4:
Replays=Replays+1
if Replays>3 then
Replays=1
end if
Replay1=Replay1Table(Replays)
Replay2=Replay2Table(Replays)
Replay3=Replay3Table(Replays)
OptionReplays.imageA = "OptionsReplays"&replays
repcard.image = "replaycard"&replays
Case 5:
OperatorMenu=0
savehs
HideOptions
End Select
End If
if tilt=false and state=true then
If keycode = LeftFlipperKey Then
' LeftFlipper.RotateToEnd
' LeftFlipper1.RotateToEnd
FlipperActivate LeftFlipper, LFPress
SolLFlipper True
if state=true then TLLFlip.state=1
PlaySoundAtVol SoundFXDOF("flipperup",101,DOFOn,DOFFlippers), LeftFlipper, VolFlip
PlaySoundAtVol "flipperup", LeftFlipper1, VolFlip
PlaySoundAtVol "Buzz", LeftFlipper, VolFlip
PlaySoundAtVol "Buzz", LeftFlipper1, VolFlip
End If
If keycode = RightFlipperKey Then
' RightFlipper.RotateToEnd
' RightFlipper1.RotateToEnd
FlipperActivate RightFlipper, RFPress
SolRFlipper True
if state=true then TLRFlip.state=1
PlaySoundAtVol SoundFXDOF("flipperup",102, DOFOn, DOFFlippers), RightFlipper, VolFlip
PlaySoundAtVol "flipperup", RightFlipper1, VolFlip
PlaySoundAtVol "Buzz1", RightFlipper, VolFlip
PlaySoundAtVol "Buzz1", RightFlipper1, VolFlip
End If
If keycode = LeftTiltKey Then
Nudge 90, 2
checktilt
End If
If keycode = RightTiltKey Then
Nudge 270, 2
checktilt
End If
If keycode = CenterTiltKey Then
Nudge 0, 2
checktilt
End If
If keycode = MechanicalTilt Then
gametilted
End If
end if
End Sub
Sub OperatorMenuTimer_Timer
OperatorMenu=1
Displayoptions
Options=1
End Sub
Sub DisplayOptions
OptionsBack.visible = true
Option1.visible = True
OptionBalls.visible = True
OptionReplays.visible = True
OptionFreeplay.visible = True
OptionShowhisc.visible = true
End Sub
Sub HideOptions
for each objekt In OptionMenu
objekt.visible = false
next
End Sub
Sub Table1_KeyUp(ByVal keycode)
If keycode = PlungerKey Then
Plunger.Fire
if PlungeBall=1 then
playsoundAtVol "plunger",plunger,1
else
playsoundAtVol "plungerreleasefree",plunger,1
end if
End If
If keycode = LeftMagnaSave Then bLutActive = False
if keycode = LeftFlipperKey then
OperatorMenuTimer.Enabled = false
end if
if tilt=false and state=true then
If keycode = LeftFlipperKey Then
' LeftFlipper.RotateToStart
' LeftFlipper1.RotateToStart
FlipperDeActivate LeftFlipper, LFPress
SolLFlipper False
TLLFlip.state=0
PlaySoundAtVol SoundFXDOF("flipperdown", 101, DOFOff, DOFContactors),LeftFlipper, VolFlip
PlaySoundAtVol "flipperdown",LeftFlipper1, VolFlip
StopSound "Buzz"
End If
If keycode = RightFlipperKey Then
' RightFlipper.RotateToStart
' RightFlipper1.RotateToStart
FlipperDeActivate RightFlipper, RFPress
SolRFlipper False
TLRFlip.state=0
PlaySoundAtVol SoundFXDOF("flipperdown", 102, DOFOff, DOFContactors), RightFlipper, VolFlip
PlaySoundAtVol "flipperdown", RightFlipper, VolFlip
StopSound "Buzz1"
End If
end if
End Sub
'*******************************************
' Flippers
'*******************************************
Const ReflipAngle = 20
' Flipper Solenoid Callbacks (these subs mimics how you would handle flippers in ROM based tables)
Sub SolLFlipper(Enabled)
If Enabled Then
LF.Fire 'leftflipper.rotatetoend
LeftFlipper1.RotateToEnd
' If leftflipper.currentangle < leftflipper.endangle + ReflipAngle Then
' RandomSoundReflipUpLeft LeftFlipper
' Else
' SoundFlipperUpAttackLeft LeftFlipper
' RandomSoundFlipperUpLeft LeftFlipper
' End If
Else
LeftFlipper.RotateToStart
LeftFlipper1.RotateToStart
' If LeftFlipper.currentangle < LeftFlipper.startAngle - 5 Then
' RandomSoundFlipperDownLeft LeftFlipper
' End If
' FlipperLeftHitParm = FlipperUpSoundLevel
End If
End Sub
Sub SolRFlipper(Enabled)
If Enabled Then
RF.Fire 'rightflipper.rotatetoend
RightFlipper1.RotateToEnd
' If rightflipper.currentangle > rightflipper.endangle - ReflipAngle Then
' RandomSoundReflipUpRight RightFlipper
' Else
' SoundFlipperUpAttackRight RightFlipper
' RandomSoundFlipperUpRight RightFlipper
' End If
Else
RightFlipper.RotateToStart
RightFlipper1.RotateToStart
' If RightFlipper.currentangle > RightFlipper.startAngle + 5 Then
' RandomSoundFlipperDownRight RightFlipper
' End If
' FlipperRightHitParm = FlipperUpSoundLevel
End If
End Sub
'****************************************
'* Attract Mod: HiRez00 *
'****************************************
Sub AttractMusic
If MusicOption1 = 1 then
Dim t
t = INT(3 * RND(1) )
If t = 0 then PlayMusic"fog/tf-attract_01.mp3" End If
If t = 1 then PlayMusic"fog/tf-attract_02.mp3" End If
If t = 2 then PlayMusic"fog/tf-attract_03.mp3" End If
End If
End Sub
'**************************************
'* Music Mod: HiRez00 *
'**************************************
Dim musicNum
Sub NextTrack
If MusicOption2 = 1 then
If musicNum = 0 Then PlayMusic "fog/tf-pl-reel-9-2.mp3" End If
If musicNum = 1 Then PlayMusic "fog/tf-pl-antonio-bay.mp3" End If
If musicNum = 2 Then PlayMusic "fog/tf-pl-seagrass.mp3" End If
If musicNum = 3 Then PlayMusic "fog/tf-pl-ghost-ship.mp3" End If
If musicNum = 4 Then PlayMusic "fog/tf-pl-journal.mp3" End If
If musicNum = 5 Then PlayMusic "fog/tf-pl-ghost-story.mp3" End If
If musicNum = 6 Then PlayMusic "fog/tf-pl-lighthouse.mp3" End If
If musicNum = 7 Then PlayMusic "fog/tf-pl-reel-9-1.mp3" End If
If musicNum = 8 Then PlayMusic "fog/tf-pl-blake.mp3" End If
If musicNum = 09 Then PlayMusic "fog/tf-pl-dane.mp3" End If
If musicNum = 10 Then PlayMusic "fog/tf-pl-trouble.mp3" End If
If musicNum = 11 Then PlayMusic "fog/tf-pl-revenge.mp3" End If
If musicNum = 12 Then PlayMusic "fog/tf-pl-fog-reprise.mp3" End If
If musicNum = 13 Then PlayMusic "fog/tf-pl-fog.mp3" End If
musicNum = (musicNum + 1) mod 14
End If
End Sub
Sub Table1_MusicDone
If state=false Then
OutroMusic
Else
NextTrack
End If
End Sub
'**************************************************************
'* Outro Mod + Non-Repeat Randomizer: HiRez00 *
'**************************************************************
Sub OutroMusic
If MusicOption3 = 1 then
Dim m
Dim OldMusic
m = INT(8 * RND(1) )
If m = (OldMusic) then OutroMusic: End If
If m = 0 then PlayMusic"fog/tf-game-over-1.mp3": OldMusic = (m): End If
If m = 1 then PlayMusic"fog/tf-game-over-2.mp3": OldMusic = (m): End If
If m = 2 then PlayMusic"fog/tf-game-over-3.mp3": OldMusic = (m): End If
If m = 3 then PlayMusic"fog/tf-game-over-4.mp3": OldMusic = (m): End If
If m = 4 then PlayMusic"fog/tf-game-over-5.mp3": OldMusic = (m): End If
If m = 5 then PlayMusic"fog/tf-game-over-6.mp3": OldMusic = (m): End If
If m = 6 then PlayMusic"fog/tf-game-over-7.mp3": OldMusic = (m): End If
If m = 7 then PlayMusic"fog/tf-game-over-8.mp3": OldMusic = (m): End If
End If
End Sub
sub newgame_timer
bumper1.hashitevent=1
fivek=0
player=1
pup1.setvalue(1)
scorereel1.resettozero
scorereel2.resettozero
for i = 1 to maxplayers
score(i)=0
rep(i)=0
EVAL("p100k"&i).setvalue 0
next
ebcount=0
If B2SOn then
Controller.B2SSetScore 1, score(1)
Controller.B2SSetScore 2, score(2)
Controller.B2SSetData 3,0
Controller.B2SSetData 4,0
Controller.B2SSetScoreRollover 25, 0
Controller.B2SSetScoreRollover 26, 0
End If
eg=0
gamov.text=" "
tilttxt.text=" "
If B2SOn then
Controller.B2SSetGameOver 35,0
Controller.B2SSetTilt 33,0
Controller.B2SSetMatch 34,0
Controller.B2ssetdata 11, 0
Controller.B2ssetdata 7,0
Controller.B2ssetdata 8,0
End If
bipreel.setvalue 1
matchtxt.text=" "
me.enabled=false
ballreltimer.enabled=true
end sub
sub nextball
if tilt=true then
bumper1.hashitevent=1
tilt=false
tilttxt.text=" "
If B2SOn then
Controller.B2SSetTilt 33,0
Controller.B2ssetdata 1, 1
End If
end if
if player=1 then ballinplay=ballinplay+1
if ballinplay>balls then
playsound "endgame"
eg=1
If EndGameFog = True Then
EndDelay1.Enabled = True
EndDelay2.Enabled = True
EndDelay3.Enabled = True
FogRandomSfx
Else
EndDelay1.Enabled = False
EndDelay2.Enabled = False
EndDelay3.Enabled = False
End If
ballreltimer.enabled=true
else
if state=true and tilt=false then
ebcount=0
ballreltimer.enabled=true
end if
bipreel.setvalue ballinplay
If B2SOn then Controller.B2ssetballinplay 32, Ballinplay
end if
End Sub
sub ballreltimer_timer
for each light in bonuslights: light.state=0: next
if eg=1 then
turnoff
matchnum
bipreel.setvalue 0
state=false
gamov.text="GAME OVER"
gamov.timerenabled=1
tilttxt.timerenabled=1
canplayreel.setvalue(0)
pup1.setvalue(0)
pup2.setvalue(0)
hiscstate=0
for i=1 to maxplayers
if score(i)>hisc then
hisc=score(i)
hiscstate=1
end if
EVAL("Pup"&i).setvalue 0
next
if hiscstate=1 and showhisc=1 then
HighScoreEntryInit()
UpdatePostIt
savehs
end if
If B2SOn then
Controller.B2SSetGameOver 35,1
Controller.B2ssetballinplay 32, 0
Controller.B2sStartAnimation "EOGame"
Controller.B2ssetcanplay 31, 0
Controller.B2ssetplayerup 30, 0
Controller.B2SSetData 80,0
Controller.B2SSetData 81,0
Controller.B2SSetData 85,0
If BackGlassBreak = True Then
Controller.B2SSetData 88,1
PlaySound "Glass-Break"
End If
End If
ballreltimer.enabled=false
EndMusic
If EndGameFog = False Then
OutroMusic
End If
else
L5k.state=0
L1k.state=0
LTrigLStar.state=0
Special.state=0
shootagain.state=0
ExtraBall.state=0
bonus=0
starstate=0
BumperLight1.State=1
resetDT.enabled=1
for i = 1 to 4
abonus(1,i).state=0
next
if ballinplay=balls then bonusx2.state=1
playsoundAtVol "drainkick", drain, 1
Drain.kick 60,45,0
DOF 118, 2
ballreltimer.enabled=false
end if
end sub
sub matchnum
matchnumb=INT (RND*10)
if matchnumb=0 then
matchtxt.text="00"
else
matchtxt.text=matchnumb*10
end if
If B2SOn then Controller.B2SSetMatch 34,Matchnumb*10
For i=1 to players
if (matchnumb*10)=(score(i) mod 100) then
addcredit
playsound SoundFXDOF("knocker", 117, DOFPulse, DOFKnocker)
DOF 116, DOFPulse
end if
next
end sub
sub flippertimer_timer()
LFlip.RotY = LeftFlipper.CurrentAngle
LFlip1.RotY = LeftFlipper.CurrentAngle-90
RFlip.RotY = RightFlipper.CurrentAngle
RFlip1.RotY = RightFlipper.CurrentAngle-90
FlipperLSh.RotZ = LeftFlipper.currentangle
FlipperRSh.RotZ = RightFlipper.currentangle
PGate.Rotz = (gate1.CurrentAngle*.75) + 25
BumperLightA1.state=bumperlight1.state
Special1.state = Special.state
L5k1.state = L5k.state
L5k2.state = L5k.state
L5k3.state = L5k.state
L5k4.state = L5k.state
L5k5.state = L5k.state
L1k1.state = L1k.state
LTrigRStar.state = LTrigLStar.state
end sub
sub coindelay_timer
addcredit
coindelay.enabled=false
end sub
Sub UpperKicker_Hit
addscore 500
addbonus
if extraball.state=1 then
playsound "ding1",0,.5
if ebcount=0 then
shootagain.state=lightstateon
extraball.state=0
ebcount=1
If B2SOn then Controller.B2SSetShootAgain 36,1
end if
end if
me.uservalue=1
me.timerenabled=1
End Sub
Sub UpperKicker_timer
select case UpperKicker.uservalue
case 4:
UpperKicker.Kick 173, 15
PlaySoundAtVol SoundFXDOF("holekick",115,DOFPulse,DOFContactors), UpperKicker, VolKick
DOF 116, DOFPulse
Pkickarm.rotz=15
case 6:
Pkickarm.rotz=0
me.timerenabled=0
end Select
Upperkicker.uservalue=Upperkicker.uservalue+1
End Sub
Sub Drain_Hit()
PlaySoundAtVol "drain", drain, 1
DOF 119, DOFPulse
if l5k.state=1 then
fivek=1
else
fivek=0
end if
if bonusx3.state=1 then
dbonus=3
elseif bonusx2.state=1 then
dbonus=2
else
dbonus=1
end if
bonus=bonus*dbonus
scorebonus.enabled=1
End Sub
sub ballhome_hit
plungeball=1
shootagain.state=lightstateoff
If B2SOn then Controller.B2SSetShootAgain 36,0
end sub
sub ballhome_unhit
DOF 120, DOFPulse
plungeball=0
end sub
sub scorebonus_timer
if tilt=true then bonus=0
'Else
if bonus>0 then
if bonus/2 = int(bonus/2) then
BumperLight1.State=0
if fivek=1 then
l5k.state=0
end if
else
BumperLight1.State=1
if fivek=1 then
l5k.state=1
end if
end if
if bonus/dbonus = int(bonus/dbonus) then
if bonus/dbonus<19 then bonuslight((bonus/dbonus)+1).state=0
if bonus > dbonus-1 then bonuslight((bonus/dbonus)).state=1
bonus=bonus-1
addpoints 1000
else
bonus=bonus-1
addpoints 1000
end if
else
bonus=0
end if
if bonus=0 then