@@ -74,7 +74,12 @@ sub local_gameplay
74
74
InPassword = "--------"
75
75
SavedControls = ControlStyle
76
76
do
77
- PlayerSlot( 0 ).Difficulty = max(PlayerSlot( 1 ).Difficulty,max(PlayerSlot( 2 ).Difficulty,max(PlayerSlot( 3 ).Difficulty,PlayerSlot( 4 ).Difficulty)))
77
+ PlayerSlot( 0 ).Difficulty = max(PlayerSlot( 1 ).Difficulty, _
78
+ max(PlayerSlot( 2 ).Difficulty, _
79
+ max(PlayerSlot( 3 ).Difficulty, _
80
+ max(PlayerSlot( 4 ).Difficulty, _
81
+ max(PlayerSlot( 5 ).Difficulty, _
82
+ PlayerSlot( 6 ).Difficulty)))))
78
83
79
84
if ControlStyle > CTRL_KEYBOARD then
80
85
getJoystick(ControlStyle- 4 ,JoyButtonCombo,JoyAxis( 0 ),JoyAxis( 1 ),JoyAxis( 2 ),JoyAxis( 3 ),JoyAxis( 4 ),JoyAxis( 5 ),JoyAxis( 6 ),JoyAxis( 7 ))
@@ -267,12 +272,14 @@ sub local_gameplay
267
272
end if
268
273
269
274
'Score display
270
- if .DispScore < 1e6 then
275
+ if .Score < 1e6 then
271
276
ScoreRef = commaSep(.Score)
272
- elseif .DispScore < 1e8 then
277
+ elseif .Score < 1e8 then
273
278
ScoreRef = commaSep(int(.Score/ 1e3 ))+ "K"
274
- else
279
+ elseif .Score < 1e11 then
275
280
ScoreRef = commaSep(int(.Score/ 1e6 ))+ "M"
281
+ else
282
+ ScoreRef = commaSep(int(.Score/ 1e9 ))+ "B"
276
283
end if
277
284
ui_element(ScoreRef, 45 , 6 , 7 ,rgba( 255 , 255 , 255 , 224 ))
278
285
@@ -308,8 +315,10 @@ sub local_gameplay
308
315
ScoreRef = commaSep(ModdedHiScore)
309
316
elseif ModdedHiScore < 1e8 then
310
317
ScoreRef = commaSep(int(ModdedHiScore / 1e3 ))+ "K"
311
- else
318
+ elseif ModdedHiScore < 1e11 then
312
319
ScoreRef = commaSep(int(ModdedHiScore / 1e6 ))+ "M"
320
+ else
321
+ ScoreRef = commaSep(int(ModdedHiScore / 1e9 ))+ "B"
313
322
end if
314
323
315
324
TargetColoring = rgba( 255 , 255 , 255 , 224 )
@@ -324,8 +333,10 @@ sub local_gameplay
324
333
ScoreRef = commaSep(.Score)
325
334
elseif .Score < 1e8 then
326
335
ScoreRef = commaSep(int(.Score / 1e3 ))+ "K"
327
- else
336
+ elseif .Score < 1e11 then
328
337
ScoreRef = commaSep(int(.Score / 1e6 ))+ "M"
338
+ else
339
+ ScoreRef = commaSep(int(.Score / 1e9 ))+ "B"
329
340
end if
330
341
end if
331
342
elseif TargetPos = 1 then
@@ -395,6 +406,14 @@ sub local_gameplay
395
406
str(int(remainder(DispTime, 60 )/ 10 ))+ _
396
407
str(int(remainder(DispTime, 10 )))
397
408
ui_element(TimeStr, 560 , 6 , 5 ,DColor)
409
+ elseif SpeedRunner AND NumPlayers = 1 then
410
+ TimeRem = SpeedRunTimer / 60
411
+ DispTime = int(TimeRem+ 1 -( 1 e- 10 ))
412
+ TimeStr = str(int(DispTime/ 60 ))+ ":" + _
413
+ str(int(remainder(DispTime, 60 )/ 10 ))+ _
414
+ str(int(remainder(DispTime, 10 )))
415
+
416
+ ui_element(TimeStr, 560 , 6 , 5 ,rgba( 255 , 255 , 255 , 224 ))
398
417
elseif .WarpTimer < 3600 then
399
418
TimeRem = .WarpTimer / 60
400
419
DispTime = int(TimeRem+ 1 -( 1 e- 10 ))
@@ -534,7 +553,7 @@ sub local_gameplay
534
553
535
554
if PaddleHealth > 0 AND PaddleHealth < 110 * 60 then
536
555
dim as uinteger HealthColor
537
- dim as short DmgMulti = int(sqr(ActiveDifficulty + 0.5 ) )
556
+ dim as short DmgMulti = int(sqr(ActiveDifficulty) + 0.5 )
538
557
539
558
if PaddleHealth < 15 * DmgMulti * 60 then
540
559
HealthColor = rgb( 192 , 0 , 0 )
@@ -679,7 +698,7 @@ sub local_gameplay
679
698
dim as Basics Deepest
680
699
dim as short ObjsFound = 0
681
700
Deepest.Y = 600.0
682
- Deepest.X = DesireX
701
+ Deepest.X = Paddle( 1 ).X
683
702
684
703
for BID as short = 1 to NumBalls
685
704
with Ball(BID)
@@ -702,8 +721,10 @@ sub local_gameplay
702
721
end with
703
722
next CID
704
723
705
- if ObjsFound > 0 AND (abs(DesireX - Deepest.X) > PaddleSize/ 2 OR abs(DesireX - Deepest.X) < 1 ) then
706
- DesireX = Deepest.X + irandom(- 20 , 20 )
724
+ if ObjsFound > 0 AND (abs(DesireX - Deepest.X) > PaddleSize/ 2 OR abs(DesireX - Deepest.X) < PaddleSize/ 100 ) then
725
+ DesireX = Deepest.X + irandom(-PaddleSize/ 4 ,PaddleSize/ 4 )
726
+ elseif ObjsFound = 0 then
727
+ DesireX = Deepest.X
707
728
end if
708
729
elseif ControlStyle <= CTRL_LAPTOP then
709
730
Result = getmouse(MouseX, 0 , 0 ,ButtonCombo)
@@ -992,12 +1013,16 @@ sub local_gameplay
992
1013
WepCooldown -= 1
993
1014
end if
994
1015
1016
+ if SpeedRunner AND PlayerSlot( 1 ).Lives > 0 AND NumPlayers <= 1 then
1017
+ SpeedRunTimer += 1
1018
+ end if
1019
+
995
1020
if total_lives > 0 AND GamePaused = 0 AND LevelClear = 0 then
996
1021
if multikey(SC_TAB) then
997
1022
Instructions = "Auxilliary lists may not be accessed while a game is running."
998
1023
InstructExpire = timer + 7
999
1024
end if
1000
-
1025
+
1001
1026
InPassword = "--------"
1002
1027
if actionButton AND PaddleSize > 0 AND TotalBC > 0 AND WepCooldown = 0 then
1003
1028
if PlayerSlot(Player).BulletAmmo > 0 AND Bullet(BulletStart).Y <= MinPlayHeight - 20 AND Bullet(BulletStart+ 1 ).Y <= MinPlayHeight - 20 then
@@ -1551,6 +1576,8 @@ sub local_gameplay
1551
1576
gfxstring( "Unused gems : " +str(Bonuses( 3 )), 40 , 391 , 5 , 5 , 3 ,rgb( 255 , 255 , 255 ))
1552
1577
gfxstring( "Lives leftover : " +str(Bonuses( 4 )), 40 , 421 , 5 , 5 , 3 ,rgb( 255 , 255 , 255 ))
1553
1578
gfxstring( "Total bonus : " +str(Bonuses( 0 )), 40 , 451 , 5 , 5 , 3 ,rgb( 255 , 255 , 255 ))
1579
+
1580
+ SpeedRunTimer -= 1
1554
1581
else
1555
1582
line( 0 , 343 )-(LevelClear, 433 ),rgba( 0 , 0 , 0 , 64 ),bf
1556
1583
line( 0 , 343 )-(LevelClear, 343 ),rgb( 255 , 255 , 255 )
@@ -2317,7 +2344,7 @@ sub local_gameplay
2317
2344
if XDID > 0 AND XDID <= 20 *(CondensedLevel+ 1 ) AND _
2318
2345
YDID > 0 AND YDID <= 20 AND _
2319
2346
abs(XDID-XID) + abs(YDID-YID) = 1 AND _
2320
- PlayerSlot(Player).TileSet(XDID,YDID).BrickID <> PlayerSlot(Player).TileSet(XID,YID).BrickID then
2347
+ Pallete( PlayerSlot(Player).TileSet(XDID,YDID).BrickID).HitDegrade >= 0 then
2321
2348
AlreadySpread(XDID,YDID) = 1
2322
2349
PlayerSlot(Player).TileSet(XDID,YDID).BrickID = PlayerSlot(Player).TileSet(XID,YID).BrickID
2323
2350
if PlayerSlot(Player).TileSet(XDID,YDID).BaseBrickID = 0 then
@@ -2494,10 +2521,10 @@ sub local_gameplay
2494
2521
end if
2495
2522
2496
2523
if InPassword <> "--------" then
2497
- Instructions = "Password: " +InPassword+ " (Push 0-4 when done)"
2524
+ Instructions = "Password: " +InPassword+ " (Push 0-" +str(MaxPlayers)+ " when done)"
2498
2525
InstructExpire = timer + 1
2499
2526
2500
- for PID as ubyte = 0 to 4
2527
+ for PID as ubyte = 0 to MaxPlayers
2501
2528
if InType = str(PID) then
2502
2529
NumPlayers = PID
2503
2530
PassInput = 1
@@ -2540,7 +2567,7 @@ sub local_gameplay
2540
2567
if PlayerSlot( 0 ).Difficulty < 6 . 5 AND ShuffleLevels = 0 AND CampaignFolder <> EndlessFolder AND CampaignName <> PlaytestName AND Phase <> 0 then
2541
2568
Instructions = "Push F4 to open the level screen"
2542
2569
else
2543
- Instructions = "Push 0-4 to start a new campaign with that many players"
2570
+ Instructions = "Push 0-" +str(MaxPlayers)+ " to start a new campaign with that many players"
2544
2571
end if
2545
2572
InstructExpire = timer + 1
2546
2573
end if
@@ -2711,10 +2738,10 @@ sub local_gameplay
2711
2738
line( 0 , 0 )-( 1023 , 767 ),rgba( 128 , 128 , 255 ,( 100 -SpeedMod)/ 100 * 255 ),bf
2712
2739
end if
2713
2740
screencopy
2714
- while timer < FrameTime + 1 / 60 :sleep 1 : wend
2741
+ while timer < FrameTime + 1 / 60 :sleep 0 : wend
2715
2742
InType = inkey
2716
2743
if total_lives = 0 then
2717
- for PID as ubyte = 0 to 4
2744
+ for PID as ubyte = 0 to MaxPlayers
2718
2745
if InType = str(PID) AND InPassword = "--------" then
2719
2746
begin_local_game(PID, 1 )
2720
2747
@@ -2879,7 +2906,7 @@ sub local_gameplay
2879
2906
end if
2880
2907
loop
2881
2908
release_music
2882
- for PID as ubyte = 1 to 4
2909
+ for PID as ubyte = 1 to MaxPlayers
2883
2910
with PlayerSlot(PID)
2884
2911
if .Lives > 0 AND DQ = 0 then
2885
2912
TotalXP += int(.Score * .Difficulty)
0 commit comments