Skip to content

Commit eeba483

Browse files
committed
Mega-prep for next release
1 parent abbcd82 commit eeba483

File tree

7 files changed

+208
-73
lines changed

7 files changed

+208
-73
lines changed

NNLocal.bas

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ sub local_gameplay
7474
InPassword = "--------"
7575
SavedControls = ControlStyle
7676
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)))))
7883

7984
if ControlStyle > CTRL_KEYBOARD then
8085
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
267272
end if
268273

269274
'Score display
270-
if .DispScore < 1e6 then
275+
if .Score < 1e6 then
271276
ScoreRef = commaSep(.Score)
272-
elseif .DispScore < 1e8 then
277+
elseif .Score < 1e8 then
273278
ScoreRef = commaSep(int(.Score/1e3))+"K"
274-
else
279+
elseif .Score < 1e11 then
275280
ScoreRef = commaSep(int(.Score/1e6))+"M"
281+
else
282+
ScoreRef = commaSep(int(.Score/1e9))+"B"
276283
end if
277284
ui_element(ScoreRef,45,6,7,rgba(255,255,255,224))
278285

@@ -308,8 +315,10 @@ sub local_gameplay
308315
ScoreRef = commaSep(ModdedHiScore)
309316
elseif ModdedHiScore < 1e8 then
310317
ScoreRef = commaSep(int(ModdedHiScore / 1e3))+"K"
311-
else
318+
elseif ModdedHiScore < 1e11 then
312319
ScoreRef = commaSep(int(ModdedHiScore / 1e6))+"M"
320+
else
321+
ScoreRef = commaSep(int(ModdedHiScore / 1e9))+"B"
313322
end if
314323

315324
TargetColoring = rgba(255,255,255,224)
@@ -324,8 +333,10 @@ sub local_gameplay
324333
ScoreRef = commaSep(.Score)
325334
elseif .Score < 1e8 then
326335
ScoreRef = commaSep(int(.Score / 1e3))+"K"
327-
else
336+
elseif .Score < 1e11 then
328337
ScoreRef = commaSep(int(.Score / 1e6))+"M"
338+
else
339+
ScoreRef = commaSep(int(.Score / 1e9))+"B"
329340
end if
330341
end if
331342
elseif TargetPos = 1 then
@@ -395,6 +406,14 @@ sub local_gameplay
395406
str(int(remainder(DispTime,60)/10))+_
396407
str(int(remainder(DispTime,10)))
397408
ui_element(TimeStr,560,6,5,DColor)
409+
elseif SpeedRunner AND NumPlayers = 1 then
410+
TimeRem = SpeedRunTimer / 60
411+
DispTime = int(TimeRem+1-(1e-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))
398417
elseif .WarpTimer < 3600 then
399418
TimeRem = .WarpTimer / 60
400419
DispTime = int(TimeRem+1-(1e-10))
@@ -534,7 +553,7 @@ sub local_gameplay
534553

535554
if PaddleHealth > 0 AND PaddleHealth < 110 * 60 then
536555
dim as uinteger HealthColor
537-
dim as short DmgMulti = int(sqr(ActiveDifficulty + 0.5))
556+
dim as short DmgMulti = int(sqr(ActiveDifficulty) + 0.5)
538557

539558
if PaddleHealth < 15 * DmgMulti * 60 then
540559
HealthColor = rgb(192,0,0)
@@ -679,7 +698,7 @@ sub local_gameplay
679698
dim as Basics Deepest
680699
dim as short ObjsFound = 0
681700
Deepest.Y = 600.0
682-
Deepest.X = DesireX
701+
Deepest.X = Paddle(1).X
683702

684703
for BID as short = 1 to NumBalls
685704
with Ball(BID)
@@ -702,8 +721,10 @@ sub local_gameplay
702721
end with
703722
next CID
704723

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
707728
end if
708729
elseif ControlStyle <= CTRL_LAPTOP then
709730
Result = getmouse(MouseX,0,0,ButtonCombo)
@@ -992,12 +1013,16 @@ sub local_gameplay
9921013
WepCooldown -= 1
9931014
end if
9941015

1016+
if SpeedRunner AND PlayerSlot(1).Lives > 0 AND NumPlayers <= 1 then
1017+
SpeedRunTimer += 1
1018+
end if
1019+
9951020
if total_lives > 0 AND GamePaused = 0 AND LevelClear = 0 then
9961021
if multikey(SC_TAB) then
9971022
Instructions = "Auxilliary lists may not be accessed while a game is running."
9981023
InstructExpire = timer + 7
9991024
end if
1000-
1025+
10011026
InPassword = "--------"
10021027
if actionButton AND PaddleSize > 0 AND TotalBC > 0 AND WepCooldown = 0 then
10031028
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
15511576
gfxstring("Unused gems : "+str(Bonuses(3)),40,391,5,5,3,rgb(255,255,255))
15521577
gfxstring("Lives leftover : "+str(Bonuses(4)),40,421,5,5,3,rgb(255,255,255))
15531578
gfxstring("Total bonus : "+str(Bonuses(0)),40,451,5,5,3,rgb(255,255,255))
1579+
1580+
SpeedRunTimer -= 1
15541581
else
15551582
line(0,343)-(LevelClear,433),rgba(0,0,0,64),bf
15561583
line(0,343)-(LevelClear,343),rgb(255,255,255)
@@ -2317,7 +2344,7 @@ sub local_gameplay
23172344
if XDID > 0 AND XDID <= 20*(CondensedLevel+1) AND _
23182345
YDID > 0 AND YDID <= 20 AND _
23192346
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
23212348
AlreadySpread(XDID,YDID) = 1
23222349
PlayerSlot(Player).TileSet(XDID,YDID).BrickID = PlayerSlot(Player).TileSet(XID,YID).BrickID
23232350
if PlayerSlot(Player).TileSet(XDID,YDID).BaseBrickID = 0 then
@@ -2494,10 +2521,10 @@ sub local_gameplay
24942521
end if
24952522

24962523
if InPassword <> "--------" then
2497-
Instructions = "Password: "+InPassword+" (Push 0-4 when done)"
2524+
Instructions = "Password: "+InPassword+" (Push 0-"+str(MaxPlayers)+" when done)"
24982525
InstructExpire = timer + 1
24992526

2500-
for PID as ubyte = 0 to 4
2527+
for PID as ubyte = 0 to MaxPlayers
25012528
if InType = str(PID) then
25022529
NumPlayers = PID
25032530
PassInput = 1
@@ -2540,7 +2567,7 @@ sub local_gameplay
25402567
if PlayerSlot(0).Difficulty < 6.5 AND ShuffleLevels = 0 AND CampaignFolder <> EndlessFolder AND CampaignName <> PlaytestName AND Phase <> 0 then
25412568
Instructions = "Push F4 to open the level screen"
25422569
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"
25442571
end if
25452572
InstructExpire = timer + 1
25462573
end if
@@ -2711,10 +2738,10 @@ sub local_gameplay
27112738
line(0,0)-(1023,767),rgba(128,128,255,(100-SpeedMod)/100*255),bf
27122739
end if
27132740
screencopy
2714-
while timer < FrameTime + 1/60:sleep 1:wend
2741+
while timer < FrameTime + 1/60:sleep 0:wend
27152742
InType = inkey
27162743
if total_lives = 0 then
2717-
for PID as ubyte = 0 to 4
2744+
for PID as ubyte = 0 to MaxPlayers
27182745
if InType = str(PID) AND InPassword = "--------" then
27192746
begin_local_game(PID, 1)
27202747

@@ -2879,7 +2906,7 @@ sub local_gameplay
28792906
end if
28802907
loop
28812908
release_music
2882-
for PID as ubyte = 1 to 4
2909+
for PID as ubyte = 1 to MaxPlayers
28832910
with PlayerSlot(PID)
28842911
if .Lives > 0 AND DQ = 0 then
28852912
TotalXP += int(.Score * .Difficulty)

NNLocal.bi

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const NumHints = 4
22
const TrapThreshold = 200
33
const CheatScore = 20000000
4+
const LevelsPerPage = 28
45
dim shared as string CampaignName, CampaignLevelName, CampaignPassword, LevelDescription
56
dim shared as ushort StartingLives, HighLevel, CampaignBricks, _
67
SecretLevels, AttackBricks
@@ -697,7 +698,7 @@ function level_list as string
697698
dim as string LevelPass, OutPass
698699

699700
do
700-
AdjustPagination = min(max(SelectLevel-15,0),max(LevelsRegistered-29,0))
701+
AdjustPagination = min(max(SelectLevel-ceil(LevelsPerPage/2),0),max(LevelsRegistered-LevelsPerPage,0))
701702
LevelsRegistered = 0
702703
cls
703704
gfxstring("Level list for "+CampaignName,0,0,5,4,4,rgb(0,255,255))
@@ -717,7 +718,7 @@ function level_list as string
717718
if LegalLevel then
718719
LevelsRegistered += 1
719720

720-
if LevelsRegistered-AdjustPagination > 0 AND LevelsRegistered-AdjustPagination < 30 then
721+
if LevelsRegistered-AdjustPagination > 0 AND LevelsRegistered-AdjustPagination <= LevelsPerPage then
721722
if LevelsRegistered = SelectLevel then
722723
line(0,18+(LevelsRegistered-AdjustPagination)*25)-(1023,41+(LevelsRegistered-AdjustPagination)*25),rgb(0,0,128),bf
723724
LegalChoice = LegalLevel
@@ -728,6 +729,12 @@ function level_list as string
728729
end if
729730
end if
730731
next LevelID
732+
733+
if LevelsRegistered > 1 then
734+
gfxstring("Use [UP]/[DN] to navigate the levels. Press [ENTER] to quickly get a password.",0,20+(LevelsPerPage+1)*25,4,3,3,rgb(255,0,255))
735+
else
736+
gfxstring("No passwords have been collected for this campaign. Press [ESC] to return.",0,20+(LevelsPerPage+1)*25,4,3,3,rgb(255,0,255))
737+
end if
731738
screencopy
732739
sleep 15
733740
InType = inkey
@@ -740,9 +747,9 @@ function level_list as string
740747
elseif InType = DownArrow then
741748
SelectLevel += 1
742749
elseif InType = PageUp then
743-
SelectLevel -= 28
750+
SelectLevel -= LevelsPerPage - 1
744751
elseif InType = PageDn then
745-
SelectLevel += 28
752+
SelectLevel += LevelsPerPage - 1
746753
end if
747754

748755
if SelectLevel < 1 then
@@ -852,7 +859,8 @@ end sub
852859
sub brick_collisions(BallID as short)
853860
dim as ubyte HitFailed, PointsScored, ChooseParticle
854861
dim as uinteger ColorDestroyed
855-
dim as short ScoreMultiplier, BonusMultiplier, ActualGain, MinX, MaxX, MinY, MaxY, NewPalette
862+
dim as short ScoreMultiplier, BonusMultiplier, MinX, MaxX, MinY, MaxY, NewPalette
863+
dim as integer ActualGain
856864

857865
if CondensedLevel then
858866
MinX = (Ball(BallID).X-44)/24
@@ -1095,8 +1103,14 @@ sub generate_capsule(InX as byte, InY as byte, Explode as ubyte = 0)
10951103
else
10961104
CapWeight(CAP_LIFE) = 1
10971105
end if
1106+
1107+
if (SecretLevels > 0 AND .LevelNum >= SecretLevels - 1) OR _
1108+
(check_level(.LevelNum + 1) = "" AND CampaignFolder <> EndlessFolder) then
1109+
CapWeight(CAP_WARP) = 0
1110+
else
1111+
CapWeight(CAP_WARP) = 1
1112+
end if
10981113
end with
1099-
CapWeight(CAP_WARP) = 1
11001114

11011115
if TotalBC * 2 > NumBalls then
11021116
CapWeight(CAP_SPLIT_BALL) = 0
@@ -1730,6 +1744,7 @@ sub begin_local_game(InitPlayers as byte, InitLevel as short)
17301744
destroy_balls
17311745
destroy_capsules
17321746
LevelDesc = 0
1747+
SpeedRunTimer = 0
17331748

17341749
for HID as byte = 1 to 10
17351750
HighScore(HID).NewEntry = 0
@@ -1760,7 +1775,7 @@ sub begin_local_game(InitPlayers as byte, InitLevel as short)
17601775

17611776
NewPlrSlot.LevelNum = InitLevel
17621777
copy_wall
1763-
for PDID as ubyte = 1 to 4
1778+
for PDID as ubyte = 1 to MaxPlayers
17641779
DifficultyRAM(PDID) = PlayerSlot(PDID).Difficulty
17651780
PlayerSlot(PDID) = NewPlrSlot
17661781
PlayerSlot(PDID).Difficulty = DifficultyRAM(PDID)
@@ -1773,3 +1788,4 @@ sub begin_local_game(InitPlayers as byte, InitLevel as short)
17731788

17741789
FrameTime = timer
17751790
end sub
1791+

0 commit comments

Comments
 (0)