Skip to content

Commit

Permalink
add DDS images, add some more mod folder functions
Browse files Browse the repository at this point in the history
  • Loading branch information
GuglioIsStupid committed May 28, 2024
1 parent 21b55e3 commit e69e624
Show file tree
Hide file tree
Showing 57 changed files with 609 additions and 243 deletions.
Binary file added src/love/images/dds/NOTE_assets.dds
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file added src/love/images/dds/holdCovers.dds
Binary file not shown.
Binary file added src/love/images/dds/icons/icon-bf-christmas.dds
Binary file not shown.
Binary file added src/love/images/dds/icons/icon-bf-old.dds
Binary file not shown.
Binary file added src/love/images/dds/icons/icon-bf.dds
Binary file not shown.
Binary file added src/love/images/dds/icons/icon-dad.dds
Binary file not shown.
Binary file added src/love/images/dds/icons/icon-darnell.dds
Binary file not shown.
Binary file added src/love/images/dds/icons/icon-face.dds
Binary file not shown.
Binary file added src/love/images/dds/icons/icon-gf.dds
Binary file not shown.
Binary file added src/love/images/dds/icons/icon-mom.dds
Binary file not shown.
Binary file added src/love/images/dds/icons/icon-monster.dds
Binary file not shown.
Binary file not shown.
Binary file added src/love/images/dds/icons/icon-parents.dds
Binary file not shown.
Binary file added src/love/images/dds/icons/icon-pico.dds
Binary file not shown.
Binary file added src/love/images/dds/icons/icon-spooky.dds
Binary file not shown.
Binary file added src/love/images/dds/icons/icon-tankman.dds
Binary file not shown.
23 changes: 0 additions & 23 deletions src/love/images/dds/menu/checkboxanim.xml

This file was deleted.

Binary file added src/love/images/dds/menu/weekend1.dds
Binary file not shown.
Binary file added src/love/images/dds/resultsScreen/difEasy.dds
Binary file not shown.
Binary file added src/love/images/dds/resultsScreen/difErect.dds
Binary file not shown.
Binary file added src/love/images/dds/resultsScreen/difHard.dds
Binary file not shown.
Binary file not shown.
Binary file added src/love/images/dds/resultsScreen/difNormal.dds
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/love/images/dds/resultsScreen/results.dds
Binary file not shown.
Binary file not shown.
Binary file added src/love/images/dds/resultsScreen/scorePopin.dds
Binary file not shown.
Binary file added src/love/images/dds/resultsScreen/soundSystem.dds
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/love/images/dds/weekend1/aBotViz.dds
Binary file not shown.
Binary file added src/love/images/png/NOTE_assets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions src/love/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,9 @@ function love.load()
["streets"] = require "stages.streets"
}

shaders = {}
if love.system.getOS() ~= "NX" then
shaders = {
["rain"] = love.graphics.newShader("shaders/rain.glsl")
}
shaders["rain"] = love.graphics.newShader("shaders/rain.glsl")
end

-- Load Menus
Expand Down Expand Up @@ -444,7 +443,7 @@ function love.load()
storyMode = false
countingDown = false

uiScale = {zoom = 1, x = 1, y = 1, sizeX = 1, sizeY = 1}
uiCam = {zoom = 1, x = 1, y = 1, sizeX = 1, sizeY = 1}

musicTime = 0
health = 0
Expand Down
6 changes: 6 additions & 0 deletions src/love/modding/importMods.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,10 @@ function loadImageFile(path)
return love.graphics.newImage(path)
end

function getFilePath(path)
local currentMod = importMods.getCurrentMod()

return currentMod.path .. "/" .. path
end

return importMods
4 changes: 4 additions & 0 deletions src/love/modules/Cover.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ end
function cover:update(dt)
for i = 1, 4 do
if self.covers[1][i].visible then
self.covers[1][i].x = boyfriendArrows[i].x - 5
self.covers[1][i].y = boyfriendArrows[i].y + 35
self.covers[1][i]:update(dt)
end
if self.covers[2][i].visible then
self.covers[2][i].x = enemyArrows[i].x - 5
self.covers[2][i].y = enemyArrows[i].y + 35
self.covers[2][i]:update(dt)
end
end
Expand Down
31 changes: 30 additions & 1 deletion src/love/modules/constants.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,40 @@
local CONSTANTS = {}

CONSTANTS.OPTIONS ={
CONSTANTS.OPTIONS = {
SHOW_RESULTS_SCREEN = true,
DO_SAVE_DATA = true,
DO_MODS = true,
}

function hexToRGB(hex)
local r = bit.band(bit.rshift(hex, 16), 0xFF) / 255
local g = bit.band(bit.rshift(hex, 8), 0xFF) / 255
local b = bit.band(hex, 0xFF) / 255
return r, g, b
end

function decToRGB(dec)
local r = bit.band(bit.rshift(dec, 16), 0xFF) / 255
local g = bit.band(bit.rshift(dec, 8), 0xFF) / 255
local b = bit.band(dec, 0xFF) / 255
return r, g, b
end

CONSTANTS.RAW_ARROW_COLORS = {
{0xFFC24B99, 0xFFFFFFFF, 0xFF3C1F56},
{0xFF00FFFF, 0xFFFFFFFF, 0xFF1542B7},
{0xFF12FA05, 0xFFFFFFFF, 0xFF0A4447},
{0xFFF9393F, 0xFFFFFFFF, 0xFF651038}
}
CONSTANTS.ARROW_COLORS = {}
for i, v in ipairs(CONSTANTS.RAW_ARROW_COLORS) do
CONSTANTS.ARROW_COLORS[i] = {
{hexToRGB(v[1])},
{hexToRGB(v[2])},
{hexToRGB(v[3])}
}
end

CONSTANTS.WEEKS = {
ANIM_LIST = {
"singLEFT",
Expand Down
14 changes: 13 additions & 1 deletion src/love/modules/deprecated.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ function weeks.legacyGenerateNotes(self, chart)
local arrowsTable = enemyNote and enemyArrows or boyfriendArrows

noteObject.x = arrowsTable[id].x
noteObject.shader = love.graphics.newShader("shaders/RGBPallette.glsl")
local r, g, b = CONSTANTS.ARROW_COLORS[id][1], CONSTANTS.ARROW_COLORS[id][2], CONSTANTS.ARROW_COLORS[id][3]
noteObject.shader:send("r", r)
noteObject.shader:send("g", g)
noteObject.shader:send("b", b)

table.insert(notesTable[id], noteObject)
if holdLength > 0 then
Expand All @@ -68,6 +73,7 @@ function weeks.legacyGenerateNotes(self, chart)
holdNote:animate("hold")

holdNote.x = arrowsTable[id].x
holdNote.shader = noteObject.shader
table.insert(notesTable[id], holdNote)
end

Expand Down Expand Up @@ -153,6 +159,11 @@ function weeks.cneGenerateNotes(self, chart, metadata)
if settings.downscroll then noteObject.sizeY = -1 end

noteObject.x = arrowsTable[id].x
noteObject.shader = love.graphics.newShader("shaders/RGBPallette.glsl")
local r, g, b = CONSTANTS.ARROW_COLORS[id][1], CONSTANTS.ARROW_COLORS[id][2], CONSTANTS.ARROW_COLORS[id][3]
noteObject.shader:send("r", r)
noteObject.shader:send("g", g)
noteObject.shader:send("b", b)

table.insert(notesTable[id], noteObject)
if holdLength > 0 then
Expand All @@ -165,6 +176,7 @@ function weeks.cneGenerateNotes(self, chart, metadata)
holdNote:animate("hold")

holdNote.x = arrowsTable[id].x
holdNote.shader = noteObject.shader
table.insert(notesTable[id], holdNote)
end

Expand All @@ -174,4 +186,4 @@ function weeks.cneGenerateNotes(self, chart, metadata)

::continue::
end
end
end
23 changes: 13 additions & 10 deletions src/love/modules/graphics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ return {

danced = false,

shader = nil,
shaderEnabled = true,

setSheet = function(self, imageData)
sheet = imageData
sheetWidth = sheet:getWidth()
Expand Down Expand Up @@ -512,16 +515,6 @@ return {
height = frameData[self.curFrame].offsetY
end
else
--[[ if frameData[self.curFrame].offsetWidth == 0 then
width = math.floor(frameData[self.curFrame].width / 2)
else
width = math.floor(frameData[self.curFrame].offsetWidth / 2) + frameData[self.curFrame].offsetX
end
if frameData[self.curFrame].offsetHeight == 0 then
height = math.floor(frameData[self.curFrame].height / 2)
else
height = math.floor(frameData[self.curFrame].offsetHeight / 2) + frameData[self.curFrame].offsetY
end ]]
if not frameData[self.curFrame].rotated then
if frameData[self.curFrame].offsetWidth == 0 then
width = math.floor(frameData[self.curFrame].width / 2)
Expand Down Expand Up @@ -555,6 +548,13 @@ return {
oy = height + anim.offsetX + self.offsetX
end

local lastShader = love.graphics.getShader()
if self.shaderEnabled then
love.graphics.setShader(self.shader)
end
local lastColor = {love.graphics.getColor()}
graphics.setColor(lastColor[1], lastColor[2], lastColor[3], lastColor[4] * self.alpha)

if self.visible then
--love.graphics.rotate((frameData[self.curFrame].rotated and -math.rad(90) or 0))
love.graphics.draw(
Expand All @@ -577,6 +577,9 @@ return {
self.stencilInfo = nil
love.graphics.setStencilTest()
end

love.graphics.setShader(lastShader)
love.graphics.setColor(lastColor)
end
end,

Expand Down
26 changes: 26 additions & 0 deletions src/love/shaders/RGBPallette.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
extern vec3 r;
extern vec3 g;
extern vec3 b;
extern float a = 1.0;
extern float mult = 1.0;

vec4 effect(vec4 _, Image texture, vec2 texture_coords, vec2 screen_coords)
{
vec4 color = Texel(texture, texture_coords);

if (color.a == 0.0 || mult == 0.0) {
return color;
}

vec4 newColor = color;
newColor.rgb = min(color.r * r + color.g * g + color.b * b, vec3(1.0));
newColor.a = color.a * a;

color = mix(color, newColor, mult);

if (color.a > 0.0) {
return color;
}

return vec4(0.0, 0.0, 0.0, 0.0);
}
24 changes: 12 additions & 12 deletions src/love/sprites/down-arrow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
return graphics.newSprite(
images.notes,
{
{x = 647, y = 238, width = 157, height = 155, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 1: arrowDOWN0000
{x = 0, y = 240, width = 158, height = 154, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 7: blue alone0000
{x = 1062, y = 452, width = 51, height = 64, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 5: blue tail0000
{x = 1282, y = 457, width = 51, height = 44, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 6: blue hold0000
{x = 0, y = 0, width = 240, height = 236, offsetX = -6, offsetY = 0, offsetWidth = 240, offsetHeight = 236}, -- 8: down confirm0000
{x = 244, y = 0, width = 240, height = 236, offsetX = -6, offsetY = 0, offsetWidth = 240, offsetHeight = 236}, -- 9: down confirm0001
{x = 1206, y = 235, width = 221, height = 218, offsetX = -12, offsetY = -12, offsetWidth = 240, offsetHeight = 236}, -- 10: down confirm0002
{x = 1206, y = 235, width = 221, height = 218, offsetX = -12, offsetY = -12, offsetWidth = 240, offsetHeight = 236}, -- 11: down confirm0003
{x = 805, y = 399, width = 143, height = 139, offsetX = -4, offsetY = -3, offsetWidth = 150, offsetHeight = 146}, -- 12: down press0000
{x = 805, y = 399, width = 143, height = 139, offsetX = -4, offsetY = -3, offsetWidth = 150, offsetHeight = 146}, -- 13: down press0001
{x = 1898, y = 0, width = 150, height = 146, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 14: down press0002
{x = 1898, y = 0, width = 150, height = 146, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 15: down press0003
{x = 479, y = 234, width = 157, height = 154, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 1: arrowDOWN0000
{x = 1854, y = 1, width = 157, height = 154, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 5: blue0000
{x = 1051, y = 444, width = 50, height = 64, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 6: blue hold end0000
{x = 1102, y = 444, width = 50, height = 44, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 7: blue hold piece0000
{x = 1, y = 1, width = 238, height = 235, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 8: down confirm0000
{x = 240, y = 1, width = 238, height = 235, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 9: down confirm0001
{x = 1180, y = 230, width = 220, height = 216, offsetX = -9, offsetY = -10, offsetWidth = 238, offsetHeight = 235, rotated = false}, -- 10: down confirm0002
{x = 1180, y = 230, width = 220, height = 216, offsetX = -9, offsetY = -10, offsetWidth = 238, offsetHeight = 235, rotated = false}, -- 11: down confirm0003
{x = 146, y = 395, width = 142, height = 140, offsetX = -4, offsetY = -2, offsetWidth = 149, offsetHeight = 146, rotated = false}, -- 12: down press0000
{x = 146, y = 395, width = 142, height = 140, offsetX = -4, offsetY = -2, offsetWidth = 149, offsetHeight = 146, rotated = false}, -- 13: down press0001
{x = 615, y = 389, width = 149, height = 146, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 14: down press0002
{x = 615, y = 389, width = 149, height = 146, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 15: down press0003
},
{
["off"] = {start = 1, stop = 1, speed = 0, offsetX = 0, offsetY = 0},
Expand Down
30 changes: 15 additions & 15 deletions src/love/sprites/left-arrow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
return graphics.newSprite(
images.notes,
{
{x = 488, y = 238, width = 155, height = 158, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 1: arrowLEFT0000
{x = 972, y = 0, width = 230, height = 232, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 19: left confirm0000
{x = 1438, y = 233, width = 220, height = 222, offsetX = -5, offsetY = -5, offsetWidth = 230, offsetHeight = 232}, -- 20: left confirm0001
{x = 1438, y = 0, width = 227, height = 229, offsetX = -2, offsetY = -1, offsetWidth = 230, offsetHeight = 232}, -- 21: left confirm0002
{x = 1438, y = 0, width = 227, height = 229, offsetX = -2, offsetY = -1, offsetWidth = 230, offsetHeight = 232}, -- 22: left confirm0003
{x = 1898, y = 449, width = 139, height = 142, offsetX = -4, offsetY = -3, offsetWidth = 146, offsetHeight = 149}, -- 23: left press0000
{x = 1898, y = 449, width = 139, height = 142, offsetX = -4, offsetY = -3, offsetWidth = 146, offsetHeight = 149}, -- 24: left press0001
{x = 1898, y = 150, width = 146, height = 149, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 25: left press0002
{x = 1898, y = 150, width = 146, height = 149, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 26: left press0003
{x = 1117, y = 452, width = 51, height = 64, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 43: purple tail0000
{x = 0, y = 398, width = 154, height = 157, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 45: purple alone0000
{x = 1337, y = 457, width = 51, height = 44, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0}, -- 44: purple hold0000
{x = 156, y = 237, width = 154, height = 157, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 2: arrowLEFT0000
{x = 1406, y = 228, width = 218, height = 221, offsetX = -3, offsetY = -4, offsetWidth = 225, offsetHeight = 228, rotated = false}, -- 19: left confirm0000
{x = 1625, y = 228, width = 218, height = 221, offsetX = -3, offsetY = -4, offsetWidth = 225, offsetHeight = 228, rotated = false}, -- 20: left confirm0001
{x = 1180, y = 1, width = 225, height = 228, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 21: left confirm0002
{x = 1180, y = 1, width = 225, height = 228, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 22: left confirm0003
{x = 289, y = 395, width = 140, height = 142, offsetX = -3, offsetY = -3, offsetWidth = 146, offsetHeight = 149, rotated = false}, -- 23: left press0000
{x = 289, y = 395, width = 140, height = 142, offsetX = -3, offsetY = -3, offsetWidth = 146, offsetHeight = 149, rotated = false}, -- 24: left press0001
{x = 765, y = 392, width = 146, height = 149, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 25: left press0002
{x = 765, y = 392, width = 146, height = 149, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 26: left press0003
{x = 795, y = 234, width = 154, height = 157, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 27: purple0000
{x = 1102, y = 444, width = 50, height = 44, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 29: purple hold piece0000
{x = 1051, y = 444, width = 50, height = 64, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- 28: purple hold end0000
},
{
["off"] = {start = 1, stop = 1, speed = 0, offsetX = 0, offsetY = 0},
["confirm"] = {start = 2, stop = 5, speed = 24, offsetX = 0, offsetY = 0},
["press"] = {start = 6, stop = 9, speed = 24, offsetX = 0, offsetY = 0},
["end"] = {start = 10, stop = 10, speed = 0, offsetX = 0, offsetY = 0},
["on"] = {start = 11, stop = 11, speed = 0, offsetX = 0, offsetY = 0},
["hold"] = {start = 12, stop = 12, speed = 0, offsetX = 0, offsetY = 0}
["end"] = {start = 12, stop = 12, speed = 0, offsetX = 0, offsetY = 0},
["on"] = {start = 10, stop = 10, speed = 0, offsetX = 0, offsetY = 0},
["hold"] = {start = 11, stop = 11, speed = 0, offsetX = 0, offsetY = 0}
},
"off",
false
Expand Down
Loading

0 comments on commit e69e624

Please sign in to comment.