Fixed mall and fixed some freeplay stuff

This commit is contained in:
entar 2025-07-23 16:12:17 +07:00
parent c648e06151
commit 5b0c3dbc04
4 changed files with 51 additions and 43 deletions

View File

@ -6,6 +6,7 @@
"unlocked": true,
"freeplayStyle": "bf",
"stickerPack": "standard-bf",
"colors": [0, 1, 1],
"freeplayDJ": {
"assetPath": "freeplay/freeplay-boyfriend",
"cartoon": {

View File

@ -14,6 +14,7 @@
"unlocked": true,
"freeplayStyle": "pico",
"stickerPack": "standard-pico",
"colors": [1, 0.6, 0],
"freeplayDJ": {
"assetPath": "freeplay/freeplay-pico",
"text1": "PICO",

View File

@ -1,4 +1,3 @@
local upperBop, bottomBop, santa
local snow = {}
@ -31,7 +30,7 @@ return {
for i = 1, 4 do --repeating cus fuck rectangles
local snowPart = Image("images/mall/fgSnow.png")
snowPart.position = Vector2(-1000 , 960 + i * 400)
snowPart.position = Vector2(-1150 , 480 + i * 200)
snowPart.layer = -6
snow[i] = snowPart
@ -39,7 +38,7 @@ return {
bottomBop = Sprite("sprites/mall/bottomBop.png", "sprites/mall/bottomBop.json")
bottomBop:PlayAnimation("Bottom Level Boppers", 24, false)
bottomBop.position = Vector2(-2400, 240)
bottomBop.position = Vector2(-600, 240)
bottomBop.modifier = 0.9
bottomBop.layer = -5

View File

@ -14,8 +14,18 @@ return function()
local playableOffsets = charValues.offsets
local playableFlips = charValues.flips
curChar = playables[1] --this needs to be global
local curCharIndex = 1
local curCharIndex
if not curChar then
curChar = playables[1] --this needs to be global
curCharIndex = 1
else
for index, playable in next, playables do
if playable == curChar then
curCharIndex = index
end
end
end
local songs = require(string.format("charts.songs-%s", curChar))
@ -61,7 +71,7 @@ return function()
local capsule = Sprite(string.format("images/freeplay/freeplayCapsule/capsule/freeplayCapsule_%s.png", curChar), string.format("images/freeplay/freeplayCapsule/capsule/freeplayCapsule_%s.json", curChar))
capsule.position = Vector2()
capsule.layer = 5
capsule.layer = 70
capsule:PlayAnimation("mp3 capsule w backing NOT SELECTED", 24, true)
-- for index, anim in next, capsule.quads do
-- for index, quad in next, anim do
@ -111,6 +121,7 @@ return function()
local left
local arrow
local arrow2
local function setup()
love.window.setTitle("TaggedEngine: Freeplay")
@ -136,20 +147,19 @@ return function()
)
arrow.position.y = 0
arrow.position.x = 0
arrow.layer = 1
arrow.resize = Vector2(.5, .5)
arrow.layer = 50
arrow.flipX = false
arrow:PlayAnimation("arrow pointer loop", 24, true)
local arrow2 = Sprite(
arrow2 = Sprite(
string.format("sprites/freeplay/freeplaySelector-%s.png", curChar),
string.format("sprites/freeplay/freeplaySelector-%s.json", curChar)
)
arrow2.position.y = 0
arrow2.position.x = 310
arrow2.layer = 50
arrow2.flipX = true
arrow2:PlayAnimation("arrow pointer loop", 24, true)
arrow2.position.y = 0
arrow2.position.x = 310
arrow2.layer = 50
arrow2.flipX = true
arrow2:PlayAnimation("arrow pointer loop", 24, true)
-- render.preLoad(
-- "sprites/freeplay/freeplaySelector_pico.png",
@ -160,20 +170,16 @@ return function()
diffIMG:PlayAnimation(curDiff, 24, false)
diffIMG.position = Vector2(50, 10)
diffIMG.layer = 2
bfAtlas = love.animate.newTextureAtlas()
bfAtlas = Atlas(string.format("sprites/freeplay/freeplay-%s", curChar))
bfAtlas.layer = 20
bfAtlas:load(string.format("sprites/freeplay/freeplay-%s", curChar))
bfAtlas.looping = false
bfAtlas:play(animationAliases.intro)
bfAtlas:PlayAnimation(animationAliases.intro)
setupIcons()
end
local function run()
if curDiff == "erect" or curDiff == "nightmare" then
Erect = "erect" -- I fucking hate fnf devs for this
end
Erect = curDiff == "erect"
gameMode = "freeplaymode"
@ -196,12 +202,12 @@ return function()
run()
end
end
bfAtlas:update(dt)
if bfAtlas.libraries and bfAtlas.frame >= bfAtlas:getTimelineLength(bfAtlas:getSymbolTimeline(bfAtlas.symbol)) then
bfAtlas:play(animationAliases.idle)
if bfAtlas.atlas.libraries and bfAtlas.atlas.frame >= bfAtlas.atlas:getTimelineLength(bfAtlas.atlas:getSymbolTimeline(bfAtlas.atlas.symbol)) then
bfAtlas:PlayAnimation(animationAliases.idle)
end
bfAtlas.position = Vector2(animationPositions[bfAtlas.atlas.symbol].x, animationPositions[bfAtlas.atlas.symbol].y)
render.cameraPosition = Vector2(0, 0)
render.updateSprites(dt)
end
@ -213,22 +219,21 @@ return function()
evilCurIndex = Lerp(evilCurIndex, curIndex, .3)
for index, song in next, songs do
local color = index == curIndex and { 0, 1, 0.8 } or { 0, 1, 1 }
local color = index == curIndex and {chardata.colors[1] >= 0.1 and chardata.colors[1] - 0.1 or 0, chardata.colors[2] >= 0.1 and chardata.colors[2] - 0.1 or 0, chardata.colors[3] >= 0.1 and chardata.colors[3] - 0.1 or 0} or chardata.colors
love.graphics.print({ color, song.name }, font, 700 - (50 * math.abs(index - evilCurIndex)),
love.graphics:getHeight() / 2 + (200 * (index - evilCurIndex - .5)), 0, 1, 1, 200)
local icon = icons[song.name]
if icon then
icon.position = Vector2(450 - (50 * math.abs(index - evilCurIndex)),
icon.position = Vector2(430 - (50 * math.abs(index - evilCurIndex)),
love.graphics:getHeight() / 2 + (200 * (index - evilCurIndex - .5)))
end
local capsule = capsules[song.name]
capsule.position = Vector2(400 - (50 * math.abs(index - evilCurIndex)),
capsule.position = Vector2(380 - (50 * math.abs(index - evilCurIndex)),
love.graphics:getHeight() / 2 + (200 * (index - evilCurIndex - .5) - 25))
end
bfAtlas:draw(animationPositions[bfAtlas.symbol].x, animationPositions[bfAtlas.symbol].y, 0, 1, 1)
-- if bfAtlas.symbol == curChar .. " slide in" then
-- if bfAtlas.atlas.symbol == curChar .. " slide in" then
-- bfAtlas:draw(curChar == "bf" and 695 or 690, curChar == "bf" and 315 or 320, 0, flip and -1 or 1, 1)
-- else
-- bfAtlas:draw(curChar == "bf" and 700 or 1150, curChar == "bf" and 300 or 190, 0, flip and -1 or 1, 1)
@ -249,7 +254,7 @@ return function()
icons[curSong.name]:PlayAnimation("confirm", 24, false)
confirm:stop()
confirm:play()
bfAtlas:play(animationAliases.confirm)
bfAtlas:PlayAnimation(animationAliases.confirm)
elseif key == "down" then
curIndex, curSong = next(songs, curIndex)
if not curSong then
@ -321,29 +326,31 @@ return function()
animationAliases[anim.name] = anim.prefix
animationPositions[anim.prefix] = Vector2(anim.offsets[1], anim.offsets[2])
end
bfAtlas:stop()
bfAtlas:load(string.format("sprites/freeplay/freeplay-%s", curChar))
print(animationAliases.intro)
bfAtlas:play(animationAliases.intro)
bfAtlas:Destroy()
bfAtlas = Atlas(string.format("sprites/freeplay/freeplay-%s", curChar))
bfAtlas:PlayAnimation(animationAliases.intro)
bfAtlas.layer = 20
arrow = Sprite(
string.format("sprites/freeplay/freeplaySelector-%s.png", curChar),
string.format("sprites/freeplay/freeplaySelector-%s.json", curChar)
)
arrow.position.y = 0
arrow.position.x = 40
arrow.position.x = 0
arrow.layer = 50
arrow.flipX = false
arrow:PlayAnimation("arrow pointer loop", 24, true)
local arrow2 = Sprite(
string.format("sprites/freeplay/freeplaySelector-%s.png", curChar),
string.format("sprites/freeplay/freeplaySelector-%s.json", curChar)
)
arrow2 = Sprite(
string.format("sprites/freeplay/freeplaySelector-%s.png", curChar),
string.format("sprites/freeplay/freeplaySelector-%s.json", curChar)
)
arrow2.position.y = 0
arrow2.position.x = 20
arrow2.position.x = 310
arrow2.layer = 50
arrow2.flipX = true
arrow2:PlayAnimation("arrow pointer loop", 24, true)
flip = false
--reset the index's nd shit
curSong = songs[1]