Arngrim

viking dof

Nov 8th, 2016
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.35 KB | None | 0 0
  1. 'Viking (Bally 1979) by bord
  2.  
  3. Option Explicit
  4. Randomize
  5.  
  6. Const cGameName = "vikingb"
  7.  
  8. On Error Resume Next
  9. ExecuteGlobal GetTextFile("controller.vbs")
  10. If Err Then MsgBox "Can't open controller.vbs"
  11. On Error Goto 0
  12.  
  13. LoadVPM "01130100", "Bally.VBS", 3.21 'Viking
  14. Dim DesktopMode: DesktopMode = table1.ShowDT
  15.  
  16.  
  17. '************************************************
  18. '************************************************
  19. '************************************************
  20. '************************************************
  21. '************************************************
  22. Const UseSolenoids = True
  23. Const UseLamps = True
  24. Const UseSync = False
  25.  
  26. ' Standard Sounds
  27. Const SSolenoidOn = "fx_solenoid"
  28. Const SSolenoidOff = "fx_solenoidoff"
  29. Const SCoin = "fx_coin"
  30.  
  31. Dim bsTrough, dtleft, dtright
  32.  
  33. Dim nfozzy: nfozzy=1 'set to 0 for standard vpx flipper physics or 1 for nfozzys adjustments to rate of return
  34.  
  35. '*************nFozzy flipper routine part 1
  36. dim returnspeed, lfstep, rfstep
  37. returnspeed = leftflipper.return
  38. lfstep = 1
  39. rfstep = 1
  40.  
  41. sub leftflipper_timer()
  42. select case lfstep
  43. Case 1: leftflipper.return = returnspeed * 0.6 :lfstep = lfstep + 1
  44. Case 2: leftflipper.return = returnspeed * 0.7 :lfstep = lfstep + 1
  45. Case 3: leftflipper.return = returnspeed * 0.8 :lfstep = lfstep + 1
  46. Case 4: leftflipper.return = returnspeed * 0.9 :lfstep = lfstep + 1
  47. Case 5: leftflipper.return = returnspeed * 1 :lfstep = lfstep + 1
  48. Case 6: leftflipper.timerenabled = 0 : lfstep = 1
  49. end select
  50. end sub
  51.  
  52. sub rightflipper_timer()
  53. select case rfstep
  54. Case 1: rightflipper.return = returnspeed * 0.6 :rfstep = rfstep + 1
  55. Case 2: rightflipper.return = returnspeed * 0.7 :rfstep = rfstep + 1
  56. Case 3: rightflipper.return = returnspeed * 0.8 :rfstep = rfstep + 1
  57. Case 4: rightflipper.return = returnspeed * 0.9 :rfstep = rfstep + 1
  58. Case 5: rightflipper.return = returnspeed * 1 :rfstep = rfstep + 1
  59. Case 6: rightflipper.timerenabled = 0 : rfstep = 1
  60. end select
  61. end sub
  62.  
  63. '*************nFozzy flipper routine part 1 end
  64.  
  65. Sub SolLFlipper(Enabled)
  66. If Enabled Then
  67. PlaySound SoundFX("fx_flipperup",DOFFlippers), 0, 1, -0.1, 0.25
  68. LeftFlipper.RotateToEnd
  69. Else
  70. PlaySound SoundFX("fx_flipperdown",DOFFlippers), 0, 1, -0.1, 0.25
  71. LeftFlipper.RotateToStart
  72. '*************nFozzy flipper routine part 2
  73. if nfozzy=1 then
  74. LeftFlipper.TimerEnabled = 1
  75. LeftFlipper.TimerInterval = 16
  76. LeftFlipper.return = returnspeed * 0.5
  77. end if
  78. '*************nFozzy flipper routine part 2 end
  79. End If
  80. End Sub
  81.  
  82. Sub SolRFlipper(Enabled)
  83. If Enabled Then
  84. PlaySound SoundFX("fx_flipperup",DOFFlippers), 0, 1, 0.1, 0.25
  85. RightFlipper.RotateToEnd
  86. Else
  87. PlaySound SoundFX("fx_flipperdown",DOFFlippers), 0, 1, 0.1, 0.25
  88. RightFlipper.RotateToStart
  89. '*************nFozzy flipper routine part 2b
  90. if nfozzy=1 then
  91. RightFlipper.TimerEnabled = 1
  92. RightFlipper.TimerInterval = 16
  93. RightFlipper.return = returnspeed * 0.5
  94. end if
  95. '*************nFozzy flipper routine part 2b end
  96. End If
  97. End Sub
  98.  
  99. Sub FlipperTimer_Timer
  100. 'Add flipper, gate and spinner rotations here
  101. LFLogo.RotY = LeftFlipper.CurrentAngle
  102. RFLogo.RotY = RightFlipper.CurrentAngle
  103. End Sub
  104.  
  105.  
  106. Sub Table1_Init
  107. With Controller
  108. .GameName = cGameName
  109. If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description:Exit Sub
  110. .SplashInfoLine = ""
  111. .HandleKeyboard = 0
  112. .ShowTitle = 0
  113. .ShowDMDOnly = 1
  114. .ShowFrame = 0
  115. .HandleMechanics = False
  116. .Hidden = 1
  117. On Error Resume Next
  118. .Run GetPlayerHWnd
  119. If Err Then MsgBox Err.Description
  120. On Error Goto 0
  121. End With
  122.  
  123. PinMAMETimer.Interval = PinMAMEInterval
  124. PinMAMETimer.Enabled = 1
  125.  
  126. '************************************************
  127. ' Solenoids
  128. '************************************************
  129. SolCallback(7) = "bsTrough.SolOut" 'outhole kicker
  130. 'SolCallback(2) = "Solknocker " 'knocker
  131. SolCallback(8) = "SolKickUpSaucer" 'kick up saucer
  132. SolCallback(9) = "SolKickDownSaucer" 'kick down saucer
  133. 'SolCallback(5) = "" 'left slingshot
  134. 'SolCallback(6) = "" 'right slingshot
  135. SolCallback(1) = "SolLeftTargetReset " 'in line drop target reset
  136. SolCallback(2) = "SolRightTargetReset " '3 drop target reset
  137. 'SolCallback(9) = "vpmSolSound " 'top left thumper bumper
  138. 'SolCallback(10) = "vpmsolsound " 'top right thumper bumper
  139. 'SolCallback(11) = "vpmSolSound " 'left side thumper bumper
  140. 'SolCallback(12) = "vpmSolSound " 'right side thumper bumper
  141. SolCallback(3) = "" '3 drop target 1 (top)
  142. SolCallback(4) = "" '3 drop target 2
  143. SolCallback(5) = "" '3 drop target 3 (bottom)
  144. 'SolCallback(16) = "" 'coin lockout door
  145. 'SolCallback(17) = "" 'ki relay (flipper enable)
  146. SolCallback(17) = "SolTopSaucer" 'top saucer
  147.  
  148. SolCallback(sLRFlipper) = "SolRFlipper"
  149. SolCallback(sLLFlipper) = "SolLFlipper"
  150.  
  151. 'Trough
  152. Set bsTrough=New cvpmBallStack
  153. with bsTrough
  154. .InitSw 0,8,0,0,0,0,0,0
  155. .InitKick BallRelease,90,7
  156. .InitExitSnd Soundfx("fx_ballrel",DOFContactors), Soundfx("fx_solenoid",DOFContactors)
  157. .Balls=1
  158. end with
  159.  
  160. ' Nudging
  161. vpmNudge.TiltSwitch = 7
  162. vpmNudge.Sensitivity = 3
  163. vpmNudge.TiltObj = Array(leftslingshot, rightslingshot, sw37, sw38, sw39, sw40)
  164.  
  165. Set dtLeft=New cvpmDropTarget
  166. dtLeft.InitDrop Array(sw1,sw2,sw3,sw4),Array(1,2,3,4)
  167. dtLeft.InitSnd SoundFX("fx2_droptarget",DOFDropTargets),SoundFX("fx2_DTReset",DOFDropTargets)
  168.  
  169. Set dtRight=New cvpmDropTarget
  170. dtRight.InitDrop Array(sw17,sw18,sw19),Array(17,18,19)
  171. dtRight.InitSnd SoundFX("fx2_droptarget2",DOFDropTargets),SoundFX("fx2_DTReset",DOFDropTargets)
  172.  
  173. '*****Drop Lights Off
  174. dim xx
  175.  
  176. For each xx in DTLeftLights: xx.state=0:Next
  177. For each xx in DTRightLights: xx.state=0:Next
  178.  
  179. GILights 1
  180.  
  181. End Sub
  182.  
  183. Sub GILights (enabled)
  184. Dim light
  185. For each light in GI:light.State = Enabled: Next
  186. End Sub
  187.  
  188.  
  189. Sub Table1_KeyDown(ByVal keycode)
  190. If keycode = LeftTiltKey Then Nudge 90, 2
  191. If keycode = RightTiltKey Then Nudge 270, 2
  192. If keycode = CenterTiltKey Then Nudge 0, 2
  193.  
  194. If vpmKeyDown(keycode) Then Exit Sub
  195. If keycode = PlungerKey Then Plunger.PullBack: PlaySound "fx_plungerpull",0,1,0.25,0.25: End If
  196. End Sub
  197.  
  198. Sub Table1_KeyUp(ByVal keycode)
  199. If keycode = PlungerKey Then Plunger.Fire: PlaySound "fx_plunger",0,1,0.25,0.25
  200. If vpmKeyUp(keycode) Then Exit Sub
  201.  
  202. End Sub
  203.  
  204. Sub ShooterLane_Hit
  205. End Sub
  206.  
  207. Sub BallRelease_UnHit
  208. End Sub
  209.  
  210. Sub Drain_Hit()
  211. PlaySound "fx2_drain2",0,1,0,0.25 : bstrough.addball me
  212. End Sub
  213.  
  214. Sub sw24_Hit : Controller.Switch(24) = True : PlaySound "fx_hole-enter":End Sub
  215. '
  216. Sub sw32_Hit : Controller.Switch(32) = True : PlaySound "fx_hole-enter":End Sub
  217.  
  218.  
  219. Sub SolTopSaucer(enabled)
  220. if enabled then
  221. playsound Soundfx("fx_ballrel",DOFContactors)
  222. playsound Soundfx("fx_solenoid",DOFContactors)
  223. Controller.Switch(24) = false
  224. sw24.Kick 182, 15 + 5 * Rnd
  225. end if
  226. End Sub
  227.  
  228. Sub SolKickUpSaucer(enabled)
  229. if enabled then
  230. playsound Soundfx("fx_ballrel",DOFContactors)
  231. playsound Soundfx("fx_solenoid",DOFContactors)
  232. Controller.Switch(32) = false
  233. sw32.Kick 10, 15 + 5 * Rnd
  234. end if
  235. End Sub
  236.  
  237. Sub SolKickDownSaucer(enabled)
  238. if enabled then
  239. playsound Soundfx("fx_ballrel",DOFContactors)
  240. playsound Soundfx("fx_solenoid",DOFContactors)
  241. Controller.Switch(32) = false
  242. sw32.Kick 180, 15 + 5 * Rnd
  243. end if
  244. End Sub
  245.  
  246. 'Drop Targets
  247. Sub Sw1_Dropped:dtLeft.Hit 1 : GI_12b1.state=1 : GI_12a.state=1 : End Sub
  248. Sub Sw2_Dropped:dtLeft.Hit 2 : GI_12b.state=1 : End Sub
  249. Sub Sw3_Dropped:dtLeft.Hit 3 : GI_12c.state=1 : End Sub
  250. Sub Sw4_Dropped:dtLeft.Hit 4 : End Sub
  251.  
  252. Sub Sw17_Dropped:dtRight.Hit 1 : End Sub
  253. Sub Sw18_Dropped:dtRight.Hit 2 : GI_14c.state=1 : End Sub
  254. Sub Sw19_Dropped:dtRight.Hit 3 : GI_13a.state=1 : End Sub
  255.  
  256. Sub SolRightTargetReset(enabled)
  257. dim xx
  258. if enabled then
  259. dtRight.SolDropUp enabled
  260. For each xx in DTRightLights: xx.state=0:Next
  261. end if
  262. End Sub
  263.  
  264. Sub SolLeftTargetReset(enabled)
  265. dim xx
  266. if enabled then
  267. dtLeft.SolDropUp enabled
  268. For each xx in DTLeftLights: xx.state=0:Next
  269. end if
  270. End Sub
  271.  
  272. 'Bumpers
  273.  
  274. Sub sw37_Hit : vpmTimer.PulseSw 37 : playsound SoundFX("fx2_bumper_1",DOFContactors): End Sub
  275. Sub sw38_Hit : vpmTimer.PulseSw 38 : playsound SoundFX("fx2_bumper_1",DOFContactors): End Sub
  276. Sub sw39_Hit : vpmTimer.PulseSw 39 : playsound SoundFX("fx2_bumper_2",DOFContactors): End Sub
  277. Sub sw40_Hit : vpmTimer.PulseSw 40 : playsound SoundFX("fx2_bumper_3",DOFContactors): End Sub
  278.  
  279. 'Wire Triggers
  280. Sub SW12_Hit:Controller.Switch(12)=1 : End Sub 'B
  281. Sub SW12_unHit:Controller.Switch(12)=0:End Sub
  282. Sub SW13_Hit:Controller.Switch(13)=1 : End Sub 'A
  283. Sub SW13_unHit:Controller.Switch(13)=0:End Sub
  284. Sub SW15_Hit:Controller.Switch(15)=1 : End Sub 'Side R.O. Button
  285. Sub SW15_unHit:Controller.Switch(15)=0:End Sub
  286. Sub SW26_Hit:Controller.Switch(26)=1 : End Sub 'Right out Rollover
  287. Sub SW26_unHit:Controller.Switch(26)=0:End Sub
  288. Sub SW27_Hit:Controller.Switch(27)=1 : End Sub 'Flip Feed Lane (Rt)
  289. Sub SW27_unHit:Controller.Switch(27)=0:End Sub
  290. Sub SW28_Hit:Controller.Switch(28)=1 : End Sub 'Flip Feed Lane (Lt)
  291. Sub SW28_unHit:Controller.Switch(28)=0:End Sub
  292. Sub SW29_Hit:Controller.Switch(29)=1 : End Sub 'Left outlane
  293. Sub SW29_unHit:Controller.Switch(29)=0:End Sub
  294. Sub SW30_Hit:Controller.Switch(30)=1 : End Sub 'Right Side Lane R.O.
  295. Sub SW30_unHit:Controller.Switch(30)=0:End Sub
  296.  
  297. 'Spinners
  298. Sub sw14_Spin : vpmTimer.PulseSw (14) :PlaySound "fx_spinner": End Sub
  299.  
  300. 'Targets
  301. Sub sw5_Hit:vpmTimer.PulseSw (5):End Sub
  302. Sub sw25_Hit:vpmTimer.PulseSw (25):End Sub
  303.  
  304. Sub SolKnocker(Enabled)
  305. If Enabled Then PlaySound SoundFX("Knocker",DOFKnocker)
  306. End Sub
  307.  
  308. '**********Sling Shot Animations
  309. ' Rstep and Lstep are the variables that increment the animation
  310. '****************
  311. Dim RStep, Lstep
  312.  
  313. Sub RightSlingShot_Slingshot
  314. PlaySound SoundFX("fx_slingshot",DOFContactors), 0, 1, 0.05, 0.05
  315. vpmtimer.PulseSw(35)
  316. RSling.Visible = 0
  317. RSling1.Visible = 1
  318. sling1.TransZ = -20
  319. RStep = 0
  320. RightSlingShot.TimerEnabled = 1
  321. End Sub
  322.  
  323. Sub RightSlingShot_Timer
  324. Select Case RStep
  325. Case 3:RSLing1.Visible = 0:RSLing2.Visible = 1:sling1.TransZ = -10
  326. Case 4:RSLing2.Visible = 0:RSLing3.Visible = 1:sling1.TransZ = 0
  327. Case 5:RSLing3.Visible = 0:RSLing.Visible = 1:RightSlingShot.TimerEnabled = 0
  328. End Select
  329. RStep = RStep + 1
  330. End Sub
  331.  
  332. Sub LeftSlingShot_Slingshot
  333. PlaySound SoundFX("fx_slingshot",DOFContactors),0,1,-0.05,0.05
  334. vpmtimer.pulsesw(36)
  335. LSling.Visible = 0
  336. LSling1.Visible = 1
  337. sling2.TransZ = -20
  338. LStep = 0
  339. LeftSlingShot.TimerEnabled = 1
  340. End Sub
  341.  
  342. Sub LeftSlingShot_Timer
  343. Select Case LStep
  344. Case 3:LSLing1.Visible = 0:LSLing2.Visible = 1:sling2.TransZ = -10
  345. Case 4:LSLing2.Visible = 0:LSLing3.Visible = 1:sling2.TransZ = 0
  346. Case 5:LSLing3.Visible = 0:LSLing.Visible = 1:LeftSlingShot.TimerEnabled = 0
  347. End Select
  348. LStep = LStep + 1
  349. End Sub
  350.  
  351.  
  352. ' *********************************************************************
  353. ' Supporting Ball & Sound Functions
  354. ' *********************************************************************
  355.  
  356. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  357. Vol = Csng(BallVel(ball) ^2 / 2000)
  358. End Function
  359.  
  360. Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table. "table1" is the name of the table
  361. Dim tmp
  362. tmp = ball.x * 2 / table1.width-1
  363. If tmp > 0 Then
  364. Pan = Csng(tmp ^10)
  365. Else
  366. Pan = Csng(-((- tmp) ^10) )
  367. End If
  368. End Function
  369.  
  370. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  371. Pitch = BallVel(ball) * 20
  372. End Function
  373.  
  374. Function BallVel(ball) 'Calculates the ball speed
  375. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  376. End Function
  377.  
  378. '*****************************************
  379. ' JP's VP10 Rolling Sounds
  380. '*****************************************
  381.  
  382. Const tnob = 20 ' total number of balls
  383. ReDim rolling(tnob)
  384. InitRolling
  385.  
  386. Sub InitRolling
  387. Dim i
  388. For i = 0 to tnob
  389. rolling(i) = False
  390. Next
  391. End Sub
  392.  
  393. Sub RollingUpdate()
  394. Dim BOT, b, ballpitch
  395. BOT = GetBalls
  396.  
  397. ' stop the sound of deleted balls
  398. For b = UBound(BOT) + 1 to tnob
  399. rolling(b) = False
  400. StopSound("fx_ballrolling" & b)
  401. Next
  402.  
  403. ' exit the sub if no balls on the table
  404. If UBound(BOT) = -1 Then Exit Sub
  405.  
  406. ' play the rolling sound for each ball
  407. For b = 0 to UBound(BOT)
  408. If BallVel(BOT(b) ) > 1 Then
  409. If BOT(b).z < 30 Then
  410. ballpitch = Pitch(BOT(b) )
  411. Else
  412. ballpitch = Pitch(BOT(b) ) * 100
  413. End If
  414. rolling(b) = True
  415. PlaySound("fx_ballrolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, ballpitch, 1, 0
  416. Else
  417. If rolling(b) = True Then
  418. StopSound("fx_ballrolling" & b)
  419. rolling(b) = False
  420. End If
  421. End If
  422. Next
  423. End Sub
  424.  
  425. '**********************
  426. ' Ball Collision Sound
  427. '**********************
  428.  
  429. Sub OnBallBallCollision(ball1, ball2, velocity)
  430. PlaySound("fx_collide"), 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0
  431. End Sub
  432.  
  433. '******************************
  434. ' Diverse Collection Hit Sounds
  435. '******************************
  436.  
  437. 'Sub aBumpers_Hit (idx): PlaySound SoundFX("fx_bumper", DOFContactors), 0, 1, pan(ActiveBall): End Sub
  438. Sub aRollovers_Hit(idx):PlaySound "fx_sensor", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  439. Sub aGates_Hit(idx):PlaySound "fx_Gate", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  440. Sub aMetals_Hit(idx):PlaySound "fx_MetalHit", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  441. Sub aRubber_Bands_Hit(idx):PlaySound "fx_rubber", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  442. Sub aRubbers_Hit(idx):PlaySound "fx_postrubber", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  443. Sub aRubber_Posts_Hit(idx):PlaySound "fx_postrubber", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  444. Sub aRubber_Pins_Hit(idx):PlaySound "fx_postrubber", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  445. Sub aPlastics_Hit(idx):PlaySound "fx_PlasticHit", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  446. Sub aTargets_Hit(idx):PlaySound "fx2_target", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  447. Sub aWoods_Hit(idx):PlaySound "fx_Woodhit", 0, Vol(ActiveBall), pan(ActiveBall), 0, Pitch(ActiveBall), 0, 0:End Sub
  448.  
  449. '-------------------------------------
  450. ' Map lights into array
  451. ' Set unmapped lamps to Nothing
  452. '-------------------------------------
  453. Set Lights(1) = l1
  454. Set Lights(2) = l2
  455. Set Lights(3) = l3
  456. Set Lights(4) = l4
  457. Set Lights(5) = l5
  458. Set Lights(6) = l6
  459. Set Lights(7) = l7
  460. Set Lights(8) = l8
  461. Set Lights(9) = l9
  462. Lights(10) = Array(l10,l10a)
  463. 'Set Lights(11) = l11 'Shoot Again
  464. Set Lights(12) = l12
  465. 'Set Lights(13) = l13 'Ball In Play
  466. Set Lights(14) = l14
  467. Set Lights(15) = l15
  468. 'Set Lights(16) = unused
  469. Set Lights(17) = l17
  470. Set Lights(18) = l18
  471. Set Lights(19) = l19
  472. Set Lights(20) = l20
  473. Set Lights(21) = l21
  474. Set Lights(22) = l22
  475. Set Lights(23) = l23
  476. Set Lights(24) = l24
  477. Set Lights(25) = l25
  478. Set Lights(26) = l26
  479. 'Set Lights(27) = l27 'LightMatch
  480. Set Lights(28) = l28
  481. 'Set Lights(29) = l29 'LightHighScore
  482. Set Lights(30) = l30
  483. Set Lights(31) = l31
  484. 'Set Lights(32) = unused
  485. Set Lights(33) = l33
  486. Set Lights(34) = l34
  487. Set Lights(35) = l35
  488. Set Lights(36) = l36
  489. Set Lights(37) = l37
  490. Set Lights(38) = l38
  491. Set Lights(39) = l39
  492. Set Lights(40) = l40
  493. Set Lights(41) = l41
  494. Set Lights(42) = l42
  495. Set Lights(43) = l43
  496. Set Lights(44) = l44
  497. 'Set Lights(45) = l45 'LightGameOver
  498. Set Lights(46) = l46
  499. Set Lights(47) = l47
  500. 'Set Lights(48) = unused
  501. Set Lights(49) = l49
  502. Set Lights(50) = l50
  503. Set Lights(51) = l51
  504. Set Lights(52) = l52
  505. Set Lights(53) = l53
  506. Set Lights(54) = l54
  507. Set Lights(55) = l55
  508. Set Lights(56) = l56
  509. Set Lights(57) = l57
  510. Set Lights(58) = l58
  511. 'Set Lights(59) = l59 'LightCredit
  512. Set Lights(60) = l60
  513. 'Set Lights(61) = l61 'LightTilt
  514. Set Lights(62) = l62
  515. Set Lights(63) = l63
  516.  
  517. 'Set Lights(10) = GILeft 'PF_Left
  518. 'Set Lights(42) = GIRight 'PF_Right
  519. 'Set Lights(26) = GICenter 'PF_Center
  520.  
  521. '---------------------------------------------------------------
  522. ' Edit the dip switches
  523. '---------------------------------------------------------------
  524. Sub editDips
  525. Dim vpmDips : Set vpmDips = New cvpmDips
  526. with vpmDips
  527. .AddForm 315, 370, "Viking DIP Switch Settings"
  528. .AddFrame 0,0,190,"Maximum credits",&H03000000,Array("10 credits",0,"20 credits",&H01000000,"30 credits",&H02000000,"40 credits",&H03000000)'dip 25&26
  529. .AddFrame 0,76,190,"High game to date",&H00300000,Array("no award",0,"1 credit",&H00100000,"2 credits",&H00200000,"3 credits",&H00300000)'dip 21&22
  530. .AddFrame 0,152,190,"Bumper points adjust",&H00800000,Array("100 points",0,"1.000 points",&H00800000)'dip 24
  531. .AddFrame 0,244,190,"Red target adjust",&H00000080,Array("does not add bonus",0,"adds 5 extra bonus",&H00000080)'dip 8
  532. .AddFrame 205,0,190,"Sound features",&H30000000,Array("chime effects",0,"noises and no background",&H10000000,"noise effects",&H20000000,"noises and background",&H30000000)'dip 29&30
  533. .AddFrame 205,76,190,"High score feature",&H00000060,Array("points",0,"extra ball",&H00000040,"replay",&H00000060)'dip 6&7
  534. .AddChk 205,155,190,Array("Match feature",&H08000000)'dip 28
  535. .AddChk 205,175,190,Array("Credits displayed",0)'dip 27
  536. .AddChk 205,195,190,Array("25K light in memory",&H00004000)'dip 15
  537. .AddChk 205,215,190,Array("3 bank drop target in memory",32768)'dip 16
  538. .AddChk 205,235,190,Array("Special and lock ball in memory",&H00002000)'dip 14
  539. .AddChk 205,255,190,Array("In-line extra ball && special in memory",&H80000000)'dip 32
  540. .AddChk 205,275,190,Array("In-line drop targets points in memory",&H00400000)'dip 23
  541. .AddLabel 50,300,300,20,"After hitting OK, press F3 to reset game with new settings."
  542. .ViewDips
  543. end with
  544. End Sub
  545. Set vpmShowDips = GetRef("editDips")
  546.  
  547. Sub table1_Paused:Controller.Pause = 1:End Sub
  548. Sub table1_unPaused:Controller.Pause = 0:End Sub
  549. Sub table1_Exit:Controller.Stop:End Sub
Advertisement
Add Comment
Please, Sign In to add comment