Skip to content

Commit

Permalink
Kimmy: Add Live Type option to Service Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtBagXon committed May 20, 2024
1 parent 5f94211 commit 23495c7
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 72 deletions.
Binary file modified 00-kimmy/FrameworkKimmy/Skin/COMICS/Overlay/barfull.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 00-kimmy/FrameworkKimmy/Skin/COMICS/Overlay/barnone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions 00-kimmy/FrameworkKimmy/globals.singe
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ fontType = 1
ShowTitle = 0
dip_Model = 0
dip_Display = 0
dip_Scanlines = 0
dip_LiveType = 0
dip_ScType = 1
mycolor3 = 1
dip_FontQ = 3
Expand Down Expand Up @@ -131,7 +131,6 @@ bCalc = true
bOneDiff = true
bSwap = false
bInPlayExit = false
bScan = false
bGR = false
ForceRewind = false
altCfg = false
Expand Down Expand Up @@ -455,6 +454,7 @@ TILT = 275
PAUSED = 276
WAIT = 277
KIMMY = 278
NUMX = 279

inputFrmStart = 1
inputFrmEnd = 2
Expand Down
82 changes: 44 additions & 38 deletions 00-kimmy/FrameworkKimmy/main.singe
Original file line number Diff line number Diff line change
Expand Up @@ -3479,17 +3479,19 @@ function drawLifeBar() -- Life Bar

if iLifeBar > 0 then

spriteDraw(OVLW-(LINEW)-(BARW*(BarSize+1))-LIVW-10-shiftOVL,ylivpos,sprite[LIVES])

for k = 1,iLifeBar do

spriteDraw(OVLW-(LINEW*(2+dip_Res))-(BARW*(BarSize+1))+((BARW+2)*k)-shiftOVL,ylivpos,sprite[BARFULL])
spriteDraw(OVLW-(LINEW*(2+dip_Res))-(BARW*(BarSize+1))+((BARW+2)*k)-shiftOVL,ylivpos+(LIVH-BARH)/2,sprite[BARFULL])

end

if iLifeBar < BarSize then

for k = iLifeBar,BarSize do

spriteDraw(OVLW-(LINEW*(2+dip_Res))-(BARW*(BarSize+1))+((BARW+2)*k)-shiftOVL,ylivpos,sprite[BARNONE])
spriteDraw(OVLW-(LINEW*(2+dip_Res))-(BARW*(BarSize+1))+((BARW+2)*k)-shiftOVL,ylivpos+(LIVH-BARH)/2,sprite[BARNONE])

end

Expand Down Expand Up @@ -3519,27 +3521,55 @@ function drawLives() -- Draw Lives
else

local k = 0

if dip_GameType == 1 then

drawLifeBar()
if dip_GameType == 1 then drawLifeBar()

else
else

if dip_GameType ~= 4 then

if (iLives > 0) then
if dip_LivType == 0 and (iLives > 0) then

for k = 1,iLives do

spriteDraw(OVLW-LINEW-(LIVW*k)-shiftOVL,ylivpos,sprite[LIVES])

end


elseif dip_LivType == 1 and (iLives > 0) then

spriteDraw(OVLW-LINEW-2*NUMW-LIVW-10-shiftOVL,ylivpos,sprite[LIVES])
spriteDraw(OVLW-LINEW-(2*NUMW)-shiftOVL,ylivpos+(LIVH-NUMH)/2,sprite[NUMX])
spriteDraw(OVLW-LINEW-NUMW-shiftOVL,ylivpos+(LIVH-NUMH)/2,sprNUM[iLives+1])

elseif dip_LivType == 2 then

if iLives > 0 then

spriteDraw(OVLW-(LINEW)-(BARW*6)-LIVW-10-shiftOVL,ylivpos,sprite[LIVES])

for k = 1,iLives do

spriteDraw(OVLW-(LINEW*(2+dip_Res))-(BARW*6)+((BARW+2)*k)-shiftOVL,ylivpos+(LIVH-BARH)/2,sprite[BARFULL])

end

if iLives < 5 then

for k = iLives,5 do

spriteDraw(OVLW-(LINEW*(2+dip_Res))-(BARW*6)+((BARW+2)*k)-shiftOVL,ylivpos+(LIVH-BARH)/2,sprite[BARNONE])

end

end

end

end

end

end

end
Expand Down Expand Up @@ -4043,18 +4073,6 @@ function getRes() -- Manage Resolution and Sprites

if dip_Res ~= 2 then

for file in lfs.dir(MYDIR..MIDIRES) do

if file == "scanlines.png" then

sprite[SCAN] = spriteLoad(MYDIR..MIDIRES.."scanlines.png")
bScan = true
break

end

end

for file in lfs.dir(MYDIR..MIDIRES) do

if file == "getready.png" then
Expand Down Expand Up @@ -4115,6 +4133,7 @@ function getRes() -- Manage Resolution and Sprites
fillOVLnum(9,"num08.png")
fillOVLnum(10,"num09.png")
fillOVLtxt(MINUS,"minus.png","-")
fillOVLtxt(NUMX,"numx.png", "X")

setFontColor(mycolor1)
fontSelect(fontGame)
Expand Down Expand Up @@ -4237,16 +4256,7 @@ function getRes() -- Manage Resolution and Sprites

else

if dip_GameType == 1 then

ylivpos = OVLH-BARH-LINEH

else

ylivpos = OVLH-LIVH-LINEH

end

ylivpos = OVLH-LIVH-LINEH
YNEXT = LINEH

end
Expand Down Expand Up @@ -4785,8 +4795,6 @@ function onOverlayUpdate() -- Manage the game and look for any given situati

elseif (gameflow == flow_GameRunning) then

if dip_Scanlines == 2 and bScan then spriteDraw(0,0,sprite[SCAN]) end

if (currentLevel == levelIntro) then

doIntro()
Expand Down Expand Up @@ -4886,9 +4894,7 @@ function onOverlayUpdate() -- Manage the game and look for any given situati
if bShowLvl and ShowLevel then drawLvl() end
if bShowWarnTilt then drawWarning() end
if bShowTilt then drawTilt() end

if dip_Scanlines == 1 and bScan then spriteDraw(0,0,sprite[SCAN]) end


end

if bFrameCount then overlayPrint(2, 10, currentFrame) end
Expand Down Expand Up @@ -5196,7 +5202,7 @@ function sprUnload() -- Unloads all the sprite to avoid multiple

end

for i = 1, 278 do
for i = 1, 279 do

if sprite[i] ~= nil then spriteUnload(sprite[i]) end
i = i +1
Expand Down
48 changes: 16 additions & 32 deletions 00-kimmy/FrameworkKimmy/service.singe
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ function readConfig()

if (s1 ~= nil and s1 ~= "") then

dip_Scanlines = tonumber(string.sub(s1,string.find(s1,"=")+1))
dip_LivType = tonumber(string.sub(s1,string.find(s1,"=")+1))

end

Expand Down Expand Up @@ -519,7 +519,7 @@ function writeConfig()

io.write("dip_Model = " .. dip_Model .. sNewLine)
io.write("dip_Display = " .. dip_Display .. sNewLine)
io.write("dip_Scanlines = " .. dip_Scanlines .. sNewLine)
io.write("dip_LivType = " .. dip_LivType .. sNewLine)
io.write("dip_ScType = " .. dip_ScType .. sNewLine)
io.write("mycolor3 = " .. mycolor3 .. sNewLine)
io.write("dip_FontQ = " .. dip_FontQ .. sNewLine)
Expand Down Expand Up @@ -872,7 +872,7 @@ function setDefault()

if (s1 ~= nil) then

dip_Scanlines = tonumber(string.sub(s1,string.find(s1,"=")+1))
dip_LivType = tonumber(string.sub(s1,string.find(s1,"=")+1))

end

Expand Down Expand Up @@ -4142,14 +4142,10 @@ function updateOptsP(thisIndex)

elseif (thisIndex == 4) then

if bScan then

dip_Scanlines = dip_Scanlines + 1

if dip_Scanlines > 2 then dip_Scanlines = 0 end
dip_LivType = dip_LivType + 1

end

if dip_LivType > 2 then dip_LivType = 0 end
elseif (thisIndex == 5) then

dip_FontQ = dip_FontQ + 1
Expand Down Expand Up @@ -4303,13 +4299,9 @@ function updateOptsMinP(thisIndex)

elseif (thisIndex == 4) then

if bScan then

dip_Scanlines = dip_Scanlines - 1

if dip_Scanlines < 0 then dip_Scanlines = 2 end
dip_LivType = dip_LivType - 1

end
if dip_LivType < 0 then dip_LivType = 2 end

elseif (thisIndex == 5) then

Expand Down Expand Up @@ -4452,7 +4444,7 @@ function printOptsP()
smenu[1] = "Extra Options"
smenu[2] = "Overlay Res"
smenu[3] = "Display Score/Lives"
smenu[4] = "Scanlines"
smenu[4] = "Lives Type"
smenu[5] = "Font Quality"
smenu[6] = "Stick Mash with"
smenu[7] = "Loop Action as"
Expand Down Expand Up @@ -4560,28 +4552,20 @@ function printOptsP()

elseif (k == 4) then

if bScan then

if dip_Scanlines == 0 then
if dip_LivType == 0 then

fontPrint(fntx, ypos, "No")
fontPrint(fntx, ypos, "Picture")

elseif dip_Scanlines == 1 then
elseif dip_LivType == 1 then

fontPrint(fntx, ypos, "Over text")
fontPrint(fntx, ypos, "Number")

elseif dip_Scanlines == 2 then
elseif dip_LivType == 2 then

fontPrint(fntx, ypos, "Under text")
fontPrint(fntx, ypos, "Bar")

end

else

fontPrint(fntx, ypos, "N/A")

end

elseif (k == 5) then

if dip_FontQ == 1 then
Expand Down

0 comments on commit 23495c7

Please sign in to comment.