forked from htv04/funkin-rewritten
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc648b5
commit 7233dae
Showing
47 changed files
with
200 additions
and
215 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
return { | ||
imagePath = function(path) | ||
return graphics.imagePath("icons/icon-" .. path) | ||
end, | ||
newIcon = function(path, scale) | ||
if not graphics.cache[path] then | ||
graphics.cache[path] = love.graphics.newImage(path) | ||
end | ||
local img = graphics.cache[path] | ||
local frameData = { | ||
{x = 0, y = 0, width = img:getWidth()/2, height = img:getHeight(), offsetX = 0, offsetY = 0, offsetWidth = img:getWidth()/2, offsetHeight = img:getHeight(), rotated = false}, | ||
{x = img:getWidth()/2, y = 0, width = img:getWidth(), height = img:getHeight(), offsetX = 0, offsetY = 0, offsetWidth = img:getWidth()/2, offsetHeight = img:getHeight(), rotated = false} | ||
} | ||
local image, width, height | ||
local frames = {} | ||
local frame | ||
local anims = {} | ||
local quads = {} | ||
for i, frame in ipairs(frameData) do | ||
quads[i] = love.graphics.newQuad(frame.x, frame.y, frame.width, frame.height, img:getDimensions()) | ||
end | ||
frame = quads[1] | ||
local curFrame = 1 | ||
-- 2 frames, width = img:getWidth()/2, height = img:getHeight() | ||
--{x = 212, y = 0, width = 68, height = 196, offsetX = 0, offsetY = 0, offsetWidth = 0, offsetHeight = 0, rotated = false}, -- <- example frame data | ||
|
||
local object = { | ||
x = 0, | ||
y = 0, | ||
orientation = 0, | ||
sizeX = 1, | ||
sizeY = 1, | ||
offsetX = 0, | ||
offsetY = 0, | ||
shearX = 0, | ||
shearY = 0, | ||
scale = scale or 1, | ||
|
||
scrollFactor = {x=1,y=1}, | ||
|
||
clipRect = nil, | ||
stencilInfo = nil, | ||
|
||
alpha = 1, | ||
|
||
flipX = false, | ||
visible = true, | ||
|
||
setFrame = function(self, frameNum) | ||
curFrame = frameNum | ||
frame = quads[frameNum] | ||
end, | ||
|
||
getCurFrame = function(self) | ||
return curFrame | ||
end, | ||
|
||
update = function(self, dt) | ||
|
||
end, | ||
|
||
draw = function(self) | ||
if not self.visible then return end | ||
|
||
local ox = frameData[curFrame].offsetWidth/2 + frameData[curFrame].offsetX | ||
local oy = frameData[curFrame].offsetHeight/2 + frameData[curFrame].offsetY | ||
|
||
love.graphics.draw(img, frame, self.x, self.y, self.orientation, self.sizeX * self.scale, self.sizeY * self.scale, ox, oy) | ||
end | ||
} | ||
|
||
return object | ||
end, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -344,6 +344,6 @@ return graphics.newSprite( | |
{ | ||
sing_duration = 4, | ||
isCharacter = true, | ||
icon = "boyfriend" | ||
icon = "bf" | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -312,6 +312,7 @@ return graphics.newSprite( | |
false, | ||
{ | ||
sing_duration = 4, | ||
isCharacter = true | ||
isCharacter = true, | ||
icon = "bf" | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -334,6 +334,6 @@ return graphics.newSprite( | |
{ | ||
sing_duration = 4, | ||
isCharacter = true, | ||
icon = "boyfriend" | ||
icon = "bf", | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -540,6 +540,6 @@ return graphics.newSprite( | |
{ | ||
sing_duration = 4, | ||
isCharacter = true, | ||
icon = "boyfriend" | ||
icon = "bf" | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,6 +103,6 @@ return graphics.newSprite( | |
{ | ||
sing_duration = 4, | ||
isCharacter = true, | ||
icon = "mommy mearest" | ||
icon = "mom" | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.