Arngrim

victory controller vbs

Mar 20th, 2017
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 52.01 KB | None | 0 0
  1. Option Explicit
  2. Randomize
  3. Dim OptionReset
  4.  
  5. On Error Resume Next
  6. ExecuteGlobal GetTextFile("controller.vbs")
  7. If Err Then MsgBox "You need the controller.vbs in order to run this table, available in the vp10 package"
  8. On Error Goto 0
  9.  
  10. 'OptionReset = 1 'Uncomment to reset to default options in case of error OR keep all changes temporary
  11.  
  12. '***********************************************************************************
  13. '**** Constants and global variables ****
  14. '***********************************************************************************
  15. const UseSolenoids = True
  16. const UseLamps = False
  17. const UseGI = False 'Only WPC games have special GI circuit.
  18. Const SCoin = "Coin"
  19. Const cGameName = "victory"
  20.  
  21. Dim MaxFlasherLevel: MaxFlasherLevel = 99
  22. Dim MaxGILevel: MaxGILevel = 99
  23. Dim ImPlunger: ImPlunger = 99
  24. Dim OutlaneLPos: OutlaneLPos = 0
  25.  
  26. Dim ExtendedDOF, DOFSound, DullFlippers
  27. Dim bsTrough, bsTopKicker, bsRightKicker, bsHoleKicker, plungerIM
  28. Dim Tilted, FlipperEnabled, GI_On, GameOn, Hidden, i
  29. Dim DesktopMode: DesktopMode = Victory.ShowDT
  30. Dim DebugSwitch: DebugSwitch = False 'Don't even think about it, only Sindbad is allowed to do that ...
  31.  
  32. LoadVPM"01001100","sys80.VBS",3.42
  33. OptionsLoad
  34.  
  35. Sub Victory_Init
  36. vpmInit Me
  37. With Controller
  38. .GameName=cGameName
  39. If Err Then MsgBox "Can't start Game " & cGameName & vbNewLine & Err.Description : Exit Sub
  40. .SplashInfoLine="Victory by Sindbad"
  41. .HandleKeyboard=0
  42. .ShowTitle=0
  43. .ShowDMDOnly=1
  44. .ShowFrame=0
  45. .HandleMechanics=0
  46. .Hidden=Hidden
  47. .SolMask(0) = 0
  48. On Error Resume Next
  49. .Run GetPlayerHWnd
  50. End With
  51. If Err Then MsgBox Err.Description
  52. On Error Goto 0
  53.  
  54. vpmTimer.AddTimer 2000, "Controller.SolMask(0)=&Hffffffff'"
  55. PinMAMETimer.Interval=PinMAMEInterval
  56. PinMAMETimer.Enabled=1
  57.  
  58. ' Trough handler
  59. Set bsTrough=New cvpmBallStack
  60. With bsTrough
  61. .InitSw swOuthole,swTrough,0,0,0,0,0,0
  62. .InitKick BallRelease, 90, 7
  63. .Balls=2
  64. End With
  65.  
  66. ' Top Kicker
  67. Set bsTopKicker=new cvpmBallStack
  68. With bsTopKicker
  69. .InitSaucer TopKicker, swTopKicker, 0, 40
  70. End With
  71.  
  72. ' Right Kicker
  73. Set bsRightKicker=new cvpmBallStack
  74. With bsRightKicker
  75. .InitSaucer RightKicker, swRightKicker, 0, 25
  76. End With
  77.  
  78. ' Hole Kicker
  79. Set bsHoleKicker=new cvpmBallStack
  80. With bsHoleKicker
  81. .InitSaucer HoleKicker, swHoleKicker, 160, 8
  82. End With
  83.  
  84. vpmNudge.TiltSwitch = swTiltMe
  85. vpmNudge.Sensitivity = 5
  86. vpmNudge.TiltObj = Array(SlingL, SlingR)
  87.  
  88. Tilted = False
  89. GI_On = False
  90. GameOn = False
  91. FlipperEnabled = True
  92. Flippers_Init
  93. Backdrop_Init
  94. Slingshots_Init
  95. Outlanes_Init
  96. Kickers_Init
  97. Rolling_Init
  98. Flashers_Init
  99. Illumination_Init
  100. End Sub
  101.  
  102. Sub Victory_Paused:Controller.Pause = True:End Sub
  103. Sub Victory_UnPaused:Controller.Pause = False:End Sub
  104. Sub Victory_Exit:Controller.Pause = False:Controller.Stop:End Sub
  105.  
  106.  
  107.  
  108. '***********************************************************************************
  109. '**** Keyboard (Input) Handling ****
  110. '***********************************************************************************
  111. Sub Victory_KeyDown(ByVal keycode)
  112. ' If ((keycode = StartGameKey) AND (TBLL_Credits > 0)) Then vpmTimer.AddTimer 500, "TBLL_Credits = TBLL_Credits - 1 '"
  113. If keycode = PlungerKey Then
  114. If ImPlunger = True Then
  115. PlungerIM.Pullback:PTime.Enabled = 1:Plunger.TimerEnabled = 0:Pcount = 0
  116. Else
  117. Plunger.Pullback
  118. End If
  119. End If
  120. If keycode = LeftTiltKey Then LeftNudge 80, 1.2, 20:PlaySound SoundFX("NudgeL",0)
  121. If keycode = RightTiltKey Then RightNudge 280, 1.2, 20:PlaySound SoundFX("NudgeR",0)
  122. If keycode = CenterTiltKey Then
  123. If DebugSwitch = True Then
  124. AllOn
  125. Else
  126. CenterNudge 0, 1.6, 25:PlaySound SoundFX("NudgeC",0)
  127. End If
  128. End If
  129. If vpmKeyDown(keycode) Then Exit Sub
  130. End Sub
  131.  
  132. Sub Victory_KeyUp(ByVal keycode)
  133. If keycode = PlungerKey Then
  134. If ImPlunger = True Then
  135. PlungerIM.Fire:PTime.Enabled = 0:Pcount = 0:PTime2.Enabled = 1
  136. Else
  137. Plunger.Fire
  138. End If
  139. End If
  140. If vpmKeyUp(keycode) Then Exit Sub
  141. End Sub
  142.  
  143.  
  144.  
  145. '***********************************************************************************
  146. '**** nudging based on Noah's nudge test table ****
  147. '***********************************************************************************
  148. Dim LeftNudgeEffect, RightNudgeEffect, CenterNudgeEffect
  149.  
  150. Sub LeftNudge(angle, strength, delay)
  151. vpmNudge.DoNudge angle, (strength * (delay-LeftNudgeEffect) / delay) + RightNudgeEffect / delay
  152. LeftNudgeEffect = delay
  153. RightNudgeEffect = 0
  154. RightNudgeTimer.Enabled = 0
  155. LeftNudgeTimer.Interval = delay
  156. LeftNudgeTimer.Enabled = 1
  157. End Sub
  158.  
  159. Sub RightNudge(angle, strength, delay)
  160. vpmNudge.DoNudge angle, (strength * (delay-RightNudgeEffect) / delay) + LeftNudgeEffect / delay
  161. RightNudgeEffect = delay
  162. LeftNudgeEffect = 0
  163. LeftNudgeTimer.Enabled = 0
  164. RightNudgeTimer.Interval = delay
  165. RightNudgeTimer.Enabled = 1
  166. End Sub
  167.  
  168. Sub CenterNudge(angle, strength, delay)
  169. vpmNudge.DoNudge angle, strength * (delay-CenterNudgeEffect) / delay
  170. CenterNudgeEffect = delay
  171. CenterNudgeTimer.Interval = delay
  172. CenterNudgeTimer.Enabled = 1
  173. End Sub
  174.  
  175. Sub LeftNudgeTimer_Timer()
  176. LeftNudgeEffect = LeftNudgeEffect-1
  177. If LeftNudgeEffect = 0 then Me.Enabled = 0
  178. End Sub
  179.  
  180. Sub RightNudgeTimer_Timer()
  181. RightNudgeEffect = RightNudgeEffect-1
  182. If RightNudgeEffect = 0 then Me.Enabled = 0
  183. End Sub
  184.  
  185. Sub CenterNudgeTimer_Timer()
  186. CenterNudgeEffect = CenterNudgeEffect-1
  187. If CenterNudgeEffect = 0 then Me.Enabled = 0
  188. End Sub
  189.  
  190.  
  191.  
  192. '***********************************************************************************
  193. '**** Knocker ****
  194. '***********************************************************************************
  195. SolCallback(sKnocker) = "DoKnocker"
  196.  
  197. Sub DoKnocker(enabled)
  198. If enabled Then PlaySound SoundFX("Knocker",DOFKnocker), 1
  199. End Sub
  200.  
  201.  
  202.  
  203. '***********************************************************************************
  204. '**** Drains and Kickers ****
  205. '***********************************************************************************
  206. Dim CurrentBall
  207. SolCallback(sOuthole)= "DoOuthole"
  208. SolCallback(sRightKicker)= "DoRightKicker"
  209. SolCallback(sHoleKicker)= "DoHoleKicker"
  210.  
  211. Sub DoOuthole(enabled)
  212. If enabled = True Then
  213. bsTrough.EntrySol_On
  214. If Tilted = True then SetGIon: Tilted = False
  215. End If
  216. End Sub
  217.  
  218. Sub DoBallRelease
  219. If Tilted = True then SetGIon: Tilted = False
  220. PlaySound SoundFX("BallRelease",DOFContactors), 1
  221. BallRelease.TimerEnabled = True
  222. End Sub
  223.  
  224. Sub BallRelease_Timer()
  225. Me.TimerEnabled = False
  226. bsTrough.ExitSol_On
  227. End Sub
  228.  
  229. Sub TopKicker_Hit(): PlaySound "SaucerHit", 0: bsTopKicker.AddBall Me: End Sub
  230. Sub RightKicker_Hit(): PlaySound "SaucerHit", 0: bsRightKicker.AddBall Me: End Sub
  231. Sub HoleKicker_Hit(): PlaySound "SaucerHit", 0: bsHoleKicker.AddBall Me: End Sub
  232.  
  233. Sub DoTopKicker
  234. PlaySound SoundFX("SaucerKick",DOFContactors), 1
  235. bsTopKicker.ExitSol_On
  236. End Sub
  237.  
  238. Sub DoRightKicker(enabled)
  239. If enabled = True Then
  240. PlaySound SoundFX("SaucerKick",DOFContactors), 1
  241. bsRightKicker.ExitSol_On
  242. End If
  243. End Sub
  244.  
  245. Sub DoHoleKicker(enabled)
  246. If enabled = True Then
  247. PlaySound SoundFX("SaucerKick",DOFContactors), 1
  248. bsHoleKicker.ExitSol_On
  249. End If
  250. End Sub
  251.  
  252. Sub Drain_Hit()
  253. PlaySound "Drain", 0
  254. bsTrough.AddBall Me
  255. If Tilted = True then SetGIon: Tilted = False
  256. End Sub
  257.  
  258. Sub Kickers_Init
  259. End Sub
  260.  
  261.  
  262.  
  263. '***********************************************************************************
  264. '**** Flippers ****
  265. '***********************************************************************************
  266.  
  267. SolCallback(sLRFlipper) = "SolFlip FlipperLR, FlipperUR," ' Right Flipper
  268. SolCallback(sLLFlipper) = "SolFlip FlipperLL, FlipperUL," ' Left Flipper
  269. SolCallback(sFlippersEnable) = "DoEnable"
  270. Sub FlipperLL_Collide(parm):PlaySound "RubberFlipper", 0:End Sub
  271. Sub FlipperLR_Collide(parm):PlaySound "RubberFlipper", 0:End Sub
  272. Sub FlipperUL_Collide(parm):PlaySound "RubberFlipper", 0:End Sub
  273. Sub FlipperUR_Collide(parm):PlaySound "RubberFlipper", 0:End Sub
  274.  
  275. Sub SolFlip(aFlip1, aFlip2, aEnabled)
  276. If aEnabled Then
  277. If DullFlippers = 1 Then
  278. PlaySound SoundFX("FlipperUpDull",DOFFlippers),1
  279. Else
  280. PlaySound SoundFX("FlipperUp",DOFFlippers),1
  281. End If
  282. aFlip1.RotateToEnd: aFlip2.RotateToEnd
  283. Else
  284. If DullFlippers = 1 Then
  285. PlaySound SoundFX( "FlipperDownDull",DOFFlippers),1
  286. Else
  287. PlaySound SoundFX( "FlipperDown",DOFFlippers),1
  288. End If
  289. aFlip1.RotateToStart: aFlip2.RotateToStart
  290. End If
  291. End Sub
  292.  
  293. Sub DoEnable(enabled)
  294. If enabled = True Then
  295. vpmNudge.SolGameOn enabled
  296. If GI_On = False Then SetGIOn
  297. SLingL.Disabled = 0
  298. SLingR.Disabled = 0
  299. FlipperEnabled = True
  300. Else
  301. FlipperEnabled = False
  302. SLingL.Disabled = 1
  303. SLingR.Disabled = 1
  304. End If
  305. End Sub
  306.  
  307. Sub Flippers_Init
  308. FlipperLL.Visible = 0:FlipperLL.Enabled = 1:FlipperLLP.Visible = 1
  309. FlipperLR.Visible = 0:FlipperLR.Enabled = 1:FlipperLRP.Visible = 1
  310. FlipperUL.Visible = 0:FlipperUL.Enabled = 1:FlipperULP.Visible = 1
  311. FlipperUR.Visible = 0:FlipperUR.Enabled = 1:FlipperURP.Visible = 1
  312. End Sub
  313.  
  314. '***********************************************************************************
  315. '**** Slingshot and walls ****
  316. '***********************************************************************************
  317. Dim SLPos,SRPos
  318.  
  319. Sub SlingL_Slingshot()
  320. If FlipperEnabled = False Then Exit Sub
  321. LSling1.Visible = 0:LSling2.Visible = 0:LSling3.Visible = 0: LSling4.Visible = 1: LSling.TransZ = -27
  322. vpmTimer.PulseSw(swSling): PlaySound SoundFX("SlingL",DOFContactors),1:DOF dLeftSlingshot, 2
  323. SLPos = 0: Me.TimerEnabled = 1
  324. LightshowChangeSide
  325. End Sub
  326.  
  327. Sub SlingL_Timer
  328. Select Case SLPos
  329. Case 2: LSling1.Visible = 0:LSling2.Visible = 0:LSling3.Visible = 1: LSling4.Visible = 0: LSling.TransZ = -17
  330. Case 3: LSling1.Visible = 0:LSling2.Visible = 1:LSling3.Visible = 0: LSling4.Visible = 0: LSling.TransZ = -8
  331. Case 4: LSling1.Visible = 1:LSling2.Visible = 0:LSling3.Visible = 0: LSling4.Visible = 0: LSling.TransZ = 0 :Me.TimerEnabled = 0
  332. End Select
  333. SLPos = SLPos + 1
  334. End Sub
  335.  
  336. Sub SlingR_Slingshot()
  337. If FlipperEnabled = False Then Exit Sub
  338. RSling1.Visible = 0:RSling2.Visible = 0:RSling3.Visible = 0: RSling4.Visible = 1: RSling.TransZ = -27
  339. vpmTimer.PulseSw(swSling): PlaySound SoundFX("SlingR",DOFContactors),1:DOF dRightSlingshot, 2
  340. SRPos = 0: Me.TimerEnabled = 1
  341. LightshowChangeSide
  342. End Sub
  343.  
  344. Sub SlingR_Timer
  345. Select Case SRPos
  346. Case 2: RSling1.Visible = 0:RSling2.Visible = 0:RSling3.Visible = 1: RSling4.Visible = 0: RSling.TransZ = -17
  347. Case 3: RSling1.Visible = 0:RSling2.Visible = 1:RSling3.Visible = 0: RSling4.Visible = 0: RSling.TransZ = -8
  348. Case 4: RSling1.Visible = 1:RSling2.Visible = 0:RSling3.Visible = 0: RSling4.Visible = 0: RSling.TransZ = 0 :Me.TimerEnabled = 0
  349. End Select
  350. SRPos = SRPos + 1
  351. End Sub
  352.  
  353. Sub Slingshots_Init
  354. LSling1.Visible = 1:LSling2.Visible = 0:LSling3.Visible = 0: LSling4.Visible = 0: LSling.TransZ = 0
  355. RSling1.Visible = 1:RSling2.Visible = 0:RSling3.Visible = 0: RSling4.Visible = 0: RSling.TransZ = 0
  356. End Sub
  357.  
  358. Sub Outlanes_Init
  359. Dim OutlaneLPosArray: OutlaneLPosArray = Array(1144, 1157.5, 1169)
  360. OutlaneLP1.Y = OutlaneLPosArray(OutlaneLPos): OutlaneLP2.Y = OutlaneLPosArray(OutlaneLPos): OutlaneLP3.Y = OutlaneLPosArray(OutlaneLPos)
  361. Select Case OutlaneLPos
  362. Case 0:RubberOutlaneL1.Collidable = 1: RubberOutlaneL2.Collidable = 0: RubberOutlaneL3.Collidable = 0
  363. Case 1:RubberOutlaneL1.Collidable = 0: RubberOutlaneL2.Collidable = 1: RubberOutlaneL3.Collidable = 0
  364. Case 2:RubberOutlaneL1.Collidable = 0: RubberOutlaneL2.Collidable = 0: RubberOutlaneL3.Collidable = 1
  365. End Select
  366. End Sub
  367.  
  368.  
  369.  
  370. '***********************************************************************************
  371. '**** Drop Targets ****
  372. '***********************************************************************************
  373. Dim DropTargetPositions: DropTargetPositions=Array(-50, -40, -30, -20, -10, 0, 10, 10)
  374. Dim DropTargets: DropTargets=Array(Array(swDropTarget1, sw42, Nothing, sw42p,30,0),Array(swDropTarget2, sw52, Nothing, sw52p,30,0), _
  375. Array(swDropTarget3, sw62, Nothing, sw62p,30,0),Array(swDropTarget4, sw72, Nothing, sw72p,30,0))
  376.  
  377. SolCallBack(sDropTargetsReset) = "DoDropTargetsUp"
  378. Sub sw42_Hit: DropTargetHit 0: End Sub
  379. Sub sw52_Hit: DropTargetHit 1: End Sub
  380. Sub sw62_Hit: DropTargetHit 2: End Sub
  381. Sub sw72_Hit: DropTargetHit 3: End Sub
  382. Sub DoDropTargetsUp(enabled): If enabled then DropTargetBankUp 0, 3:End If: End Sub
  383.  
  384. Sub DropTargetBankUp(first, last)
  385. Dim i
  386. For i = first to last: DropTargets(i)(5) = 1: Next
  387. PlaySound SoundFX("BankReset",DOFContactors), 1
  388. End Sub
  389.  
  390. Sub DropTargetHit(nr)
  391. If Tilted = True OR DropTargets(nr)(5) <> 0 then Exit Sub
  392. PlaySound "DropTargetHit", 0
  393. DropTargets(nr)(5) = -1
  394. End Sub
  395.  
  396. Sub DropTargetsTimer_Timer
  397. Dim i
  398. For i = 0 to uBound(DropTargets)
  399. If DropTargets(i)(5) < 0 Then DropTargetDown i ' Drop Targets that have to go down
  400. If DropTargets(i)(5) > 0 Then DropTargetUp i ' Drop Targets that have to go up
  401. Next
  402. End Sub
  403.  
  404. Sub DropTargetDown(i)
  405. Dim pos
  406. If DropTargets(i)(5) = -6 Then ' Bottom position reached?
  407. DropTargets(i)(5) = 0 ' If yes, mark status as parked
  408. If NOT DropTargets(i)(1) is Nothing Then DropTargets(i)(1).IsDropped = 1 ' Mark "down" postion in DropTarget
  409. If NOT DropTargets(i)(2) is Nothing Then DropTargets(i)(2).IsDropped = 1 ' Mark "down" postion in DropTarget
  410. If DropTargets(i)(0) > 0 Then Controller.Switch(DropTargets(i)(0)) = 1 ' Turn ROM switch on
  411. Else
  412. pos = DropTargetPositions(DropTargets(i)(5) + 5) + DropTargets(i)(4) ' calculate new position
  413. If DropTargets(i)(3).z > pos Then ' is current position higher?
  414. DropTargets(i)(3).z = pos ' if yes, step down
  415. End If ' Drop Target moved!
  416. DropTargets(i)(5) = DropTargets(i)(5) - 1 ' Decrement position variable
  417. End If
  418. End Sub
  419.  
  420. Sub DropTargetUp(i)
  421. Dim pos
  422. If DropTargets(i)(5) = 8 Then ' Top position reached?
  423. DropTargets(i)(5) = 0 ' If yes, mark status as parked
  424. If NOT DropTargets(i)(1) is Nothing Then DropTargets(i)(1).IsDropped = 0 ' Mark "up" postion in DropTarget
  425. If NOT DropTargets(i)(2) is Nothing Then DropTargets(i)(2).IsDropped = 0 ' Mark "up" postion in DropTarget
  426. DropTargets(i)(3).z = DropTargets(i)(4) + DropTargetPositions(5) ' Drive the primitive in "Up" position
  427. If DropTargets(i)(0) > 0 Then Controller.Switch(DropTargets(i)(0)) = 0 ' Turn ROM switch off
  428. Else
  429. pos = DropTargetPositions(DropTargets(i)(5)) + DropTargets(i)(4) ' calculate new position
  430. If DropTargets(i)(3).z < pos Then ' is current position lower?
  431. DropTargets(i)(3).z = pos ' if yes, step up
  432. End If ' Drop Target moved!
  433. DropTargets(i)(5) = DropTargets(i)(5) + 1 ' Decrement position in variable
  434. End If
  435. End Sub
  436.  
  437.  
  438.  
  439. '***********************************************************************************
  440. '**** Targets ****
  441. '***********************************************************************************
  442. Sub sw70_Hit:sw70p.TransX = 4:vpmTimer.PulseSw(swLeftSpotTarget):Me.TimerEnabled = 1:PlaySound SoundFX("Target",DOFTargets),1:End Sub
  443. Sub sw70_Timer:sw70p.TransX = 0:Me.TimerEnabled = 0:End Sub
  444. Sub sw71_Hit:sw71p.TransX = 4:vpmTimer.PulseSw(swRightSpotTarget):Me.TimerEnabled = 1:PlaySound SoundFX("Target",DOFTargets),1:End Sub
  445. Sub sw71_Timer:sw71p.TransX = 0:Me.TimerEnabled = 0:End Sub
  446. Sub sw40_Hit:sw40p.TransX = 4:vpmTimer.PulseSw(swSpotTarget1):Me.TimerEnabled = 1:PlaySound SoundFX("Target",DOFTargets),1:End Sub
  447. Sub sw40_Timer:sw40p.TransX = 0:Me.TimerEnabled = 0:End Sub
  448. Sub sw41_Hit:sw41p.TransX = 4:vpmTimer.PulseSw(swSpotTarget4):Me.TimerEnabled = 1:PlaySound SoundFX("Target",DOFTargets),1:End Sub
  449. Sub sw41_Timer:sw41p.TransX = 0:Me.TimerEnabled = 0:End Sub
  450. Sub sw50_Hit:sw50p.TransX = 4:vpmTimer.PulseSw(swSpotTarget2):Me.TimerEnabled = 1:PlaySound SoundFX("Target",DOFTargets),1:End Sub
  451. Sub sw50_Timer:sw50p.TransX = 0:Me.TimerEnabled = 0:End Sub
  452. Sub sw51_Hit:sw51p.TransX = 4:vpmTimer.PulseSw(swSpotTarget5):Me.TimerEnabled = 1:PlaySound SoundFX("Target",DOFTargets),1:End Sub
  453. Sub sw51_Timer:sw51p.TransX = 0:Me.TimerEnabled = 0:End Sub
  454. Sub sw60_Hit:sw60p.TransX = 4:vpmTimer.PulseSw(swSpotTarget3):Me.TimerEnabled = 1:PlaySound SoundFX("Target",DOFTargets),1:End Sub
  455. Sub sw60_Timer:sw60p.TransX = 0:Me.TimerEnabled = 0:End Sub
  456. Sub sw61_Hit:sw61p.TransX = 4:vpmTimer.PulseSw(swSpotTarget6):Me.TimerEnabled = 1:PlaySound SoundFX("Target",DOFTargets),1:End Sub
  457. Sub sw61_Timer:sw61p.TransX = 0:Me.TimerEnabled = 0:End Sub
  458.  
  459.  
  460.  
  461. '***********************************************************************************
  462. '**** Rollovers and triggers ****
  463. '***********************************************************************************
  464. Sub sw44_Hit():PlaySound "Sensor", 0:Controller.Switch(swTopRollover) = 1:sw44p.Visible = 0:End Sub
  465. Sub sw44_UnHit():Controller.Switch(swTopRollover) = 0:sw44p.Visible = 1:End Sub
  466. Sub sw45_Hit():PlaySound "Sensor", 0:Controller.Switch(swLeftOutlane) = 1:sw45p.Visible = 0:End Sub
  467. Sub sw45_UnHit():Controller.Switch(swLeftOutlane) = 0:sw45p.Visible = 1:End Sub
  468. Sub sw55_Hit():PlaySound "Sensor", 0:Controller.Switch(swLeftReturnlane) = 1:sw55p.Visible = 0:End Sub
  469. Sub sw55_UnHit():Controller.Switch(swLeftReturnlane) = 0:sw55p.Visible = 1:End Sub
  470. Sub sw65_Hit():PlaySound "Sensor", 0:Controller.Switch(swRightReturnlane) = 1:sw65p.Visible = 0:End Sub
  471. Sub sw65_UnHit():Controller.Switch(swRightReturnlane) = 0:sw65p.Visible = 1:End Sub
  472. Sub sw75_Hit():PlaySound "Sensor", 0:Controller.Switch(swRightOutlane) = 1:sw75p.Visible = 0:End Sub
  473. Sub sw75_UnHit():Controller.Switch(swRightOutlane) = 0:sw75p.Visible = 1:End Sub
  474. Sub TopKickerTrigger_Hit():PlaySound "Sensor", 0:TopKickerTriggerP.Visible = 0:End Sub
  475. Sub TopKickerTrigger_UnHit():TopKickerTriggerP.Visible = 1:End Sub
  476. Sub RightKickerTrigger_Hit():PlaySound "Sensor", 0:RightKickerTriggerP.Visible = 0:End Sub
  477. Sub RightKickerTrigger_UnHit():RightKickerTriggerP.Visible = 1:End Sub
  478. Sub swShooterLane_Hit():Set CurrentBall = ActiveBall:DOF dShooterLane, 1:End Sub
  479. Sub ShooterLane_UnHit():DOF dShooterLane, 0:End Sub
  480.  
  481.  
  482.  
  483. '***********************************************************************************
  484. '**** Spinners and gates ****
  485. '***********************************************************************************
  486. Sub sw30_Hit():PlaySound "Gate", 0:Controller.Switch(swTopRightRampRollunder) = 1:End Sub
  487. Sub sw30_UnHit():Controller.Switch(swTopRightRampRollunder) = 0:End Sub
  488. Sub sw43_Hit():PlaySound "Gate", 0:Controller.Switch(swTopLeftRampRollunder) = 1:End Sub
  489. Sub sw43_UnHit():Controller.Switch(swTopLeftRampRollunder) = 0:End Sub
  490. Sub sw53_Spin():PlaySound "Spinner", 0:vpmTimer.PulseSw (swLeftSpinner):End Sub
  491. Sub sw54_Spin():PlaySound "Spinner", 0:vpmTimer.PulseSw (swRightSpinner):End Sub
  492. Sub sw63_Hit():PlaySound "Gate", 0:Controller.Switch(swLeftRollUnder) = 1:End Sub
  493. Sub sw63_UnHit():Controller.Switch(swLeftRollUnder) = 0:End Sub
  494. Sub sw73_Hit():PlaySound "Gate", 0:Controller.Switch(swLeftTrackExitRollunder) = 1:End Sub
  495. Sub sw73_UnHit():Controller.Switch(swLeftTrackExitRollunder) = 0:End Sub
  496.  
  497.  
  498. '***********************************************************************************
  499. '**** Init siderails and stuff for desktop mode ****
  500. '***********************************************************************************
  501. Sub Backdrop_Init
  502. Dim iw
  503. If DesktopMode = True Then
  504. RampLB.Visible = 1:RampLT.Visible = 1:RampRB.Visible = 1:RampRT.Visible = 1
  505. For each iw in cBackdropLights: iw.Visible = True:Next
  506. LedsTimer.Interval = 33
  507. LedsTimer.Enabled = 1
  508. Else
  509. RampLB.Visible = 0:RampLT.Visible = 0:RampRB.Visible = 0:RampRT.Visible = 0
  510. For each iw in cBackdropLights: iw.Visible = False:Next
  511. End If
  512. End Sub
  513.  
  514.  
  515.  
  516. '***********************************************************************************
  517. '**** Light routines ****
  518. '***********************************************************************************
  519. Dim LampState(200), FadingState(200)
  520. Dim FlasherState(200), FlasherLevel(200), FlasherMaxLevel(200), FlasherUser(200), FlasherUpSpeed, FlasherDownSpeed
  521. Dim Bulb_Array: Bulb_Array = Array("Texture Bulb_off", "Texture Bulb_B", "Texture Bulb_A", "Texture Bulb_on")
  522. Dim DomeRed_Array: DomeRed_Array = Array("DomeRed_off", "DomeRed_B", "DomeRed_A", "DomeRed_on")
  523. Dim DomeOrange_Array: DomeOrange_Array = Array("DomeOrange_off", "DomeOrange_B", "DomeOrange_A", "DomeOrange_on")
  524. Dim DomeBlue_Array: DomeBlue_Array = Array("DomeBlue_off", "DomeBlue_B", "DomeBlue_A", "DomeBlue_on")
  525.  
  526. SolCallback(sFlashersTop) = "SolFlash lFlashersTop," ' Top Flashers
  527. SolCallback(sFlashersRight) = "SolFlash lFlashersRight," ' Right Flashers
  528. SolCallback(sFlashersLeft) = "SolFlash lFlashersLeft," ' Left Flashers
  529.  
  530. Sub SolFlash(nr, enabled)
  531. If enabled Then
  532. LampState(nr) = 1:FadingState(nr) = 5:FlasherState(nr) = 5
  533. Else
  534. LampState(nr) = 0:FadingState(nr) = 4:FlasherState(nr) = 4
  535. End If
  536. End Sub
  537.  
  538. Sub Illumination_Init
  539. AllLampsOff()
  540. AllFlashersOff()
  541. FlasherUpSpeed = 20
  542. FlasherDownSpeed = 4
  543. FlasherTimer.Interval = 10
  544. FlasherTimer.Enabled = 1
  545. LampTimer.Interval = 30
  546. LampTimer.Enabled = 1
  547. End Sub
  548.  
  549. Sub LampTimer_Timer()
  550. Dim chgLamp, num, chg, ii
  551. If Tilted Then Exit Sub
  552. chgLamp = Controller.ChangedLamps
  553. If Not IsEmpty(chgLamp) Then
  554. GameOn = True: If GI_On = False Then SetGIOn
  555. If DebugSwitch = False Then
  556. For ii = 0 To UBound(chgLamp)
  557. LampState(chgLamp(ii, 0) ) = chgLamp(ii, 1)
  558. FadingState(chgLamp(ii, 0) ) = chgLamp(ii, 1) + 4
  559. FlasherState(chgLamp(ii, 0) ) = chgLamp(ii, 1) + 4
  560. Next
  561. End If
  562. End If
  563. If DebugSwitch = False Then UpdateLamps
  564. End Sub
  565.  
  566. Sub AllLampsOff()
  567. Dim x
  568. For x = 0 to 200:LampState(x)=0:FadingState(x)=4:Next
  569. UpdateLamps:UpdateLamps:Updatelamps
  570. End Sub
  571.  
  572. Sub AllFlashersOff()
  573. Dim x
  574. For x = 0 to 200:FlasherState(x)=4:FlasherLevel(x)=0:FlasherMaxLevel(x)=MaxFlasherLevel:Next
  575. FlasherMaxLevel(lGI) = MaxGILevel
  576. End Sub
  577.  
  578. Sub AllOn
  579. Dim x
  580. LightshowTimer.Enabled = False
  581. AllLampsOff
  582. For x = 0 to 200:LampState(x)=1:FadingState(x)=5:FlasherState(x)=5:Next
  583. UpdateLamps:UpdateLamps:Updatelamps
  584. End Sub
  585.  
  586. Sub UpdateLamps
  587. If GameOn = False Then Exit Sub
  588. If LampState(lBallRelease) = 1 Then DoBallRelease:LampState(lBallRelease) = 0
  589. If LampState(lTopKicker) = 1 Then DoTopKicker:LampState(lTopKicker) = 0
  590. FadeLights LShootAgain, Array(l3, l3g)
  591. FadeLights lLeft50k1, Array(l5, l5g)
  592. FadeLights lLeft50k2, Array(l6, l6g)
  593. FadeLights lLeft50k3, Array(l7, l7g)
  594. FadeLights lLeft50k4, Array(l8, l8g)
  595. FadeLights lExtraBall, Array(l9, l9g)
  596. FadeLights lLeftOutlane, Array(l10, l10bg)
  597. FadeLights lRightOutlane, Array(l11, l11bg)
  598. FadeLights lLeft100k, Array(l70, l70g)
  599. FadeLights lRight100k, Array(l71, l71g)
  600. FadeLights lCenterLamps1, Array(l14a, l14b, l14ag, l14bg)
  601. nFadePrim lTopRamp, Bulb15, Bulb_Array
  602. FadeLight lTopRamp, l15
  603. FadeLights lCenterLamps2, Array(l16a, l16b, l16ag, l16bg)
  604. FadeLights lCar1, Array(l17a, l17b, l17ag, l17bg)
  605. FadeLights lCar2, Array(l18a, l18b, l18ag, l18bg)
  606. FadeLights lCar3, Array(l19a, l19b, l19ag, l19bg)
  607. FadeLights lCar4, Array(l20a, l20b, l20ag, l20bg)
  608. FadeLights lCar5, Array(l21a, l21b, l21ag, l21bg)
  609. FadeLights lCar6, Array(l22a, l22b, l22ag, l22bg)
  610. FadeLights lCar7, Array(l23a, l23b, l23ag, l23bg)
  611. FadeLights lCar8, Array(l24a, l24b, l24ag, l24bg)
  612. FadeLights lSpotTarget1, Array(l25a, l25b, l25ag, l25bg)
  613. FadeLights lSpotTarget2, Array(l26a, l26b, l26ag, l26bg)
  614. FadeLights lSpotTarget3, Array(l27a, l27b, l27ag, l27bg)
  615. FadeLights lSpotTarget4, Array(l28a, l28b, l28ag, l28bg)
  616. FadeLights lSpotTarget5, Array(l29a, l29b, l29ag, l29bg)
  617. FadeLights lSpotTarget6, Array(l30a, l30b, l30ag, l30bg)
  618. FadeLights lMultiplier1X, Array(l31, l31g)
  619. FadeLights lMultiplier2X, Array(l32, l32g)
  620. FadeLights lMultiplier4X, Array(l33, l33g)
  621. FadeLights lMultiplier8X, Array(l34, l34g)
  622. FadeLights lLeftSpinnerDouble, Array(l35, l35g)
  623. FadeLights lDropTarget1, Array(l36 , l36g)
  624. FadeLights lDropTarget2, Array(l37, l37g)
  625. FadeLights lDropTarget3, Array(l38, l38g)
  626. FadeLights lDropTarget4, Array(l39, l39g)
  627. FadeLights lDropTarget50k, Array(l40, l40g)
  628. FadeLights lDropTarget100k, Array(l41, l41g)
  629. FadeLights lDropTarget200k, Array(l42, l42g)
  630. FadeLights lDropTargetSpecial, Array(l43, l43g)
  631. FadeLight lRightExtraBall, l44
  632. FadeLights lTopRace, Array(l45a, l45b, l45ag, l45bg)
  633. FadeLights lRightBottomRace, Array(l46, l46g)
  634. FadeLights lRightSpinner, Array(l47a, l47b, l47ag, l47bg)
  635. FadeLights lLeftSpinner, Array(l51a, l51b, l51ag, l51bg)
  636. nFadePrim lFlashersRight, DomeRightRed, DomeRed_Array
  637. FadePrim lFlashersRight, DomeRightOrange, DomeOrange_Array
  638. nFadePrim lFlashersLeft, DomeLeftRed, DomeRed_Array
  639. FadePrim lFlashersLeft, DomeLeftOrange, DomeOrange_Array
  640. nFadePrim lFlashersTop, DomeLeftBlue, DomeBlue_Array
  641. FadePrim lFlashersTop, DomeRightBlue, DomeBlue_Array
  642. End Sub
  643.  
  644. Sub FadeLight(nr, light)
  645. Select Case FadingState(nr)
  646. Case 2:FadingState(nr) = 0
  647. Case 3:FadingState(nr) = 2
  648. Case 4:light.State = LightStateOff:FadingState(nr) = 3
  649. Case 5:light.State = LightStateOn:FadingState(nr) = 1
  650. End Select
  651. End Sub
  652.  
  653. Sub FadeLights(nr, lights)
  654. Dim ip
  655. Select Case FadingState(nr)
  656. Case 2:FadingState(nr) = 0
  657. Case 3:FadingState(nr) = 2
  658. Case 4:For each ip in lights:ip.State = LightStateOff:Next:FadingState(nr) = 3
  659. Case 5:For each ip in lights:ip.State = LightStateOn:Next:FadingState(nr) = 1
  660. End Select
  661. End Sub
  662.  
  663. Sub FadePrim(nr, prim, group)
  664. Select Case FadingState(nr)
  665. Case 2:prim.Image = group(0):prim.DisableLighting = 0:FadingState(nr) = 0
  666. Case 3:prim.Image = group(1):FadingState(nr) = 2
  667. Case 4:prim.Image = group(2):FadingState(nr) = 3
  668. Case 5:prim.Image = group(3):prim.DisableLighting = 1:FadingState(nr) = 1
  669. End Select
  670. End Sub
  671.  
  672. Sub nFadePrim(nr, prim, group)
  673. Select Case FadingState(nr)
  674. Case 2:prim.Image = group(0):prim.DisableLighting = 0
  675. Case 3:prim.Image = group(1)
  676. Case 4:prim.Image = group(2)
  677. Case 5:prim.Image = group(3):prim.DisableLighting = 1
  678. End Select
  679. End Sub
  680.  
  681. Sub FadePrims(nr, prims, group)
  682. Dim ip
  683. Select Case FadingState(nr)
  684. Case 2:For each ip in prims:ip.Image = group(0):Next:FadingState(nr) = 0
  685. Case 3:For each ip in prims:ip.Image = group(1):Next:FadingState(nr) = 2
  686. Case 4:For each ip in prims:ip.Image = group(2):Next:FadingState(nr) = 3
  687. Case 5:For each ip in prims:ip.Image = group(3):Next:FadingState(nr) = 1
  688. End Select
  689. End Sub
  690.  
  691. Sub SetGIOn
  692. For each i in GI_Bulbs: i.State = LightStateOn: Next
  693. FadingState(lGI) = 5: FlasherState(lGI) = 5
  694. GI_On = True
  695. End Sub
  696.  
  697. Sub FlasherTimer_Timer()
  698. Dim fi
  699. If GI_On = False Then Exit Sub
  700. FlashMultiple lGI, GI_Flashers, 8, 8
  701. FlashMultiple lFlashersLeft, Array(FlasherLeftRed, FlasherLeftOrange), 25, 5
  702. FlashMultiple lFlashersRight, Array(FlasherRightRed, FlasherRightOrange), 25, 5
  703. FlashMultiple lFlashersTop, Array(FlasherRightBlue, FlasherLeftBlue), 25, 5
  704. FlashMultiple lTopRamp, Array(Flasher15Bulb, Flasher15PF, Flasher15P1, Flasher15P2), 25, 5
  705. FlashMultiple lLightshowL1, Array(FL1L, FL6L), 50, 15
  706. FadeLights lLightshowL1, Array(FL1LG, FL6LG)
  707. FlashMultiple lLightshowL2, Array(FL2L, FL7L), 50, 15
  708. FadeLights lLightshowL2, Array(FL2LG, FL7LG)
  709. FlashMultiple lLightshowL3, Array(FL3L, FL8L), 50, 15
  710. FadeLights lLightshowL3, Array(FL3LG, FL8LG)
  711. FlashMultiple lLightshowL4, Array(FL4L, FL9L), 50, 15
  712. FadeLights lLightshowL4, Array(FL4LG, FL9LG)
  713. FlashMultiple lLightshowL5, Array(FL5L, FL10L), 50, 15
  714. FadeLights lLightshowL5, Array(FL5LG, FL10LG)
  715. FlashMultiple lLightshowR1, Array(FL1R, FL6R), 50, 15
  716. FadeLights lLightshowR1, Array(FL1RG, FL6RG)
  717. FlashMultiple lLightshowR2, Array(FL2R, FL7R), 50, 15
  718. FadeLights lLightshowR2, Array(FL2RG, FL7RG)
  719. FlashMultiple lLightshowR3, Array(FL3R, FL8R), 50, 15
  720. FadeLights lLightshowR3, Array(FL3RG, FL8RG)
  721. FlashMultiple lLightshowR4, Array(FL4R, FL9R), 50, 15
  722. FadeLights lLightshowR4, Array(FL4RG, FL9RG)
  723. FlashMultiple lLightshowR5, Array(FL5R, FL10R), 50, 15
  724. FadeLights lLightshowR5, Array(FL5RG, FL10RG)
  725. End Sub
  726.  
  727. Sub AllFlashersOff()
  728. Dim x
  729. For x = 0 to 200:FlasherState(x)=4:FlasherLevel(x)=0:FlasherUser(x)=0:Next
  730. SetMaxIlluLevels
  731. End Sub
  732.  
  733. Sub Flashers_Init
  734. Dim ifl, F_Array
  735. F_Array = Array(Array(FL1L, 465, 286, 184, 465, 255, 241,1), Array(FL2L, 430, 348, 184, 430, 317, 241,1), Array(FL3L, 379, 400, 184, 379, 369, 241,1), _
  736. Array(FL4L, 324, 454, 184, 324, 423, 241,1), Array(FL5L, 269, 508, 184, 269, 477, 241,1), Array(FL6L, 215, 562, 182, 215, 531, 241,1), _
  737. Array(FL7L, 158, 617, 175, 158, 586, 241,1), Array(FL8L, 103, 673, 170, 103, 642, 241,1), Array(FL9L, 62, 744, 163, 62, 713, 241,1), _
  738. Array(FL10L, 59, 819, 159, 59, 788, 241,1), Array(FL1R, 918, 355, 184, 918, 324, 241,1), Array(FL2R, 900, 418, 183, 900, 387, 241,1), _
  739. Array(FL3R, 882, 481, 182, 882, 450, 241,1), Array(FL4R, 866, 546, 182, 866, 515, 241,1), Array(FL5R, 849, 614, 181, 849, 583, 241,1), _
  740. Array(FL6R, 835, 689, 181, 835, 658, 241,1), Array(FL7R, 829, 761, 181, 829, 730, 241,1), Array(FL8R, 825, 841, 178, 825, 810, 241,1), _
  741. Array(FL9R, 821, 922, 169, 821, 891, 241,1), Array(FL10R, 816, 999, 164, 816, 968, 241,1), Array(FlasherRightRed, 817, 1153, 171, 767, 1335, 241,0), _
  742. Array(FlasherRightOrange, 873, 1245, 171, 813, 1418, 241,0), Array(FlasherLeftRed, 61, 989, 171, 111, 1171, 241,0), Array(FlasherLeftOrange, 58, 1083, 171, 118, 1256, 241,0), _
  743. Array(FlasherLeftBlue, 363, 187, 228, 383, 473, 241,0), Array(FlasherRightBlue, 448, 187, 228, 448, 473, 241,0))
  744. For each ifl in F_Array
  745. If (DesktopMode = False) Then
  746. ifl(0).RotX = -Victory.InclinationFS / 2
  747. ifl(0).X = ifl(1)
  748. ifl(0).Y = ifl(2)
  749. ifl(0).Height = ifl(3)
  750. Else
  751. If ifl(7) = 1 Then
  752. ifl(0).X = ifl(1)
  753. ifl(0).Y = ifl(2) + 10
  754. ifl(0).Height = ifl(3)
  755. ifl(0).RotX = -Victory.Inclination / 2
  756. Else
  757. ifl(0).X = ifl(4)
  758. ifl(0).Y = ifl(5)
  759. ifl(0).Height = ifl(6)
  760. End If
  761. End If
  762. Next
  763. End Sub
  764.  
  765. Sub SetMaxIlluLevels
  766. Dim x
  767. For x = 0 to 200:FlasherMaxLevel(x)=MaxFlasherLevel:Next
  768. FlasherMaxLevel(LGI) = MaxGILevel
  769. FlasherMaxLevel(lFlashersLeft) = MaxFlasherLevel
  770. FlasherMaxLevel(lFlashersRight) = MaxFlasherLevel
  771. FlasherMaxLevel(lFlashersTop) = MaxFlasherLevel
  772. FlasherMaxLevel(lTopRamp) = MaxFlasherLevel
  773. End Sub
  774.  
  775. Sub FlashSingle(nr, object, stepup, stepdown)
  776. Select Case FlasherState(nr)
  777. Case 4 'off
  778. FlasherLevel(nr) = FlasherLevel(nr) - stepdown
  779. If FlasherLevel(nr) < 0 Then
  780. FlasherLevel(nr) = 0
  781. FlasherState(nr) = 0 'completely off
  782. End if
  783. Object.Opacity = FlasherLevel(nr)
  784. Case 5 ' on
  785. FlasherLevel(nr) = FlasherLevel(nr) + stepup
  786. If FlasherLevel(nr) > FlasherMaxLevel(nr) Then
  787. FlasherLevel(nr) = FlasherMaxLevel(nr)
  788. FlasherState(nr) = 1 'completely on
  789. End if
  790. Object.Opacity = FlasherLevel(nr)
  791. Case 6 ' Pulse
  792. FlasherLevel(nr) = FlasherLevel(nr) + stepup
  793. If FlasherLevel(nr) > FlasherMaxLevel(nr) Then
  794. FlasherLevel(nr) = FlasherMaxLevel(nr)
  795. FlasherState(nr) = 4 'switch to off
  796. End if
  797. Object.Opacity = FlasherLevel(nr)
  798. End Select
  799. End Sub
  800.  
  801. Sub FlashMultiple(nr, object, stepup, stepdown)
  802. Dim ih
  803. Select Case FlasherState(nr)
  804. Case 4 'off
  805. FlasherLevel(nr) = FlasherLevel(nr) - stepdown
  806. If FlasherLevel(nr) < 0 Then
  807. FlasherLevel(nr) = 0
  808. FlasherState(nr) = 0 'completely off
  809. End If
  810. For each ih in object:ih.Opacity = FlasherLevel(nr):Next
  811. Case 5 ' on
  812. FlasherLevel(nr) = FlasherLevel(nr) + stepup
  813. If FlasherLevel(nr) > FlasherMaxLevel(nr) Then
  814. FlasherLevel(nr) = FlasherMaxLevel(nr)
  815. FlasherState(nr) = 1 'completely on
  816. End if
  817. For each ih in object:ih.Opacity = FlasherLevel(nr):Next
  818. Case 6 ' Pulse
  819. FlasherLevel(nr) = FlasherLevel(nr) + stepup
  820. If FlasherLevel(nr) > FlasherMaxLevel(nr) Then
  821. FlasherLevel(nr) = FlasherMaxLevel(nr)
  822. FlasherState(nr) = 4 'switch to off
  823. End if
  824. For each ih in object:ih.Opacity = FlasherLevel(nr):Next
  825. End Select
  826. End Sub
  827.  
  828. Dim LightshowCycle, LightshowSide: LightshowSide = 0
  829. Dim Virtual_L13_Lamps: Virtual_L13_Lamps=Array(lLeft100k, lRight100k)
  830. Dim LightshowStartBulbs: LightshowStartBulbs = Array(lLightshowL1, lLightshowR1)
  831. Dim oldL13_state
  832.  
  833. Sub LightshowTimer_Timer
  834. FlasherState(LightshowStartBulbs(LightshowSide)+LightshowCycle) = 4
  835. FadingState(LightshowStartBulbs(LightshowSide)+LightshowCycle) = 4
  836. LightshowCycle = (LightshowCycle + 1) Mod 5
  837. FlasherState(LightshowStartBulbs(LightshowSide)+LightshowCycle) = 5
  838. FadingState(LightshowStartBulbs(LightshowSide)+LightshowCycle) = 5
  839. If FadingState(l100k) <> oldL13_state Then
  840. FadingState(Virtual_L13_Lamps(LightshowSide)) = FadingState(l100k)
  841. oldL13_state = FadingState(l100k)
  842. End If
  843. End Sub
  844.  
  845. Sub LightshowChangeSide
  846. Dim oldlampstate: oldlampstate = FadingState(Virtual_L13_Lamps(LightshowSide))
  847. FadingState(Virtual_L13_Lamps(LightshowSide)) = 4
  848. LightshowTimer.Enabled = False
  849. LightshowClr(LightshowSide)
  850. LightshowSide = LightshowSide XOR 1
  851. If ((oldlampstate = 5) OR (oldlampstate = 1)) Then FadingState(Virtual_L13_Lamps(LightshowSide)) = 5
  852. LightshowTimer.Enabled = True
  853. End Sub
  854.  
  855. Sub LightshowClr(side)
  856. Dim li
  857. For li = 0 to 4:FlasherState(LightshowStartBulbs(side)+li) = 4:FadingState(LightshowStartBulbs(side)+li) = 4:Next
  858. LightshowCycle = 9
  859. End Sub
  860.  
  861. Sub Lightshow_Init
  862. LightshowClr 0: LightshowClr 1: LightshowCycle = 9
  863. LightshowTimer.Interval = 150
  864. LightshowTimer.Enabled = True
  865. End Sub
  866.  
  867. Dim Digits(40)
  868. Digits(0) = Array(a00, a05, a0c, a0d, a08, a01, a06, a0f, a02, a03, a04, a07, a0b, a0a, a09, a0e)
  869. Digits(1) = Array(a10, a15, a1c, a1d, a18, a11, a16, a1f, a12, a13, a14, a17, a1b, a1a, a19, a1e)
  870. Digits(2) = Array(a20, a25, a2c, a2d, a28, a21, a26, a2f, a22, a23, a24, a27, a2b, a2a, a29, a2e)
  871. Digits(3) = Array(a30, a35, a3c, a3d, a38, a31, a36, a3f, a32, a33, a34, a37, a3b, a3a, a39, a3e)
  872. Digits(4) = Array(a40, a45, a4c, a4d, a48, a41, a46, a4f, a42, a43, a44, a47, a4b, a4a, a49, a4e)
  873. Digits(5) = Array(a50, a55, a5c, a5d, a58, a51, a56, a5f, a52, a53, a54, a57, a5b, a5a, a59, a5e)
  874. Digits(6) = Array(a60, a65, a6c, a6d, a68, a61, a66, a6f, a62, a63, a64, a67, a6b, a6a, a69, a6e)
  875. Digits(7) = Array(a70, a75, a7c, a7d, a78, a71, a76, a7f, a72, a73, a74, a77, a7b, a7a, a79, a7e)
  876. Digits(8) = Array(a80, a85, a8c, a8d, a88, a81, a86, a8f, a82, a83, a84, a87, a8b, a8a, a89, a8e)
  877. Digits(9) = Array(a90, a95, a9c, a9d, a98, a91, a96, a9f, a92, a93, a94, a97, a9b, a9a, a99, a9e)
  878. Digits(10) = Array(aa0, aa5, aac, aad, aa8, aa1, aa6, aaf, aa2, aa3, aa4, aa7, aab, aaa, aa9, aae)
  879. Digits(11) = Array(ab0, ab5, abc, abd, ab8, ab1, ab6, abf, ab2, ab3, ab4, ab7, abb, aba, ab9, abe)
  880. Digits(12) = Array(ac0, ac5, acc, acd, ac8, ac1, ac6, acf, ac2, ac3, ac4, ac7, acb, aca, ac9, ace)
  881. Digits(13) = Array(ad0, ad5, adc, add, ad8, ad1, ad6, adf, ad2, ad3, ad4, ad7, adb, ada, ad9, ade)
  882. Digits(14) = Array(ae0, ae5, aec, aed, ae8, ae1, ae6, aef, ae2, ae3, ae4, ae7, aeb, aea, ae9, aee)
  883. Digits(15) = Array(af0, af5, afc, afd, af8, af1, af6, aff, af2, af3, af4, af7, afb, afa, af9, afe)
  884. Digits(16) = Array(b00, b05, b0c, b0d, b08, b01, b06, b0f, b02, b03, b04, b07, b0b, b0a, b09, b0e)
  885. Digits(17) = Array(b10, b15, b1c, b1d, b18, b11, b16, b1f, b12, b13, b14, b17, b1b, b1a, b19, b1e)
  886. Digits(18) = Array(b20, b25, b2c, b2d, b28, b21, b26, b2f, b22, b23, b24, b27, b2b, b2a, b29, b2e)
  887. Digits(19) = Array(b30, b35, b3c, b3d, b38, b31, b36, b3f, b32, b33, b34, b37, b3b, b3a, b39, b3e)
  888. Digits(20) = Array(b40, b45, b4c, b4d, b48, b41, b46, b4f, b42, b43, b44, b47, b4b, b4a, b49, b4e)
  889. Digits(21) = Array(b50, b55, b5c, b5d, b58, b51, b56, b5f, b52, b53, b54, b57, b5b, b5a, b59, b5e)
  890. Digits(22) = Array(b60, b65, b6c, b6d, b68, b61, b66, b6f, b62, b63, b64, b67, b6b, b6a, b69, b6e)
  891. Digits(23) = Array(b70, b75, b7c, b7d, b78, b71, b76, b7f, b72, b73, b74, b77, b7b, b7a, b79, b7e)
  892. Digits(24) = Array(b80, b85, b8c, b8d, b88, b81, b86, b8f, b82, b83, b84, b87, b8b, b8a, b89, b8e)
  893. Digits(25) = Array(b90, b95, b9c, b9d, b98, b91, b96, b9f, b92, b93, b94, b97, b9b, b9a, b99, b9e)
  894. Digits(26) = Array(ba0, ba5, bac, bad, ba8, ba1, ba6, baf, ba2, ba3, ba4, ba7, bab, baa, ba9, bae)
  895. Digits(27) = Array(bb0, bb5, bbc, bbd, bb8, bb1, bb6, bbf, bb2, bb3, bb4, bb7, bbb, bba, bb9, bbe)
  896. Digits(28) = Array(bc0, bc5, bcc, bcd, bc8, bc1, bc6, bcf, bc2, bc3, bc4, bc7, bcb, bca, bc9, bce)
  897. Digits(29) = Array(bd0, bd5, bdc, bdd, bd8, bd1, bd6, bdf, bd2, bd3, bd4, bd7, bdb, bda, bd9, bde)
  898. Digits(30) = Array(be0, be5, bec, bed, be8, be1, be6, bef, be2, be3, be4, be7, beb, bea, be9, bee)
  899. Digits(31) = Array(bf0, bf5, bfc, bfd, bf8, bf1, bf6, bff, bf2, bf3, bf4, bf7, bfb, bfa, bf9, bfe)
  900. Digits(32) = Array(c00, c05, c0c, c0d, c08, c01, c06, c0f, c02, c03, c04, c07, c0b, c0a, c09, c0e)
  901. Digits(33) = Array(c10, c15, c1c, c1d, c18, c11, c16, c1f, c12, c13, c14, c17, c1b, c1a, c19, c1e)
  902. Digits(34) = Array(c20, c25, c2c, c2d, c28, c21, c26, c2f, c22, c23, c24, c27, c2b, c2a, c29, c2e)
  903. Digits(35) = Array(c30, c35, c3c, c3d, c38, c31, c36, c3f, c32, c33, c34, c37, c3b, c3a, c39, c3e)
  904. Digits(36) = Array(c40, c45, c4c, c4d, c48, c41, c46, c4f, c42, c43, c44, c47, c4b, c4a, c49, c4e)
  905. Digits(37) = Array(c50, c55, c5c, c5d, c58, c51, c56, c5f, c52, c53, c54, c57, c5b, c5a, c59, c5e)
  906. Digits(38) = Array(c60, c65, c6c, c6d, c68, c61, c66, c6f, c62, c63, c64, c67, c6b, c6a, c69, c6e)
  907. Digits(39) = Array(c70, c75, c7c, c7d, c78, c71, c76, c7f, c72, c73, c74, c77, c7b, c7a, c79, c7e)
  908.  
  909. Sub LedsTimer_Timer()
  910. On Error Resume Next
  911. Dim ChgLED,ii,num,chg,stat,obj
  912.  
  913. ChgLED = Controller.ChangedLEDs(&HFFFFFFFF, &HFFFFFFFF)
  914. If Not IsEmpty(ChgLED) Then
  915. For ii = 0 To UBound(ChgLED)
  916. num = chgLED(ii, 0) : chg = chgLED(ii, 1) : stat = chgLED(ii, 2)
  917. For Each obj In Digits(num)
  918. If chg And 1 Then obj.State = stat And 1
  919. chg = chg\2 : stat = stat\2
  920. Next
  921. Next
  922. End IF
  923. End Sub
  924.  
  925. Sub DOF(dofevent, dofstate)
  926. If cController < 3 Then Exit Sub
  927. If dofstate = 2 Then
  928. Controller.B2SSetData dofevent, 1:Controller.B2SSetData dofevent, 0
  929. Else
  930. Controller.B2SSetData dofevent, dofstate
  931. End If
  932. End Sub
  933.  
  934.  
  935.  
  936. '***********************************************************************************
  937. '**** Sound routines ****
  938. '***********************************************************************************
  939. Dim BallFalling: BallFalling = 0
  940. Sub cWalls_Rubber_Hit(idx):PlaySound "RubberHit", 0, Vol(ActiveBall), pan(ActiveBall), 0.25:End Sub
  941. Sub cWalls_Metal_Hit(idx):PlaySound "MetalHit", 0, Vol(ActiveBall), pan(ActiveBall), 0.25:End Sub
  942. Sub cTrackEntries_Hit(idx):PlaySound "BallRollingMetal":End Sub
  943. Sub cTrackExits_Hit(idx):If ActiveBall.z > 50 Then:StopSound "BallRolling": BallFalling = 1:End If:End Sub
  944. Sub cTrackExits_UnHit(idx):If BallFalling = 1 Then:PlaySound "BallHit", 0:BallFalling = 0:End If:End Sub
  945.  
  946. Sub SoundPlay(snd, sol)
  947. If sol = 0 Then
  948. PlaySound snd
  949. Exit Sub
  950. End If
  951. If cController < 4 Then PlaySound snd
  952. End Sub
  953.  
  954. Function Vol(ball) ' Calculates the Volume of the sound based on the ball speed
  955. Vol = Csng(BallVel(ball) ^2 / 1000)
  956. End Function
  957.  
  958. Function Pan(ball) ' Calculates the pan for a ball based on the X position on the table
  959. Dim tmp
  960. tmp = ball.x * 2 / 951
  961. If tmp > 0 Then
  962. Pan = Csng(tmp ^10)
  963. Else
  964. Pan = Csng(-((- tmp) ^10) )
  965. End If
  966. End Function
  967.  
  968. Function Pitch(ball) ' Calculates the pitch of the sound based on the ball speed
  969. Pitch = BallVel(ball) * 20
  970. End Function
  971.  
  972. Function BallVel(ball)
  973. BallVel = INT(SQR((ball.VelX ^2) + (ball.VelY ^2) ) )
  974. End Function
  975.  
  976. Function OnPlayfield(ball)
  977. If ball.Z < 30 Then
  978. OnPlayfield = True
  979. Exit Function
  980. End If
  981. If ball.z <75 Then
  982. OnPlayfield = False
  983. Exit Function
  984. End If
  985. If ball.Z < 80 Then
  986. OnPlayfield = True
  987. Exit Function
  988. End If
  989. OnPlayfield = False
  990. End Function
  991.  
  992. '*****************************************
  993. ' JP's VP10 Rolling Sounds
  994. '*****************************************
  995. Const tnob = 4 ' total number of balls
  996. ReDim rolling(tnob)
  997.  
  998. Sub Rolling_Init
  999. Dim i
  1000. For i = 0 to tnob
  1001. rolling(i) = False
  1002. Next
  1003. End Sub
  1004.  
  1005. Sub RollingSound()
  1006. Dim BOT, b
  1007. BOT = GetBalls
  1008.  
  1009. ' stop the sound of deleted balls
  1010. For b = UBound(BOT) + 1 to tnob
  1011. rolling(b) = False
  1012. StopSound("BallRolling" & b)
  1013. Next
  1014.  
  1015. ' exit the sub if no balls on the table
  1016. If UBound(BOT) = -1 Then Exit Sub
  1017.  
  1018. ' play the rolling sound for each ball
  1019. For b = 0 to UBound(BOT)
  1020. If BallVel(BOT(b) ) > 1 AND OnPlayfield(BOT(b) ) Then
  1021. rolling(b) = True
  1022. PlaySound("BallRolling" & b), -1, Vol(BOT(b) ), Pan(BOT(b) ), 0, Pitch(BOT(b) ), 1, 0
  1023. Else
  1024. If rolling(b) = True Then
  1025. StopSound("BallRolling" & b)
  1026. rolling(b) = False
  1027. End If
  1028. End If
  1029. Next
  1030. End Sub
  1031.  
  1032. '**********************
  1033. ' Ball Collision Sound
  1034. '**********************
  1035.  
  1036. Sub OnBallBallCollision(ball1, ball2, velocity)
  1037. PlaySound("BallCollision"), 0, Csng(velocity) ^2 / 2000, Pan(ball1), 0, Pitch(ball1), 0, 0
  1038. End Sub
  1039.  
  1040.  
  1041.  
  1042. '***********************************************************************************
  1043. '**** DIP switch routines (parts by Luvthatapex) ****
  1044. '***********************************************************************************
  1045. Dim TableOptions, TableName
  1046.  
  1047. Sub CustomizeTable
  1048. OptionsEdit
  1049. End Sub
  1050.  
  1051. Sub OptionsEdit
  1052. Dim DT_offs: DT_offs = 0
  1053. Dim vpmDips1: Set vpmDips1 = New cvpmDips
  1054. With vpmDips1
  1055. If DesktopMode = False Then
  1056. .AddForm 350, 480, "Victory - Table Options"
  1057. .AddLabel 0,0,120,15,"Controller Options"
  1058. .AddFrameExtra 15,15,205,"Controller Selection*",&H00000070, Array("Read from cController.txt", 0, "Visual PinMame", &H00000010, "UVP Server", &H00000020, _
  1059. "B2S Server", &H00000030, "B2S Server no mech sounds", &H00000040)
  1060. DT_offs = 125
  1061. Else
  1062. .AddForm 350, 380, "Victory - Table Options"
  1063. End If
  1064.  
  1065. .AddLabel 0,0 + DT_offs,110,15,"Sound Options"
  1066. .AddChkExtra 15,15 + DT_offs,155, Array("Enable dull flippers*", &H00000080)
  1067. .AddLabel 0,45 + DT_offs,180,15,"Graphics Options"
  1068. .AddFrameExtra 15,60 + DT_offs,205,"GI Brigthness*",&H00000300, Array("100% (normal)", 0, "200% (bright)", &H00000100, "300% (brighter)", &H00000200)
  1069. .AddFrameExtra 15,140 + DT_offs,205,"Flasher Brigthness*",&H00000C00, Array("100% (normal)", 0, "200% (bright)", &H00000400, "300% (brighter)", &H00000800)
  1070. .AddLabel 0,215 + DT_offs,180,15,"Play Options"
  1071. .AddFrameExtra 15,230 + DT_offs,205,"Left Outlane*",&H00003000, Array("Liberal", 0, "Normal", &H00001000, "Difficult", &H00002000)
  1072. .AddChkExtra 0,305 + DT_offs,155, Array("Disable Menu Next Start", &H00000001)
  1073. End With
  1074. TableOptions = vpmDips1.ViewDipsExtra(TableOptions)
  1075. SaveValue TableName,"Options",TableOptions
  1076. OptionsToVariables
  1077. End Sub
  1078.  
  1079. Sub OptionsLoad
  1080. TableName="Victory"
  1081. Set vpmShowDips = GetRef("CustomizeTable")
  1082. TableOptions = LoadValue(TableName,"Options")
  1083. If TableOptions = "" Or OptionReset Then
  1084. TableOptions = 1
  1085. OptionsEdit
  1086. Else
  1087. If TableOptions And 1 = 0 Then
  1088. TableOptions = TableOptions OR 1
  1089. OptionsEdit
  1090. Else
  1091. OptionsToVariables
  1092. End If
  1093. End If
  1094. End Sub
  1095.  
  1096. Sub OptionsToVariables
  1097. Dim newGI, newFlash, newOL
  1098. If DesktopMode = False Then
  1099. 'cController = ((TableOptions AND &H00000070) / &H00000010)
  1100. Else
  1101. 'cController = 1
  1102. End If
  1103. DullFlippers = (TableOptions AND &H00000080) / &H00000080
  1104. newGI = (((TableOptions AND &H00000300) / &H00000100) + 1) * 100
  1105. newFlash = (((TableOptions AND &H00000C00) / &H00000400) + 1) * 100
  1106. If ((newGI <> MaxGILevel) OR (newFlash <> MaxFlasherLevel)) Then
  1107. MaxGILevel = newGI: MaxFlasherLevel = newFlash
  1108. If GI_On = True Then SetMaxIlluLevels: FlasherState(LGI) = 5
  1109. End If
  1110. newOL = ((TableOptions AND &H00003000) / &H00001000)
  1111. If newOL <> OutlaneLPos Then
  1112. OutlaneLPos = newOL
  1113. Outlanes_Init
  1114. End If
  1115. End Sub
  1116.  
  1117.  
  1118.  
  1119. '***********************************************************************************
  1120. '**** RealTime Updates ****
  1121. '***********************************************************************************
  1122. Set MotorCallback = GetRef("GameTimer")
  1123.  
  1124. Sub GameTimer
  1125. RollingSound
  1126. UpdateSpinners
  1127. UpdateFlippers
  1128. ' DebugShowAll
  1129. End Sub
  1130.  
  1131. Sub UpdateSpinners
  1132. sw30p.RotZ = -(sw30s.currentangle)
  1133. sw43p.RotZ = -(sw43s.currentangle)
  1134. sw53p.RotZ = -(sw53.currentangle)
  1135. sw54p.RotZ = -(sw54.currentangle)
  1136. sw63p.RotZ = -(sw63.currentangle)
  1137. sw73p.RotZ = -(sw73s.currentangle)
  1138. GateBRP.RotZ = ABS(GateBR.currentangle)
  1139. End Sub
  1140.  
  1141. Sub UpdateFlippers
  1142. FlipperLLP.RotY = FlipperLL.CurrentAngle
  1143. FlipperLRP.RotY = FlipperLR.CurrentAngle
  1144. FlipperULP.RotY = FlipperUL.CurrentAngle
  1145. FlipperURP.RotY = FlipperUR.CurrentAngle
  1146. End Sub
  1147.  
  1148.  
  1149.  
  1150. '***********************************************************************************
  1151. '**** Misc stuff ****
  1152. '***********************************************************************************
  1153. Dim Pi: Pi = 4 * Atn(1)
  1154. Function dSin(degrees)
  1155. dsin = sin(degrees * Pi/180)
  1156. if ABS(dSin) < 0.000001 Then dSin = 0
  1157. if ABS(dSin) > 0.999999 Then dSin = 1 * sgn(dSin)
  1158. End Function
  1159.  
  1160. Function dCos(degrees)
  1161. dCos = cos(degrees * Pi/180)
  1162. if ABS(dCos) < 0.000001 Then dCos = 0
  1163. if ABS(dCos) > 0.999999 Then dCos = 1 * sgn(dCos)
  1164. End Function
  1165.  
  1166.  
  1167.  
  1168. '***********************************************************************************
  1169. '**** Debug Stuff ****
  1170. '***********************************************************************************
  1171. Sub DebugPulseSwitch
  1172. Dim sw
  1173. sw = InputBox("Enter a number")
  1174. VPMTimer.PulseSw sw
  1175. End Sub
  1176.  
  1177. Sub DebugShowLamps
  1178. Dim ii,tmp: tmp= ""
  1179. For ii = 1 to 30:tmp = tmp & (Controller.Lamp(ii) AND 1):Next: tmp = tmp & Chr(13)
  1180. For ii = 31 to 60:tmp = tmp & (Controller.Lamp(ii) AND 1):Next: tmp = tmp & Chr(13)
  1181. For ii = 61 to 90:tmp = tmp & (Controller.Lamp(ii) AND 1):Next: tmp = tmp & Chr(13)
  1182. For ii = 91 to 120:tmp = tmp & (Controller.Lamp(ii) AND 1):Next
  1183. DebugText.Text = tmp
  1184. End Sub
  1185.  
  1186. Sub DebugShowSwitches
  1187. Dim ii,tmp: tmp= ""
  1188. For ii = 1 to 30:tmp = tmp & (Controller.Switch(ii) AND 1):Next: tmp = tmp & Chr(13)
  1189. For ii = 31 to 60:tmp = tmp & (Controller.Switch(ii) AND 1):Next: tmp = tmp & Chr(13)
  1190. For ii = 61 to 90:tmp = tmp & (Controller.Switch(ii) AND 1):Next: tmp = tmp & Chr(13)
  1191. For ii = 91 to 120:tmp = tmp & (Controller.Switch(ii) AND 1):Next
  1192. DebugText.Text = tmp
  1193. End Sub
  1194.  
  1195. Sub DebugShowSolenoids
  1196. Dim ii,tmp: tmp= ""
  1197. For ii = 1 to 30:tmp = tmp & (Controller.Solenoid(ii) AND 1):Next
  1198. DebugText.Text = tmp
  1199. End Sub
  1200.  
  1201. Sub DebugPosBall
  1202. CurrentBall.X = 245:CurrentBall.Y = 516:CurrentBall.Z = 25:CurrentBall.VelX = -3:CurrentBall.VelY = -40
  1203. End Sub
  1204.  
  1205. Sub DebugShowAll
  1206. Dim ii,tmp: tmp= "Solenoid Matrix" & Chr(13)
  1207. For ii = 1 to 30:tmp = tmp & (Controller.Solenoid(ii) AND 1):Next
  1208. tmp= tmp & Chr(13) & "Switch Matrix" & Chr(13)
  1209. For ii = 1 to 30:tmp = tmp & (Controller.Switch(ii) AND 1):Next: tmp = tmp & Chr(13)
  1210. For ii = 31 to 60:tmp = tmp & (Controller.Switch(ii) AND 1):Next
  1211. tmp= tmp & Chr(13) & "Lamp Matrix" & Chr(13)
  1212. For ii = 1 to 30:tmp = tmp & (Controller.Lamp(ii) AND 1):Next: tmp = tmp & Chr(13)
  1213. For ii = 31 to 60:tmp = tmp & (Controller.Lamp(ii) AND 1):Next: tmp = tmp & Chr(13)
  1214. For ii = 61 to 90:tmp = tmp & (Controller.Lamp(ii) AND 1):Next: tmp = tmp & Chr(13)
  1215. For ii = 91 to 120:tmp = tmp & (Controller.Lamp(ii) AND 1):Next
  1216. DebugText.Text = tmp
  1217. DebugText.Text = tmp
  1218. End Sub
  1219.  
  1220.  
  1221.  
  1222. '***********************************************************************************
  1223. '**** Lamp reference ****
  1224. '***********************************************************************************
  1225. Const lBallRelease = 2
  1226. Const lShootAgain = 3
  1227. Const lLeft50k1 = 5
  1228. Const lLeft50k2 = 6
  1229. Const lLeft50k3 = 7
  1230. Const lLeft50k4 = 8
  1231. Const lExtraBall = 9
  1232. Const lLeftOutlane = 10
  1233. Const lRightOutlane = 11
  1234. Const lTopKicker = 12
  1235. Const l100k = 13
  1236. Const lCenterLamps1 = 14
  1237. Const lTopRamp = 15
  1238. Const lCenterLamps2 = 16
  1239. Const lCar1 = 17
  1240. Const lCar2 = 18
  1241. Const lCar3 = 19
  1242. Const lCar4 = 20
  1243. Const lCar5 = 21
  1244. Const lCar6 = 22
  1245. Const lCar7 = 23
  1246. Const lCar8 = 24
  1247. Const lSpotTarget1 = 25
  1248. Const lSpotTarget2 = 26
  1249. Const lSpotTarget3 = 27
  1250. Const lSpotTarget4 = 28
  1251. Const lSpotTarget5 = 29
  1252. Const lSpotTarget6 = 30
  1253. Const lMultiplier1X = 31
  1254. Const lMultiplier2X = 32
  1255. Const lMultiplier4X = 33
  1256. Const lMultiplier8X = 34
  1257. Const lLeftSpinnerDouble = 35
  1258. Const lDropTarget1 = 36
  1259. Const lDropTarget2 = 37
  1260. Const lDropTarget3 = 38
  1261. Const lDropTarget4 = 39
  1262. Const lDropTarget50k = 40
  1263. Const lDropTarget100k = 41
  1264. Const lDropTarget200k = 42
  1265. Const lDropTargetSpecial = 43
  1266. Const lRightExtraBall = 44
  1267. Const lTopRace = 45
  1268. Const lRightBottomRace = 46
  1269. Const lRightSpinner = 47
  1270. Const lLeftSpinner = 51
  1271. ' start of virtual lamps
  1272. Const lLightshowL1 = 60
  1273. Const lLightshowL2 = 61
  1274. Const lLightshowL3 = 62
  1275. Const lLightshowL4 = 63
  1276. Const lLightshowL5 = 64
  1277. Const lLightshowR1 = 65
  1278. Const lLightshowR2 = 66
  1279. Const lLightshowR3 = 67
  1280. Const lLightshowR4 = 68
  1281. Const lLightshowR5 = 69
  1282. Const lLeft100k = 70
  1283. Const lRight100k = 71
  1284.  
  1285. Const lFlashersTop = 196 '(virtual lamp for top flashers)
  1286. Const lFlashersLeft = 197 '(virtual lamp for left flashers)
  1287. Const lFlashersRight = 198 '(virtual lamp for right flashers)
  1288. Const lGI = 199 '(virtual lamp for GI)
  1289.  
  1290. '***********************************************************************************
  1291. '**** Switch reference ****
  1292. '***********************************************************************************
  1293. Const swTopRightRampRollunder = 30
  1294. Const swSpotTarget1 = 40
  1295. Const swSpotTarget4 = 41
  1296. Const swDropTarget1 = 42
  1297. Const swTopLeftRampRollunder = 43
  1298. Const swTopRollover = 44
  1299. Const swLeftOutlane = 45
  1300. Const swSling = 46
  1301. Const swSpotTarget2 = 50
  1302. Const swSpotTarget5 = 51
  1303. Const swDropTarget2 = 52
  1304. Const swLeftSpinner = 53
  1305. Const swRightSpinner = 54
  1306. Const swLeftReturnlane = 55
  1307. Const swTrough = 56
  1308. Const swTiltMe = 57
  1309. Const swSpotTarget3 = 60
  1310. Const swSpotTarget6 = 61
  1311. Const swDropTarget3 = 62
  1312. Const swLeftRollUnder = 63
  1313. Const swTopKicker = 64
  1314. Const swRightReturnlane = 65
  1315. Const swOuthole = 66
  1316. Const swLeftSpotTarget = 70
  1317. Const swRightSpotTarget = 71
  1318. Const swDropTarget4 = 72
  1319. Const swLeftTrackExitRollunder = 73
  1320. Const swRightKicker = 74
  1321. Const swRightOutlane = 75
  1322. Const swHoleKicker = 76
  1323.  
  1324.  
  1325. '***********************************************************************************
  1326. '**** Solenoid reference ****
  1327. '***********************************************************************************
  1328. const sHoleKicker = 1
  1329. const sDropTargetsReset = 2
  1330. const sFlashersTop = 3
  1331. const sFlashersRight = 4
  1332. const sRightKicker = 5
  1333. const sFlashersLeft = 7
  1334. const sKnocker = 8
  1335. const sOuthole = 9
  1336. const sFlippersEnable = 10
  1337.  
  1338.  
  1339. '***********************************************************************************
  1340. '**** DOF reference ****
  1341. '***********************************************************************************
  1342. const dShooterLane = 201 ' Shooterlane
  1343. const dLeftSlingshot = 211 ' Left Slingshot
  1344. const dRightSlingshot = 212 ' Right Slingshot
  1345.  
  1346.  
  1347. Sub CreditsTimer_Timer()
  1348. End Sub
  1349.  
  1350. Sub SlingR_Hit()
  1351.  
  1352. End Sub
Advertisement
Add Comment
Please, Sign In to add comment