Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.95 KB | None | 0 0
  1. 'Frontier (Bally 1980) v2.0
  2. ' by bord
  3.  
  4. Option Explicit
  5. Randomize
  6.  
  7. Const cGameName = "frontier"
  8.  
  9. On Error Resume Next
  10. ExecuteGlobal GetTextFile("controller.vbs")
  11. If Err Then MsgBox "Can't open controller.vbs"
  12. On Error Goto 0
  13.  
  14. LoadVPM "01000100", "Bally.VBS", 3.02 'Frontier
  15. Dim DesktopMode: DesktopMode = table1.ShowDT
  16.  
  17. '************************************************
  18. '************************************************
  19. '************************************************
  20. '************************************************
  21. '************************************************
  22. Const UseSolenoids = 2
  23. Const cSingleLFlip = 0
  24. Const cSingleRFlip = 0
  25. Const UseLamps = True
  26. Const UseSync = False
  27.  
  28. ' Standard Sounds
  29. Const SSolenoidOn = "fx_solenoid"
  30. Const SSolenoidOff = "fx_solenoidoff"
  31. Const SCoin = "fx_coin"
  32.  
  33. Dim bsTrough, dtll, dtrr, hiddenvalue
  34.  
  35. If DesktopMode = True Then 'Show Desktop components
  36. CabinetRailLeft.visible=1
  37. CabinetRailRight.visible=1
  38. hiddenvalue=0
  39. Else
  40. CabinetRailLeft.visible=0
  41. CabinetRailRight.visible=0
  42. hiddenvalue=1
  43. End if
  44.  
  45. Sub SolLFlipper(Enabled)
  46. If Enabled Then
  47. PlaySound SoundFX("fx_flipperup",DOFContactors), 0, 1, -0.1, 0.25
  48. LeftFlipper.RotateToEnd
  49. Else
  50. PlaySound SoundFX("fx_flipperdown",DOFContactors), 0, 1, -0.1, 0.25
  51. LeftFlipper.RotateToStart
  52. End If
  53. End Sub
  54.  
  55. Sub SolRFlipper(Enabled)
  56. If Enabled Then
  57. PlaySound SoundFX("fx_flipperup",DOFContactors), 0, 1, 0.1, 0.25
  58. RightFlipper.RotateToEnd
  59. Else
  60. PlaySound SoundFX("fx_flipperdown",DOFContactors), 0, 1, 0.1, 0.25
  61. RightFlipper.RotateToStart
  62. End If
  63. End Sub
  64.  
  65. Sub FlipperTimer_Timer
  66. 'Add flipper, gate and spinner rotations here
  67. LFLogo.RotY = LeftFlipper.CurrentAngle
  68. RFLogo.RotY = RightFlipper.CurrentAngle
  69. End Sub
  70.  
  71. '************************************************
  72. ' Solenoids
  73. '************************************************
  74. SolCallback(1) = "vpmSolSound ""fx_slingshot""," 'sLSling
  75. SolCallback(2) = "vpmSolSound ""fx_slingshot""," 'sRSling
  76. 'SolCallback(3) = ""
  77. 'SolCallback(4) = ""
  78. 'SolCallback(5) = ""
  79. SolCallback(6) = "SolKnocker " 'sKnocker
  80. SolCallback(7) = "bsTrough.SolOut" 'sBallRelease
  81. SolCallback(8) = "SolInlineTargetReset" 'sInlineTargets
  82. SolCallback(9) = "SolRightTargetReset" 'sRightTargets
  83. SolCallback(10) = "SolFrontierSaucer" 'sSaucer
  84. 'SolCallback(11) = "vpmSolSound " 'sLJet
  85. 'SolCallback(12) = "vpmSolSound " 'sRJet
  86. 'SolCallback(13) = "vpmSolSound " 'sDJet
  87. 'SolCallback(14) = ""
  88. 'SolCallback(15) = ""
  89. 'SolCallback(16) = ""
  90. SolCallback(17) = "vpmSolGate Gate2,true," 'sGate
  91. SolCallback(18) = ""
  92. SolCallback(19) = "vpmNudge.SolGameOn" 'sEnable
  93. 'SolCallback(20) = ""
  94.  
  95. SolCallback(sLRFlipper) = "SolRFlipper"
  96. SolCallback(sLLFlipper) = "SolLFlipper"
  97.  
  98.  
  99. Sub Table1_Init
  100. vpmInit Me
  101. With Controller
  102. .GameName = cGameName
  103. If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description:Exit Sub
  104. .SplashInfoLine = ""
  105. .HandleKeyboard = 0
  106. .ShowTitle = 0
  107. .ShowDMDOnly = 1
  108. .ShowFrame = 0
  109. .HandleMechanics = False
  110. .Hidden = hiddenvalue
  111. On Error Resume Next
  112. .Run GetPlayerHWnd
  113. If Err Then MsgBox Err.Description
  114. On Error Goto 0
  115. End With
  116.  
  117. PinMAMETimer.Interval = PinMAMEInterval
  118. PinMAMETimer.Enabled = 1
  119.  
  120. 'Trough
  121.  
  122. Set bsTrough=New cvpmBallStack
  123. with bsTrough
  124. .InitSw 0,8,0,0,0,0,0,0
  125. .InitKick BallRelease,90,7
  126. .InitExitSnd Soundfx("fx_ballrel",DOFContactors), Soundfx("fx_solenoid",DOFContactors)
  127. .Balls=1
  128. end with
  129.  
  130. ' Nudging
  131. vpmNudge.TiltSwitch = 7
  132. vpmNudge.Sensitivity = 3
  133. vpmNudge.TiltObj = Array(leftslingshot, rightslingshot, sw38, sw39, sw40)
  134.  
  135. Set dtLL=New cvpmDropTarget
  136. dtLL.InitDrop Array(sw21,sw22,sw23),Array(21,22,23)
  137. dtLL.InitSnd SoundFX("fx2_droptarget",DOFContactors),SoundFX("fx2_DTReset",DOFContactors)
  138.  
  139. Set dtRR=New cvpmDropTarget
  140. dtRR.InitDrop Array(sw33,sw34,sw35),Array(33,34,35)
  141. dtRR.InitSnd SoundFX("fx2_droptarget2",DOFContactors),SoundFX("fx2_DTReset",DOFContactors)
  142.  
  143. '*****Drop Lights Off
  144. dim xx
  145.  
  146. For each xx in DTLeftLights: xx.state=0:Next
  147. For each xx in DTRightLights: xx.state=0:Next
  148.  
  149. GILights 1
  150.  
  151. End Sub
  152.  
  153. Sub GILights (enabled)
  154. Dim light
  155. For each light in GI:light.State = Enabled: Next
  156. End Sub
  157.  
  158.  
  159. Sub Table1_KeyDown(ByVal keycode)
  160. If keycode = LeftTiltKey Then Nudge 90, 2
  161. If keycode = RightTiltKey Then Nudge 270, 2
  162. If keycode = CenterTiltKey Then Nudge 0, 2
  163.  
  164. If vpmKeyDown(keycode) Then Exit Sub
  165. If keycode = PlungerKey Then Plunger.PullBack: PlaySound "fx_plungerpull",0,1,0.25,0.25: End If
  166. End Sub
  167.  
  168. Sub Table1_KeyUp(ByVal keycode)
  169. If keycode = PlungerKey Then Plunger.Fire: PlaySound "fx_plunger",0,1,0.25,0.25
  170. If vpmKeyUp(keycode) Then Exit Sub
  171.  
  172. End Sub
  173.  
  174. Sub ShooterLane_Hit
  175. End Sub
  176.  
  177. Sub BallRelease_UnHit
  178. End Sub
  179.  
  180. Sub Drain_Hit()
  181. PlaySound "fx2_drain2",0,1,0,0.25 : bstrough.addball me
  182. End Sub
  183.  
  184. Sub sw12_Hit : Controller.Switch(12) = True : PlaySound "fx_hole-enter":End Sub
  185.  
  186.  
  187. Sub SolFrontierSaucer(enabled)
  188. if enabled then
  189. PlaySound "fx_popper"
  190. Controller.Switch(12) = false
  191. sw12.Kick -10, 15 + 5 * Rnd
  192. end if
  193. End Sub
  194.  
  195. 'Drop Targets
  196. Sub Sw21_Dropped:dtLL.Hit 1 : GI_12a.state=1 : End Sub
  197. Sub Sw22_Dropped:dtLL.Hit 2 : GI_12b.state=1 : End Sub
  198. Sub Sw23_Dropped:dtLL.Hit 3 : GI_12c.state=1 : End Sub
  199.  
  200. Sub Sw33_Dropped:dtRR.Hit 1 : GI_14c.state=1 : GI_13c.state=1 : End Sub
  201. Sub Sw34_Dropped:dtRR.Hit 2 : GI_14b.state=1 : GI_13b.state=1 : End Sub
  202. Sub Sw35_Dropped:dtRR.Hit 3 : GI_14a.state=1 : GI_13a.state=1 : End Sub
  203.  
  204. Sub SolRightTargetReset(enabled)
  205. dim xx
  206. if enabled then
  207. dtRR.SolDropUp enabled
  208. For each xx in DTRightLights: xx.state=0:Next
  209. end if
  210. End Sub
  211.  
  212. Sub SolInlineTargetReset(enabled)
  213. dim xx
  214. if enabled then
  215. dtLL.SolDropUp enabled
  216. For each xx in DTLeftLights: xx.state=0:Next
  217. end if
  218. End Sub
  219.  
  220. 'Bumpers
  221.  
  222. Sub sw38_Hit : vpmTimer.PulseSw 38 : playsound SoundFX("fx2_bumper_1",DOFContactors): End Sub
  223. Sub sw39_Hit : vpmTimer.PulseSw 39 : playsound SoundFX("fx2_bumper_2",DOFContactors): End Sub
  224. Sub sw40_Hit : vpmTimer.PulseSw 40 : playsound SoundFX("fx2_bumper_3",DOFContactors): End Sub
  225.  
  226. dim ltopstep, lltopstep, rtopstep, RL2step
  227.  
  228. 'leaf switches
  229. Sub sw1a1_hit
  230. vpmTimer.PulseSw(1)
  231. RubbertopL.Visible = 0
  232. RubbertopL1.Visible = 1
  233. ltopstep = 0
  234. sw1a1.TimerEnabled = 1
  235. End Sub
  236.  
  237. Sub sw1a1_Timer
  238. Select Case ltopstep
  239. Case 3:RubbertopL1.Visible = 0:RubbertopL2.Visible = 1
  240. Case 4:RubbertopL2.Visible = 0:RubbertopL.Visible = 1:sw1a1.TimerEnabled = 0
  241. End Select
  242. ltopstep = ltopstep + 1
  243. End Sub
  244.  
  245. Sub sw1a2_hit
  246. vpmTimer.PulseSw(1)
  247. RubbertopLL.Visible = 0
  248. RubbertopLL1.Visible = 1
  249. lltopstep = 0
  250. sw1a2.TimerEnabled = 1
  251. End Sub
  252.  
  253. Sub sw1a2_Timer
  254. Select Case lltopstep
  255. Case 3:RubbertopLL1.Visible = 0:RubbertopLL2.Visible = 1
  256. Case 4:RubbertopLL2.Visible = 0:RubbertopLL.Visible = 1:sw1a2.TimerEnabled = 0
  257. End Select
  258. lltopstep = lltopstep + 1
  259. End Sub
  260.  
  261. Sub sw1a3_hit
  262. vpmTimer.PulseSw(1)
  263. RubberL2_.Visible = 0
  264. RubberL2_1.Visible = 1
  265. RL2step = 0
  266. sw1a3.TimerEnabled = 1
  267. End Sub
  268.  
  269. Sub sw1a3_Timer
  270. Select Case RL2step
  271. Case 3:RubberL2_1.Visible = 0:RubberL2_2.Visible = 1
  272. Case 4:RubberL2_2.Visible = 0:RubberL2_.Visible = 1:sw1a3.TimerEnabled = 0
  273. End Select
  274. RL2step = RL2step + 1
  275. End Sub
  276.  
  277. Sub sw1a4_hit
  278. vpmTimer.PulseSw(1)
  279. RubbertopR.Visible = 0
  280. RubbertopR1.Visible = 1
  281. rtopstep = 0
  282. sw1a4.TimerEnabled = 1
  283. End Sub
  284.  
  285. Sub sw1a4_Timer
  286. Select Case rtopstep
  287. Case 3:RubbertopR1.Visible = 0:RubbertopR2.Visible = 1
  288. Case 4:RubbertopR2.Visible = 0:RubbertopR.Visible = 1:sw1a4.TimerEnabled = 0
  289. End Select
  290. rtopstep = rtopstep + 1
  291. End Sub
  292.  
  293. 'Wire Triggers
  294. Sub SW2_Hit:Controller.Switch(2)=1 : End Sub 'Right Outlane
  295. Sub SW2_unHit:Controller.Switch(2)=0:End Sub
  296. Sub SW3_Hit:Controller.Switch(3)=1 : End Sub 'Right Inlane
  297. Sub SW3_unHit:Controller.Switch(3)=0:End Sub
  298. Sub SW4_Hit:Controller.Switch(4)=1 : End Sub 'Left Inlane
  299. Sub SW4_unHit:Controller.Switch(4)=0:End Sub
  300. Sub SW5_Hit:Controller.Switch(5)=1 : End Sub 'Left Outlane
  301. Sub SW5_unHit:Controller.Switch(5)=0:End Sub
  302. Sub SW13_Hit:Controller.Switch(13)=1 : End Sub 'A
  303. Sub SW13_unHit:Controller.Switch(13)=0:End Sub
  304. Sub SW14_Hit:Controller.Switch(14)=1 : End Sub 'B
  305. Sub SW14_unHit:Controller.Switch(14)=0:End Sub
  306. Sub SW15_Hit:Controller.Switch(15)=1 : End Sub 'C
  307. Sub SW15_unHit:Controller.Switch(15)=0:End Sub
  308. Sub SW25_Hit:Controller.Switch(25)=1 : End Sub 'Falls
  309. Sub SW25_unHit:Controller.Switch(25)=0:End Sub
  310.  
  311. 'Spinners
  312. Sub sw27_Spin : vpmTimer.PulseSw (27) :PlaySound "fx_spinner": End Sub
  313.  
  314. 'Targets
  315. Sub sw24_Hit:vpmTimer.PulseSw (24):End Sub
  316. Sub sw29_Hit:vpmTimer.PulseSw (29):End Sub
  317. Sub sw30_Hit:vpmTimer.PulseSw (30):End Sub
  318. Sub sw31_Hit:vpmTimer.PulseSw (31):End Sub
  319.  
  320. Sub SolKnocker(Enabled)
  321. If Enabled Then PlaySound SoundFX("Knocker",DOFKnocker)
  322. End Sub
  323.  
  324. '**********Sling Shot Animations
  325. ' Rstep and Lstep are the variables that increment the animation
  326. '****************
  327. Dim RStep, Lstep, RL1step, RL3step, Tdropstep, Bdropstep, rrtopstep, RR2step, RR3step
  328.  
  329. Sub RightSlingShot_Slingshot
  330. PlaySound SoundFX("fx_slingshot",DOFContactors), 0, 1, 0.05, 0.05
  331. vpmtimer.PulseSw(36)
  332. RSling.Visible = 0
  333. RSling1.Visible = 1
  334. sling1.TransZ = -20
  335. RStep = 0
  336. RightSlingShot.TimerEnabled = 1
  337. End Sub
  338.  
  339. Sub RightSlingShot_Timer
  340. Select Case RStep
  341. Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.TransZ = -10
  342. Case 4:RSLing2.Visible = 0:RSLing.Visible = 1:sling1.TransZ = 0:RightSlingShot.TimerEnabled = 0
  343. End Select
  344. RStep = RStep + 1
  345. End Sub
  346.  
  347. Sub LeftSlingShot_Slingshot
  348. PlaySound SoundFX("fx_slingshot",DOFContactors),0,1,-0.05,0.05
  349. vpmtimer.pulsesw(37)
  350. LSling.Visible = 0
  351. LSling1.Visible = 1
  352. sling2.TransZ = -20
  353. LStep = 0
  354. LeftSlingShot.TimerEnabled = 1
  355. End Sub
  356.  
  357. Sub LeftSlingShot_Timer
  358. Select Case LStep
  359. Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.TransZ = -10
  360. Case 4:LSLing2.Visible = 0:LSLing.Visible = 1:sling2.TransZ = 0:LeftSlingShot.TimerEnabled = 0
  361. End Select
  362. LStep = LStep + 1
  363. End Sub
  364.  
  365. Sub RubberL1Sling_hit
  366. RubberL1_.Visible = 0
  367. RubberL1_1.Visible = 1
  368. RL1step = 0
  369. RubberL1Sling.TimerEnabled = 1
  370. End Sub
  371.  
  372. Sub RubberL1Sling_Timer
  373. Select Case RL1step
  374. Case 3:RubberL1_1.Visible = 0:RubberL1_2.Visible = 1
  375. Case 4:RubberL1_2.Visible = 0:RubberL1_.Visible = 1:RubberL1Sling.TimerEnabled = 0
  376. End Select
  377. RL1step = RL1step + 1
  378. End Sub
  379.  
  380. Sub RubberL3Sling_hit
  381. RubberL3_.Visible = 0
  382. RubberL3_1.Visible = 1
  383. RL3step = 0
  384. RubberL3Sling.TimerEnabled = 1
  385. End Sub
  386.  
  387. Sub RubberL3Sling_Timer
  388. Select Case RL3step
  389. Case 3:RubberL3_1.Visible = 0:RubberL3_2.Visible = 1
  390. Case 4:RubberL3_2.Visible = 0:RubberL3_.Visible = 1:RubberL3Sling.TimerEnabled = 0
  391. End Select
  392. RL3step = RL3step + 1
  393. End Sub
  394.  
  395. Sub RubberRRSling_hit
  396. RubberRR.Visible = 0
  397. RubberRR1.Visible = 1
  398. rrtopstep = 0
  399. RubberL3Sling.TimerEnabled = 1
  400. End Sub
  401.  
  402. Sub RubberRRSling_Timer
  403. Select Case rrtopstep
  404. Case 3:RubberRR1.Visible = 0:RubberRR2.Visible = 1
  405. Case 4:RubberRR2.Visible = 0:RubberRR.Visible = 1:RubberRRSling.TimerEnabled = 0
  406. End Select
  407. rrtopstep = rrtopstep + 1
  408. End Sub
  409.  
  410. Sub RubberR2Sling_hit
  411. RubberR3_.Visible = 0
  412. RubberR3_1.Visible = 1
  413. rr2step = 0
  414. RubberR2Sling.TimerEnabled = 1
  415. End Sub
  416.  
  417. Sub RubberR2Sling_Timer
  418. Select Case rr2step
  419. Case 3:RubberR3_1.Visible = 0:RubberR3_2.Visible = 1
  420. Case 4:RubberR3_2.Visible = 0:RubberR3_.Visible = 1:RubberR2Sling.TimerEnabled = 0
  421. End Select
  422. rr2step = rr2step + 1
  423. End Sub
  424.  
  425. Sub RubberR3Sling_hit
  426. RubberR3_.Visible = 0
  427. RubberR3_3.Visible = 1
  428. rr3step = 0
  429. RubberR3Sling.TimerEnabled = 1
  430. End Sub
  431.  
  432. Sub RubberR3Sling_Timer
  433. Select Case rr2step
  434. Case 3:RubberR3_3.Visible = 0:RubberR3_4.Visible = 1
  435. Case 4:RubberR3_4.Visible = 0:RubberR3_.Visible = 1:RubberR3Sling.TimerEnabled = 0
  436. End Select
  437. rr3step = rr3step + 1
  438. End Sub
  439.  
  440. Sub TDropSling_hit
  441. RubberDrop.Visible = 0
  442. RubberDrop1.Visible = 1
  443. tdropstep = 0
  444. TDropSling.TimerEnabled = 1
  445. End Sub
  446.  
  447. Sub TDropSling_Timer
  448. Select Case tdropstep
  449. Case 3:RubberDrop1.Visible = 0:RubberDrop2.Visible = 1
  450. Case 4:RubberDrop2.Visible = 0:RubberDrop.Visible = 1:TDropSling.TimerEnabled = 0
  451. End Select
  452. tdropstep = tdropstep + 1
  453. End Sub
  454.  
  455. Sub BDropSling_hit
  456. RubberDrop.Visible = 0
  457. RubberDrop3.Visible = 1
  458. bdropstep = 0
  459. BDropSling.TimerEnabled = 1
  460. End Sub
  461.  
  462. Sub BDropSling_Timer
  463. Select Case bdropstep
  464. Case 3:RubberDrop3.Visible = 0:RubberDrop4.Visible = 1
  465. Case 4:RubberDrop4.Visible = 0:RubberDrop.Visible = 1:BDropSling.TimerEnabled = 0
  466. End Select
  467. bdropstep = bdropstep + 1
  468. End Sub
  469.  
  470. ' *********************************************************************
  471. ' Supporting Ball & Sound Functions
  472. ' *********************************************************************
  473.  
  474. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  475. Vol = Csng(BallVel(ball) ^2 / 1000)
  476. End Function
  477.  
  478. Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
  479. Dim tmp
  480. tmp = ball.x * 2 / table1.width-1
  481. If tmp > 0 Then
  482. Pan = Csng(tmp ^10)
  483. Else
  484. Pan = Csng(-((- tmp) ^10) )
  485. End If
  486. End Function
  487.  
  488. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  489. Pitch = BallVel(ball) * 20
  490. End Function
  491.  
  492. Function BallVel(ball) 'Calculates the ball speed
  493. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  494. End Function
  495.  
  496. '*****************************************
  497. ' JP's VP10 Rolling Sounds
  498. '*****************************************
  499.  
  500. Const tnob = 20 ' total number of balls
  501. ReDim rolling(tnob)
  502. InitRolling
  503.  
  504. Sub InitRolling
  505. Dim i
  506. For i = 0 to tnob
  507. rolling(i) = False
  508. Next
  509. End Sub
  510.  
  511. Sub RollingTimer_Timer()
  512. Dim BOT, b
  513. BOT = GetBalls
  514.  
  515. ' stop the sound of deleted balls
  516. For b = UBound(BOT) + 1 to tnob
  517. rolling(b) = False
  518. StopSound("fx_ballrolling" & b)
  519. Next
  520.  
  521. ' exit the sub if no balls on the table
  522. If UBound(BOT) = -1 Then Exit Sub
  523.  
  524. ' play the rolling sound for each ball
  525. For b = 0 to UBound(BOT)
  526. If BallVel(BOT(b) ) > 1 AND BOT(b).z < 30 Then
  527. rolling(b) = True
  528. PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0
  529. Else
  530. If rolling(b) = True Then
  531. StopSound("fx_ballrolling" & b)
  532. rolling(b) = False
  533. End If
  534. End If
  535. Next
  536. End Sub
  537.  
  538. '**********************
  539. ' Ball Collision Sound
  540. '**********************
  541.  
  542. Sub OnBallBallCollision(ball1, ball2, velocity)
  543. PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0
  544. End Sub
  545.  
  546. '******************************
  547. ' Diverse Collection Hit Sounds
  548. '******************************
  549.  
  550. 'Sub aBumpers_Hit (idx): PlaySound SoundFX("fx_bumper", DOFContactors), 0, 1, pan(ActiveBall): End Sub
  551. Sub aRollovers_Hit(idx):PlaySound "fx_sensor", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  552. Sub aGates_Hit(idx):PlaySound "fx_Gate", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  553. Sub aMetals_Hit(idx):PlaySound "fx_MetalHit", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  554. Sub aRubber_Bands_Hit(idx):PlaySound "fx_rubber", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  555. Sub aRubbers_Hit(idx):PlaySound "fx_postrubber", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  556. Sub aRubber_Posts_Hit(idx):PlaySound "fx_postrubber", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  557. Sub aRubber_Pins_Hit(idx):PlaySound "fx_postrubber", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  558. Sub aPlastics_Hit(idx):PlaySound "fx_PlasticHit", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  559. Sub aTargets_Hit(idx):PlaySound "fx2_target", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  560. Sub aWoods_Hit(idx):PlaySound "fx_Woodhit", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  561.  
  562. '-------------------------------------
  563. ' Map lights into array
  564. ' Set unmapped lamps to Nothing
  565. '-------------------------------------
  566. Set Lights(1) = l1 'LightSnake1
  567. Set Lights(2) = l2 'LightHawk1
  568. Set Lights(3) = l3 'LightCougar1
  569. Set Lights(4) = l4 'LightWolf1
  570. Set Lights(5) = l5 'LightBear1
  571. Set Lights(6) = l6 'LightA
  572. Set Lights(7) = l7 'LightBonus10K
  573. Set Lights(8) = l8 'LightBonus50K
  574. Set Lights(9) = l9 'LightLeftTarget
  575. Set Lights(10) = BumperLeft 'BumperLeft (L10 and BumperLight2)
  576. Set Lights(11) = l11 'LightExtraBall
  577. Set Lights(12) = l12 'LightLeftReturnLane
  578. 'Set Lights(13) = LightBallInPlay
  579. Set Lights(14) = l14 'LightDenTarget2X
  580. Set Lights(15) = l15 'LightGateOpen
  581. 'Set Lights(16) = unused
  582. Set Lights(17) = l17 'LightSnake2
  583. Set Lights(18) = l18 'LightHawk2
  584. Set Lights(19) = l19 'LightCougar2
  585. Set Lights(20) = l20 'LightWolf2
  586. Set Lights(21) = l21 'LightBear2
  587. Set Lights(22) = l22 'LightB
  588. Set Lights(23) = l23 'LightBonus20K
  589. Set Lights(24) = l24 'LightBonus60K
  590. Set Lights(25) = l25 'LightCenterTarget
  591. Set Lights(26) = BumperCenter 'BumperCenter (L26 and BumperLight3)
  592. 'Set Lights(27) = LightMatch
  593. Set Lights(28) = l28 'LightRightReturnLane
  594. 'Set Lights(29) = LightHighScore
  595. Set Lights(30) = l30 'LightDenTarget3X
  596. Set Lights(31) = l31 'LightDen2X
  597. 'Set Lights(32) = unused
  598. Set Lights(33) = l33 'LightSnake3
  599. Set Lights(34) = l34 'LightHawk3
  600. Set Lights(35) = l35 'LightCougar3
  601. Set Lights(36) = l36 'LightWolf3
  602. Set Lights(37) = l37 'LightBear3
  603. Set Lights(38) = l38 'LightC
  604. Set Lights(39) = l39 'LightBonus30K
  605. Set Lights(40) = l40 'LightSpinner
  606. Set Lights(41) = l41 'LightRightTarget
  607. Set Lights(42) = BumperRight 'BumperRight L42 and BumperLight1)
  608. 'Set Lights(43) = LightShootAgain
  609. Set Lights(44) = l44 'LightLeftLaneSpecial
  610. 'Set Lights(45) = LightGameOver
  611. Set Lights(46) = l46 'LightDenTarget4X
  612. Set Lights(47) = l47 'LightDen3X
  613. 'Set Lights(48) = unused
  614. Set Lights(49) = l49 'LightABCExtraBall
  615. Set Lights(50) = l50 'LightABCSpecial
  616. Set Lights(51) = l51 'LightDen45K
  617. Set Lights(52) = l52 'LightBonus4X
  618. Set Lights(53) = l53 'LightBonusSpecial
  619. Set Lights(54) = l54 'LightGrizzly4X
  620. Set Lights(55) = l55 'LightBonus40K
  621. Set Lights(56) = l56 'LightGrizzlyPoints
  622. Set Lights(57) = l57 'LightBonus2X
  623. Set Lights(58) = l58 'LightBonus3X
  624. Set Lights(59) = l59 'LightCredit
  625. Set Lights(60) = l60 'LightRightLaneSpecial
  626. 'Set Lights(61) = LightTilt
  627. Set Lights(62) = l62 'LightDenTargetSpecial
  628. Set Lights(63) = l63'LightDen4X
  629.  
  630. 'Set Lights(10) = GILeft 'PF_Left
  631. 'Set Lights(42) = GIRight 'PF_Right
  632. 'Set Lights(26) = GICenter 'PF_Center
  633.  
  634. '---------------------------------------------------------------
  635. ' Edit the dip switches
  636. '---------------------------------------------------------------
  637. Sub editDips
  638. Dim vpmDips : Set vpmDips = New cvpmDips
  639. with vpmDips
  640. .AddForm 315, 370, "Frontier DIP Switch Settings"
  641. .AddFrame 2, 10, 140, "Balls per game", &HC0000000, _
  642. Array("2", &HC0000000, "3", 0, "4", &H80000000, "5", &H40000000)
  643. .AddFrame 160, 10, 140, "Max Credits", &H03000000, _
  644. Array("10", 0, "15", &H01000000, "25", &H02000000, "40", &H03000000)
  645. .AddFrame 2, 90, 140, "A && C Lanes are", &H00000020, _
  646. Array("Separate", 0, "Linked", &H00000020)
  647. .AddFrame 160, 90, 140, "Frontier Bonus Max", &H00400000, _
  648. Array("60,000", 0, "110,000", &H00400000)
  649. .AddFrame 2, 140, 140, "Outlane Special lights", &H00000080, _
  650. Array("Alternate", 0, "Both light", &H00000080)
  651. .AddFrame 160, 140, 140, "Outlane Special lights when", &H00002000, _
  652. Array("3X lights", 0, "4X lights", &H00002000)
  653. .AddFrame 2, 190, 140, "Feeder Lane Special lights", &H20000000, _
  654. Array("Alternate", 0, "Both light", &H20000000)
  655. .AddChk 160, 200, 148, Array("Credit display", &H04000000)
  656. .AddChk 160, 220, 148, Array("Match", &H08000000)
  657. .AddChk 7, 250, 300, Array("A-B-C Extra Ball light on at start of game", &H00000040)
  658. .AddChk 7, 270, 300, Array("A-B-C lane memory", &H00004000)
  659. 'Have to use 32768 because vbscript treats &H00008000 as -32768
  660. .AddChk 7, 290, 300, Array("Outhole collects Frontier Bonus", 32768)
  661. .AddChk 7, 310, 300, Array("Gate memory", &H00800000)
  662. .AddLabel 7, 340, 300, 20, "After hitting OK, press F3 to reset game with new settings."
  663. .ViewDips
  664. end with
  665. End Sub
  666. Set vpmShowDips = GetRef("editDips")
  667.  
  668. Sub table1_Paused:Controller.Pause = 1:End Sub
  669. Sub table1_unPaused:Controller.Pause = 0:End Sub
  670. Sub table1_Exit:Controller.Stop:End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement