Something

This commit is contained in:
entar 2025-06-13 10:15:53 +07:00
parent 83df5079a4
commit 14a911d07a
7 changed files with 449 additions and 427 deletions

View File

@ -6,7 +6,7 @@ local lastChange = 0
local amp = 50
local enabled = false
local enabled = true
function module.onCreate()
lastChange = 0

95
log.log

File diff suppressed because one or more lines are too long

View File

@ -43,7 +43,7 @@ local function setup()
left = myTypes.Image("images/MenuLeft.png")
left.layer = 0
left.resize = myTypes.Vector2(3, 1)
left.resize = myTypes.Vector2(2, 1)
local arrow = myTypes.Image("images/eventArrow.png")
arrow.position.y = 330
@ -86,10 +86,10 @@ function love.draw()
evilCurIndex = myMath.lerp(evilCurIndex, curIndex, .3)
for index, song in next, songs do
love.graphics.print({{0,0,0}, song.name}, font, 300, love.graphics:getHeight()/2 + (50 * (index - evilCurIndex - .7)), 0, 1, 1, 200)
love.graphics.print({{0,0,0}, song.name}, font, 300 + (8 * (index - evilCurIndex)), love.graphics:getHeight()/2 + (50 * (index - evilCurIndex - .7)), 0, 1, 1, 200)
end
love.graphics.print({{0,0,0}, curDiff}, font, 600, 660)
love.graphics.print({{0,0,0}, curDiff}, font, 400, 660)
love.graphics.print(
{{0,0,0}, string.format("Left: %s, Down: %s, Up: %s, Right: %s \nDownscroll: %s",
@ -104,6 +104,9 @@ function love.draw()
end
function run()
confirm:stop()
confirm:play()
myTypes.destroyAllSprites()
freaky:stop()

View File

@ -262,7 +262,7 @@ local function state(songName, songDifficulty)
local rating = conductor:judgeNote(rankWindows, math.abs(closestNote.position - elapsed))
if rating.spawnSplash then
splashes[closestNote.direction]:PlayAnimation(string.format("note splash %s %s", colors[closestNote.direction], math.random(1, 2)), 24, false)
splashes[closestNote.direction]:PlayAnimation(string.format("note impact %s %s", math.random(1, 2), colors[closestNote.direction]), 24, false)
end
ratings[rating.rating] = ratings[rating.rating] + 1
@ -695,7 +695,7 @@ local function state(songName, songDifficulty)
splash.layer = 11
splash.position = myTypes.Vector2(550 + (79* i), settings.Downscroll and 380 or -50)
splash.position = myTypes.Vector2(570 + (79* i), settings.Downscroll and 400 or -50)
splash.ui = true
splashes[i + 1] = splash

View File

@ -11,6 +11,8 @@ Image.__index = Image
local cachedQuads = {}
local loadedShaders = {}
local Sprites, Rects, Images = {}, {}, {}
function module.Sprite(image, sheet)
@ -210,7 +212,11 @@ function module.drawSprites()
if thing.isImage then
local cameraOffset = thing.ui and module.myTypes.Vector2() or module.cameraPosition
if thing.shader and loadedShaders[thing.shader] then
love.graphics.setShader(loadedShaders[thing.shader])
end
love.graphics.draw(thing.image, thing.position.x + cameraOffset.x * thing.modifier , thing.position.y + cameraOffset.y * thing.modifier, thing.rotation, thing.resize.x * (thing.flipX and -1 or 1), thing.resize.y * (thing.flipY and -1 or 1))
love.graphics.setShader()
elseif thing.isSprite then
local sprite = thing
if sprite.animation and sprite.quads and sprite.quads[sprite.animation] then
@ -227,7 +233,13 @@ function module.drawSprites()
local cameraOffset = sprite.ui and module.myTypes.Vector2() or module.cameraPosition or module.myTypes.Vector2()
if sprite.shader and loadedShaders[sprite.shader] then
love.graphics.setShader(loadedShaders[sprite.shader])
end
love.graphics.draw(sprite.image, quad.quad, (sprite.position.x + (sprite.position.x - quad.offset.x - sprite.extraOffset.x) + cameraOffset.x * sprite.modifier), (sprite.position.y + (sprite.position.y - quad.offset.y - sprite.extraOffset.y) + cameraOffset.y * sprite.modifier), sprite.rotation or 0, quad.resize.x * (sprite.flipX and -1 or 1), quad.resize.y* (sprite.flipY and -1 or 1))
love.graphics.setShader()
end
end
elseif thing.isRect then
@ -241,7 +253,13 @@ function module.drawSprites()
local cameraOffset = rect.ui and module.myTypes.Vector2() or module.cameraPosition or module.myTypes.Vector2()
if rect.shader and loadedShaders[rect.shader] then
love.graphics.setShader(loadedShaders[rect.shader])
end
love.graphics.draw(rect.image, quad.quad, (rect.position.x + (rect.position.x - quad.offset.x - rect.extraOffset.x) + cameraOffset.x * rect.modifier), (rect.position.y + (rect.position.y - quad.offset.y - rect.extraOffset.y) + cameraOffset.y * rect.modifier), rect.rotation or 0, quad.resize.x * (rect.flipX and -1 or 1), quad.resize.y* (rect.flipY and -1 or 1))
love.graphics.setShader()
end
end
@ -436,4 +454,16 @@ function module.preLoad(imagePath, sheetPath)
cachedQuads[sheetPath] = {quads = quads, image = image}
end
function module.loadShader(name)
local file = files.read_file(string.format("shaders/%s", name))
if file then
loadedShaders[name] = love.graphics.newShader(file) -- It needs a string of code in newShader() so yeah.
end
end
function module.getShader(name)
return loadedShaders[name]
end
return module

View File

@ -2,444 +2,340 @@
"TextureAtlas": {
"SubTexture": [
{
"_name": "note splash purple 10000",
"_name": "note impact 1 blue0000",
"_x": "1850",
"_y": "262",
"_width": "189",
"_height": "270",
"_frameX": "-32",
"_frameY": "-12",
"_frameWidth": "260",
"_frameHeight": "298"
},
{
"_name": "note impact 1 blue0001",
"_x": "1540",
"_y": "556",
"_width": "213",
"_height": "265",
"_frameX": "-27",
"_frameY": "-22",
"_frameWidth": "260",
"_frameHeight": "298"
},
{
"_name": "note impact 1 blue0002",
"_x": "1056",
"_y": "0",
"_width": "252",
"_height": "291",
"_frameX": "-4",
"_frameY": "-6",
"_frameWidth": "260",
"_frameHeight": "298"
},
{
"_name": "note impact 1 blue0003",
"_x": "0",
"_y": "0",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
"_width": "260",
"_height": "298"
},
{
"_name": "note splash purple 10001",
"_name": "note impact 1 green0000",
"_x": "663",
"_y": "806",
"_width": "189",
"_height": "270",
"_frameX": "-32",
"_frameY": "-12",
"_frameWidth": "260",
"_frameHeight": "298"
},
{
"_name": "note impact 1 green0001",
"_x": "1757",
"_y": "556",
"_width": "213",
"_height": "265",
"_frameX": "-27",
"_frameY": "-22",
"_frameWidth": "260",
"_frameHeight": "298"
},
{
"_name": "note impact 1 green0002",
"_x": "1312",
"_y": "0",
"_width": "252",
"_height": "291",
"_frameX": "-4",
"_frameY": "-6",
"_frameWidth": "260",
"_frameHeight": "298"
},
{
"_name": "note impact 1 green0003",
"_x": "264",
"_y": "0",
"_width": "260",
"_height": "298"
},
{
"_name": "note impact 1 purple0000",
"_x": "1121",
"_y": "818",
"_width": "189",
"_height": "270",
"_frameX": "-32",
"_frameY": "-12",
"_frameWidth": "260",
"_frameHeight": "298"
},
{
"_name": "note impact 1 purple0001",
"_x": "0",
"_y": "210",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
"_y": "563",
"_width": "213",
"_height": "265",
"_frameX": "-27",
"_frameY": "-22",
"_frameWidth": "260",
"_frameHeight": "298"
},
{
"_name": "note splash purple 10002",
"_name": "note impact 1 purple0002",
"_x": "1568",
"_y": "0",
"_width": "252",
"_height": "291",
"_frameX": "-4",
"_frameY": "-6",
"_frameWidth": "260",
"_frameHeight": "298"
},
{
"_name": "note impact 1 purple0003",
"_x": "528",
"_y": "0",
"_width": "260",
"_height": "298"
},
{
"_name": "note impact 1 red0000",
"_x": "1314",
"_y": "818",
"_width": "189",
"_height": "270",
"_frameX": "-32",
"_frameY": "-12",
"_frameWidth": "260",
"_frameHeight": "298"
},
{
"_name": "note impact 1 red0001",
"_x": "217",
"_y": "563",
"_width": "213",
"_height": "265",
"_frameX": "-27",
"_frameY": "-22",
"_frameWidth": "260",
"_frameHeight": "298"
},
{
"_name": "note impact 1 red0002",
"_x": "1056",
"_y": "295",
"_width": "252",
"_height": "291",
"_frameX": "-4",
"_frameY": "-6",
"_frameWidth": "260",
"_frameHeight": "298"
},
{
"_name": "note impact 1 red0003",
"_x": "792",
"_y": "0",
"_width": "260",
"_height": "298"
},
{
"_name": "note impact 2 blue0000",
"_x": "1121",
"_y": "590",
"_width": "169",
"_height": "201",
"_frameX": "-45",
"_frameY": "-41",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note impact 2 blue0001",
"_x": "434",
"_y": "564",
"_width": "225",
"_height": "238",
"_frameX": "-20",
"_frameY": "-19",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note impact 2 blue0002",
"_x": "1312",
"_y": "295",
"_width": "265",
"_height": "257",
"_frameX": "0",
"_frameY": "-10",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note impact 2 blue0003",
"_x": "1824",
"_y": "0",
"_width": "224",
"_height": "258",
"_frameX": "-50",
"_frameY": "0",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note impact 2 green0000",
"_x": "1507",
"_y": "825",
"_width": "169",
"_height": "201",
"_frameX": "-45",
"_frameY": "-41",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note impact 2 green0001",
"_x": "663",
"_y": "564",
"_width": "225",
"_height": "238",
"_frameX": "-20",
"_frameY": "-19",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note impact 2 green0002",
"_x": "1581",
"_y": "295",
"_width": "265",
"_height": "257",
"_frameX": "0",
"_frameY": "-10",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note impact 2 green0003",
"_x": "538",
"_y": "302",
"_width": "224",
"_height": "258",
"_frameX": "-50",
"_frameY": "0",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note impact 2 purple0000",
"_x": "1680",
"_y": "825",
"_width": "169",
"_height": "201",
"_frameX": "-45",
"_frameY": "-41",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note impact 2 purple0001",
"_x": "892",
"_y": "590",
"_width": "225",
"_height": "238",
"_frameX": "-20",
"_frameY": "-19",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note impact 2 purple0002",
"_x": "0",
"_y": "420",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
"_y": "302",
"_width": "265",
"_height": "257",
"_frameX": "0",
"_frameY": "-10",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note splash purple 10003",
"_x": "0",
"_y": "630",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
"_name": "note impact 2 purple0003",
"_x": "766",
"_y": "302",
"_width": "224",
"_height": "258",
"_frameX": "-50",
"_frameY": "0",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note splash purple 10004",
"_x": "0",
"_y": "840",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
"_name": "note impact 2 red0000",
"_x": "1853",
"_y": "825",
"_width": "169",
"_height": "201",
"_frameX": "-45",
"_frameY": "-41",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note splash purple 20000",
"_x": "210",
"_y": "0",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
"_name": "note impact 2 red0001",
"_x": "434",
"_y": "806",
"_width": "225",
"_height": "238",
"_frameX": "-20",
"_frameY": "-19",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note splash purple 20001",
"_x": "210",
"_y": "210",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
"_name": "note impact 2 red0002",
"_x": "269",
"_y": "302",
"_width": "265",
"_height": "257",
"_frameX": "0",
"_frameY": "-10",
"_frameWidth": "274",
"_frameHeight": "267"
},
{
"_name": "note splash purple 20002",
"_x": "210",
"_y": "420",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash purple 20003",
"_x": "210",
"_y": "630",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash purple 20004",
"_x": "210",
"_y": "840",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash blue 10000",
"_x": "420",
"_y": "0",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash blue 10001",
"_x": "420",
"_y": "210",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash blue 10002",
"_x": "420",
"_y": "420",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash blue 10003",
"_x": "420",
"_y": "630",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash blue 10004",
"_x": "420",
"_y": "840",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash blue 20000",
"_x": "630",
"_y": "0",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash blue 20001",
"_x": "630",
"_y": "210",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash blue 20002",
"_x": "630",
"_y": "420",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash blue 20003",
"_x": "630",
"_y": "630",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash blue 20004",
"_x": "630",
"_y": "840",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash green 10000",
"_x": "840",
"_y": "0",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash green 10001",
"_x": "840",
"_y": "210",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash green 10002",
"_x": "840",
"_y": "420",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash green 10003",
"_x": "840",
"_y": "630",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash green 10004",
"_x": "840",
"_y": "840",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash green 20000",
"_x": "1050",
"_y": "0",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash green 20001",
"_x": "1050",
"_y": "210",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash green 20002",
"_x": "1050",
"_y": "420",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash green 20003",
"_x": "1050",
"_y": "630",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash green 20004",
"_x": "1050",
"_y": "840",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash red 10000",
"_x": "1260",
"_y": "0",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash red 10001",
"_x": "1260",
"_y": "210",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash red 10002",
"_x": "1260",
"_y": "420",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash red 10003",
"_x": "1260",
"_y": "630",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash red 10004",
"_x": "1260",
"_y": "840",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash red 20000",
"_x": "1470",
"_y": "0",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash red 20001",
"_x": "1470",
"_y": "210",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash red 20002",
"_x": "1470",
"_y": "420",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash red 20003",
"_x": "1470",
"_y": "630",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
},
{
"_name": "note splash red 20004",
"_x": "1470",
"_y": "840",
"_width": "210",
"_height": "210",
"_frameX": "-65",
"_frameY": "-70",
"_frameWidth": "210",
"_frameHeight": "210"
"_name": "note impact 2 red0003",
"_x": "1312",
"_y": "556",
"_width": "224",
"_height": "258",
"_frameX": "-50",
"_frameY": "0",
"_frameWidth": "274",
"_frameHeight": "267"
}
],
"_imagePath": "noteSplashes.png"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 692 KiB