'HIGH SCORE DMD DISPLAY ROUTINE
'-----------------------------------------------------------------------------
sub TIMEDmoveletters_expired
TIMEDmoveletters.set false
moveletterhs
end sub
dim ChangeLetter'Selected initial
dim letter1'Name Initial 1
dim letter2'Name Initial 2
dim letter3'Name Initial 3
dim letter4'END letter
DIM ADER1
DIM ADER2
DIM ADER3
DIM ADER4
DIM ADER5
DIM ADER6
DIM ADER7
DIM AIZQ1
DIM AIZQ2
DIM AIZQ3
DIM AIZQ4
DIM AIZQ5
DIM AIZQ6
DIM AIZQ7
dim benterhighscoremode'Mode flag
dim SelectLetter'We are chosing the 1,2,3 letter, move up with enter
dim highscoremoveright'Move right true right flipper. false left flipper
dim tempnvname
dim giveacredit
dim temphsscore
dim tempposition
ChangeLetter=64
' 62 IS THE backspace
' 63 IS THE END
' 64 IS THE Space
Function FormatScore(num)
Dim n, f, s
n = CStr(num)
f = ""
do while len(n)>3
if len(f)>0 then
f = Right(n, 3) & "," & f
else
f = Right(n, 3)
end if
n = Left(n, Len(n)-3)
loop
if len(n)>0 then
if len(f) > 0 then
f = n & "," & f
else
f = n
end if
end if
FormatScore = f
End Function
Sub moveletterhs
if highscoremoveright=true then
ChangeLetter=ChangeLetter+1
IF ChangeLetter>90 THEN
ChangeLetter=62
END IF
end if
if highscoremoveright=false then
ChangeLetter=ChangeLetter-1
IF ChangeLetter<62 THEN
ChangeLetter=90
END IF
end if
ADER1=ChangeLetter+1
IF ADER1>90 THEN
ADER1=62
END IF
ADER2=ADER1+1
IF ADER2>90 THEN
ADER2=62
END IF
ADER3=ADER2+1
IF ADER3>90 THEN
ADER3=62
END IF
ADER4=ADER3+1
IF ADER4>90 THEN
ADER4=62
END IF
ADER5=ADER4+1
IF ADER5>90 THEN
ADER5=62
END IF
ADER6=ADER5+1
IF ADER6>90 THEN
ADER6=62
END IF
ADER7=ADER6+1
IF ADER7>90 THEN
ADER7=62
END IF
AIZQ1=ChangeLetter-1
IF AIZQ1<62 THEN
AIZQ1=90
END IF
AIZQ2=AIZQ1-1
IF AIZQ2<62 THEN
AIZQ2=90
END IF
AIZQ3=AIZQ2-1
IF AIZQ3<62 THEN
AIZQ3=90
END IF
AIZQ4=AIZQ3-1
IF AIZQ4<62 THEN
AIZQ4=90
END IF
AIZQ5=AIZQ4-1
IF AIZQ5<62 THEN
AIZQ5=90
END IF
AIZQ6=AIZQ5-1
IF AIZQ6<62 THEN
AIZQ6=90
END IF
AIZQ7=AIZQ6-1
IF AIZQ7<62 THEN
AIZQ7=90
END IF
MyNewDMD.AddFont 30, "jm_9"
MyNewDMD.AddFont 11, "dmd06x07p"
MyNewDMD.AddFont 8, "dmd05x05p"
AddDebugText "seleccionandoletra "&SelectLetter
AddDebugText "ChangeLetter"&ChangeLetter
select case SelectLetter
case 1
letter1=ChangeLetter
MyNewDMD.Text= "[f11][XC][Y1]PLAYER"&(CurrentPlayer)&" ENTER INITIALS[f30][x50][y10]"&CHR(letter1)&"[f30][x60][y10]"&CHR(letter2)&"[f30][x70][y10]"&CHR(letter3)&"[BF][box2,61,20,69,30][/BF][f30][XC][Y21]"&CHR(AIZQ7)&CHR(AIZQ6)&CHR(AIZQ5)&CHR(AIZQ4)&CHR(AIZQ3)&CHR(AIZQ2)&CHR(AIZQ1)&" [f30][X62][Y21]"&CHR(ChangeLetter)&"[f30][X72][Y21]"&CHR(ADER1)&CHR(ADER2)&CHR(ADER3)&CHR(ADER4)&CHR(ADER5)&CHR(ADER6)&CHR(ADER7)
case 2
letter2=ChangeLetter
MyNewDMD.Text= "[f11][XC][Y1]PLAYER"&(CurrentPlayer)&" ENTER INITIALS[f30][x50][y10]"&CHR(letter1)&"[f30][x60][y10]"&CHR(letter2)&"[f30][x70][y10]"&CHR(letter3)&"[BF][box2,61,20,69,30][/BF][f30][XC][Y21]"&CHR(AIZQ7)&CHR(AIZQ6)&CHR(AIZQ5)&CHR(AIZQ4)&CHR(AIZQ3)&CHR(AIZQ2)&CHR(AIZQ1)&" [f30][X62][Y21]"&CHR(ChangeLetter)&"[f30][X72][Y21]"&CHR(ADER1)&CHR(ADER2)&CHR(ADER3)&CHR(ADER4)&CHR(ADER5)&CHR(ADER6)&CHR(ADER7)
case 3
letter3=ChangeLetter
MyNewDMD.Text= "[f11][XC][Y1]PLAYER"&(CurrentPlayer)&" ENTER INITIALS[f30][x50][y10]"&CHR(letter1)&"[f30][x60][y10]"&CHR(letter2)&"[f30][x70][y10]"&CHR(letter3)&"[BF][box2,61,20,69,30][/BF][f30][XC][Y21]"&CHR(AIZQ7)&CHR(AIZQ6)&CHR(AIZQ5)&CHR(AIZQ4)&CHR(AIZQ3)&CHR(AIZQ2)&CHR(AIZQ1)&" [f30][X62][Y21]"&CHR(ChangeLetter)&"[f30][X72][Y21]"&CHR(ADER1)&CHR(ADER2)&CHR(ADER3)&CHR(ADER4)&CHR(ADER5)&CHR(ADER6)&CHR(ADER7)
case 4'END
letter4=ChangeLetter
MyNewDMD.Text= "[f11][XC][Y1]PLAYER"&(CurrentPlayer)&" ENTER INITIALS[f30][x50][y10]"&CHR(letter1)&"[f30][x60][y10]"&CHR(letter2)&"[f30][x70][y10]"&CHR(letter3)&"[f30][x80][y10]"&CHR(letter4)&"[/b][BF][box2,61,20,69,30][/BF][f30][XC][Y21]"&CHR(AIZQ7)&CHR(AIZQ6)&CHR(AIZQ5)&CHR(AIZQ4)&CHR(AIZQ3)&CHR(AIZQ2)&CHR(AIZQ1)&" [f30][X62][Y21]"&CHR(ChangeLetter)&"[f30][X72][Y21]"&CHR(ADER1)&CHR(ADER2)&CHR(ADER3)&CHR(ADER4)&CHR(ADER5)&CHR(ADER6)&CHR(ADER7)
end select
end sub
sub thehseseste
afterhseob.set true,1800
if giveacredit=true then
giveacredit=false
PlaySound"knocker"
PlaySound"knocker_"
nvCredits = nvCredits + 1
end if
'ShutBackgroundsOff()
MyNewDMD.Text= "[f8][XC][Y0]PLAYER "&(CurrentPlayer)&" TOTAL [f8][XC][Y12]"&formatnumber(FormatScore(temphsscore), 0, -1, 0, -1)&"[f8][xc][y22]"&tempnvname&" RANK " &tempposition
'MyDmd.Text= "[f1][XC][Y0]PLAYER "&(CurrentPlayer)&" TOTAL [f5][XC][Y9]"&formatnumber(FormatScore(temphsscore)* (100), 0, -1, 0, -1)&"[f1][xc][y22]"&tempnvname&" RANK " &tempposition
end sub
sub endselection
benterhighscoremode=false
if letter1=64 then
letter1=32
end if
if letter2=64 then
letter2=32
end if
if letter3=64 then
letter3=32
end if
tempnvname=""&CHR(letter1)&CHR(letter2)&CHR(letter3)&""
dim act
if nvScore(CurrentPlayer) => nvHighScore(1) then
for act=2 to 10
execute "nvHighScore("&-act+12&")=nvHighScore("&-act + 11&")"
execute "nvHighScoreName("&-act+12&")=nvHighScoreName("&-act + 11&")"
next
nvHighScore(1)=nvScore(CurrentPlayer)
nvHighScoreName(1)=tempnvname
giveacredit=true
temphsscore=nvscore(CurrentPlayer)
tempposition=1
thehseseste
exit sub
end if
if nvScore(CurrentPlayer) => nvHighScore(2) then
for act=3 to 10
execute "nvHighScore("&-act+13&")=nvHighScore("&-act + 12&")"
execute "nvHighScoreName("&-act+13&")=nvHighScoreName("&-act + 12&")"
next
nvHighScore(2)=nvScore(CurrentPlayer)
nvHighScoreName(2)=tempnvname
giveacredit=true
temphsscore=nvscore(CurrentPlayer)
tempposition=2
thehseseste
exit sub
end if
if nvScore(CurrentPlayer) => nvHighScore(3) then
for act=4 to 10
execute "nvHighScore("&-act + 14&")=nvHighScore("&-act + 13&")"
execute "nvHighScoreName("&-act + 14&")=nvHighScoreName("&-act + 13&")"
next
nvHighScore(3)=nvScore(CurrentPlayer)
nvHighScoreName(3)=tempnvname
giveacredit=true
temphsscore=nvscore(CurrentPlayer)
tempposition=3
thehseseste
exit sub
end if
if nvScore(CurrentPlayer) => nvHighScore(4) then
for act=5 to 10
execute "nvHighScore("&-act + 15&")=nvHighScore("&-act + 14&")"
execute "nvHighScoreName("&-act + 15&")=nvHighScoreName("&-act + 14&")"
next
nvHighScore(4)=nvScore(CurrentPlayer)
nvHighScoreName(4)=tempnvname
giveacredit=false
temphsscore=nvscore(CurrentPlayer)
tempposition=4
thehseseste
exit sub
end if
if nvScore(CurrentPlayer) => nvHighScore(5) then
for act=6 to 10
execute "nvHighScore("&-act + 16&")=nvHighScore("&-act + 15&")"
execute "nvHighScoreName("&-act + 16&")=nvHighScoreName("&-act + 15&")"
next
nvHighScore(5)=nvScore(CurrentPlayer)
nvHighScoreName(5)=tempnvname
giveacredit=false
temphsscore=nvscore(CurrentPlayer)
tempposition=5
thehseseste
exit sub
end if
if nvScore(CurrentPlayer) => nvHighScore(6) then
for act=7 to 10
execute "nvHighScore("&-act + 17&")=nvHighScore("&-act + 16&")"
execute "nvHighScoreName("&-act + 17&")=nvHighScoreName("&-act + 16&")"
next
nvHighScore(6)=nvScore(CurrentPlayer)
nvHighScoreName(6)=tempnvname
giveacredit=false
temphsscore=nvscore(CurrentPlayer)
tempposition=6
thehseseste
exit sub
end if
if nvScore(CurrentPlayer) => nvHighScore(7) then
for act=8 to 10
execute "nvHighScore("&-act + 18&")=nvHighScore("&-act + 17&")"
execute "nvHighScoreName("&-act + 18&")=nvHighScoreName("&-act + 17&")"
next
nvHighScore(7)=nvScore(CurrentPlayer)
nvHighScoreName(7)=tempnvname
giveacredit=false
temphsscore=nvscore(CurrentPlayer)
tempposition=7
thehseseste
exit sub
end if
if nvScore(CurrentPlayer) => nvHighScore(8) then
for act=9 to 10
execute "nvHighScore("&-act + 19&")=nvHighScore("&-act + 18&")"
execute "nvHighScoreName("&-act + 19&")=nvHighScoreName("&-act + 18&")"
next
nvHighScore(8)=nvScore(CurrentPlayer)
nvHighScoreName(8)=tempnvname
giveacredit=false
temphsscore=nvscore(CurrentPlayer)
tempposition=8
thehseseste
exit sub
end if
if nvScore(CurrentPlayer) => nvHighScore(9) then
nvHighScore(10)=nvHighScore(9)
nvHighScoreName(10)=nvHighScoreName(9)
nvHighScore(9)=nvScore(CurrentPlayer)
nvHighScoreName(9)=tempnvname
giveacredit=false
temphsscore=nvscore(CurrentPlayer)
tempposition=9
thehseseste
exit sub
end if
if nvScore(CurrentPlayer) => nvHighScore(10) then
nvHighScore(10)=nvScore(CurrentPlayer)
nvHighScoreName(10)=tempnvname
giveacredit=false
temphsscore=nvscore(CurrentPlayer)
tempposition=10
thehseseste
exit sub
end if
thehseseste
end sub
sub afterhseob_expired
afterhseob.set false,1500
EndOfBallComplete
end sub