Skip to content

Commit

Permalink
Merge pull request #38 from MKN-Makuno/over_the_rainbow_Xp
Browse files Browse the repository at this point in the history
Interface adjustment & finish the makunov2 (I hope)
  • Loading branch information
MikuAuahDark authored Aug 2, 2024
2 parents e27795b + 6706be4 commit 93c13e8
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 36 deletions.
2 changes: 1 addition & 1 deletion game/beatmap/loader/osu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function osuLoader:getNotesList()
local internal = Luaoop.class.data(self)
local beatmap = {}
local offset = -(internal.general.AudioLeanIn or 0)
local nkeys = internal.difficulty.CircleSize
local nkeys = math.floor(internal.difficulty.CircleSize)
local attribute = Setting.get("LLP_SIFT_DEFATTR")

if internal.general.Mode == 3 then
Expand Down
27 changes: 22 additions & 5 deletions game/color_theme.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,68 @@

local color = require("color")
local ColorTheme = {
[1] = {
[1] = { -- µ's
-- ff4fae
currentColor = {0xff, 0x4f, 0xae, color.hexFF4FAE},
-- ef46a1
currentColorDark = {0xef, 0x46, 0xa1, color.hexEF46A1},
-- c31c76
currentColorDarker = {0xc3, 0x1c, 0x76, color.hexC31C76}
},
[2] = {
[2] = { -- Aqours
-- 46baff
currentColor = {0x46, 0xba, 0xff, color.hex46BAFF},
-- 3bacf0
currentColorDark = {0x3b, 0xac, 0xf0, color.hex3BACF0},
-- 007ec6
currentColorDarker = {0x00, 0x7e, 0xc6, color.hex007EC6}
},
[3] = {
[3] = { -- NijiGaku
-- ffc22e
currentColor = {0xff, 0xc2, 0x2e, color.hexFFC22E},
-- e8b126
currentColorDark = {0xe8, 0xb1, 0x26, color.hexE8B126},
-- ac7b0a
currentColorDarker = {0xac, 0x7b, 0x0a, color.hexAC7B0A}
},
[4] = {
[4] = { -- Liella
-- d991d8
currentColor = {0xd9, 0x91, 0xd8, color.hexD991D8},
-- cc6bcb
currentColorDark = {0xcc, 0x6b, 0xcb, color.hexCC6BCB},
-- bf45bd
currentColorDarker = {0xbf, 0x45, 0xbd, color.hexBF45BD}
},
[5] = {
[5] = { -- Hasunosora
-- fb9ba9
currentColor = {0xfb, 0x9b, 0xa9, color.hexFB9BA9},
-- fb8a9b
currentColorDark = {0xfb, 0x8a, 0x9b, color.hexFB8A9B},
-- fb7085
currentColorDarker = {0xfb, 0x70, 0x85, color.hexFB7085}
},
[6] = { -- (School Idol) Musical
-- f70042
currentColor = {0xf7, 0x09, 0x42, color.hexF70042},
-- de003b
currentColorDark = {0xde, 0x00, 0x3b, color.hexDE003B},
-- c40035
currentColorDarker = {0xc4, 0x00, 0x35, color.hexC40035}
},
[7] = { -- Yohane (the Parhelion)
-- 23a2b0
currentColor = {0x23, 0xa2, 0xb0, color.hex23A2B0},
-- 1e8a96
currentColorDark = {0x1e, 0x8a, 0x96, color.hex1E8A96},
-- 19737d
currentColorDarker = {0x19, 0x73, 0x7d, color.hex19737D}
}
}

local currentColor, currentColorDark, currentColorDarker

-- colid: 1 = μ's, 2 = Aqours, 3 = NijiGaku, 4 = Liella, 5 = Hasunosora
-- 6 = Musical, 7 = Yohane
function ColorTheme.init(colid)
if currentColor then return end
return ColorTheme.set(colid)
Expand Down
2 changes: 1 addition & 1 deletion game/live/pause.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function Pause:mouseReleased(x, y)
end

function Pause:fastResume()
if self.paused then
if self.paused and not(self.isFailed) then
self.callback.resume(self.opaque)
self.timer = math.huge
self.paused = false
Expand Down
88 changes: 67 additions & 21 deletions game/live/ui/makunov2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ local itf_conf = {
1 - Display as Percentage (Start from 100%)
2 - Display as 1 Million Points
]]
dy_accdisplay = 0,
dy_accdisplay = 1,

--[[ sy_sif2rank - Display | SIF2 Rank
Mimic the SIF2 Score Rank system.
Expand Down Expand Up @@ -228,7 +228,7 @@ function MakunoV2UI:__construct(aupy, mife)
{fonts.light, 31}, -- Score & Acc number
{fonts.regular, 14}, -- Sub info number
{fonts.regular, 20}, -- Combo number & Judgement text
{fonts.light, 50}, -- Live result text
{fonts.light, 54}, -- Live result text
})
self.image = AssetCache.loadMultipleImages(
{
Expand Down Expand Up @@ -478,16 +478,53 @@ end
function MakunoV2UI:getFailAnimation()
local TL = {
t = timer:new(),

bg_color = {255, 69, 0, 0.8},
text = {
font = self.fonts[5], font_h = self.fonts_h[5] * 0.5,
str = "LIVE FAILED",
x = 480, y = 320,
scale = 0.6,
o = 0,
}
}

function TL.update(_, dt)
TL.t:update(dt)
end

function TL:draw(_, x, y)
love.graphics.setBlendMode("add", "alphamultiply")
setColor(TL.bg_color)
love.graphics.rectangle("fill", -88, -43, 1136, 726)

setColor(55, 55, 55, TL.text.o * 0.5)
love.graphics.printf(spacedtext(TL.text.str), TL.text.font, TL.text.x, TL.text.y + 2, 720, "center", 0, TL.text.scale, TL.text.scale, 360, TL.text.font_h)
setColor(255, 255, 255, TL.text.o)
love.graphics.printf(spacedtext(TL.text.str), TL.text.font, TL.text.x, TL.text.y, 720, "center", 0, TL.text.scale, TL.text.scale, 360, TL.text.font_h)
end

TL.t:tween(200, TL.text, {
o = 0.9,
scale = 0.99,
}, "out-expo")

TL.t:after(200, function()
TL.t:tween(2650, TL.text, {
scale = 1,
}, "linear")
end)

TL.t:after(2850, function()
TL.t:tween(150, TL, {
bg_color = {0, 0, 0, 0.75},
}, "out-quart")

TL.t:tween(150, TL.text, {
o = 0,
}, "out-quart")
end)

return TL
end

Expand Down Expand Up @@ -608,17 +645,17 @@ function MakunoV2UI:update(dt, paused)

if not(paused) then
self.timer:update(dt)
end

for i = (#itf_score.txt - 1), 1, -1 do
if self.display_score >= self.data_scorerank[i] then
if (itf_conf.dy_usesuperrank == 0) and i > 4 then i = 4 end

if self.tween_display_colorrank then self.timer:cancel(self.tween_display_colorrank) end
self.tween_display_colorrank = self.timer:tween(1, self.display_scorecolor, retrieveColor(1 + i), "out-expo")

self.display_ranktext = itf_score.txt[1 + i]
break
for i = (#itf_score.txt - 1), 1, -1 do
if self.display_score >= self.data_scorerank[i] then
if (itf_conf.dy_usesuperrank == 0) and i > 4 then i = 4 end

if self.tween_display_colorrank then self.timer:cancel(self.tween_display_colorrank) end
self.tween_display_colorrank = self.timer:tween(1, self.display_scorecolor, retrieveColor(1 + i), "out-expo")

self.display_ranktext = itf_score.txt[1 + i]
break
end
end
end

Expand Down Expand Up @@ -718,10 +755,16 @@ end

function MakunoV2UI:addScore(amount)

local a = math.ceil(amount + (amount * self.data_overflowmultiply))

if a == 0 then return end
local a

if itf_conf.sy_useoverflow == 1 then
a = math.ceil(amount + (amount * self.data_overflowmultiply))
else
a = math.ceil(amount)
end

if (a == 0 or a == nil) then return end

self.data_currentscore = self.data_currentscore + a
--
if self.tween_display_currentscore then
Expand Down Expand Up @@ -975,12 +1018,15 @@ function MakunoV2UI:addStamina(value)
self.tween_display_stamina = nil
end

self.tween_display_stamina = self.timer:tween(
0.35, self, {
display_stamina = self.data_currentstamina
}, "out-quart"
)

if self.data_currentstamina > 0 then
self.tween_display_stamina = self.timer:tween(
0.35, self, {
display_stamina = self.data_currentstamina
}, "out-quart"
)
else
self.display_stamina = 0
end
end

function MakunoV2UI:addTapEffect(x, y, r, g, b, a)
Expand Down
3 changes: 2 additions & 1 deletion game/states/beatmap_select.lua
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ do
love.graphics.setColor(color.hexFFDF35)
love.graphics.rectangle("fill", x, y, self.width, self.height, 20, 20)
love.graphics.rectangle("line", x, y, self.width, self.height, 20, 20)
love.graphics.setColor(color.white)
love.graphics.setColor(color.black)
love.graphics.draw(self.image, x + 12, y + 7, 0, 0.32)
Util.drawText(self.text, x + 37, y + 12)

Expand Down Expand Up @@ -676,6 +676,7 @@ function beatmapSelect:load()
self.persist.beatmapCoverArt = nil
self.persist.selectedBeatmap = nil
self.persist.replaysFrame:clear()
self.data.difficultyButton:setText("", false)
self.data.difficultyDropdown:hide()
Glow.removeElement(self.data.deleteBeatmap)

Expand Down
2 changes: 1 addition & 1 deletion game/states/gamesetting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ function gameSetting:load()
-- General settings
if self.persist.generalSetting == nil then
local frame = newSettingFrame()
local themeDisplay = {"μ's", "Aqours", "NijiGaku", "Liella", "Hasunosora"}
local themeDisplay = {"μ's", "Aqours", "NijiGaku", "Liella", "Hasunosora", "Musical", "Yohane"}
local tapSoundDisplay = {}
for i = 1, #tapSound do
tapSoundDisplay[i] = tapSound[i].name
Expand Down
1 change: 1 addition & 0 deletions game/states/main_menu_v31.lua
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ function mainMenu:draw()
love.graphics.setColor(color.white)
love.graphics.draw(self.data.background)
love.graphics.draw(self.data.grayGradient, -90, 576, 0, 1140, 64, 0, 0)
love.graphics.draw(self.data.grayGradient, -90, 640, 0, 1140, -16, 0, 1)
Util.drawText(self.data.titleText, 38, 584)
Util.drawText(self.data.verSemText, 921, 578)
Util.drawText(self.data.verCodeText, 923, 604)
Expand Down
24 changes: 18 additions & 6 deletions game/states/result_summary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ local CircleIconButton = require("game.ui.circle_icon_button")
local interpolation = CubicBezier(0.4, 0, 0.2, 1):getFunction()
local mipmaps = {mipmaps = true}
local accuracyColorMap = {
{color.hexFF0AD8, "PERFECT"},
{color.hexFF6854, "GREAT"},
{color.hex1DBB1A, "GOOD"},
{color.hex1CA0FF, "BAD"},
{color.hexFF5C5C, "MISS"}
{color.hexBE8C00, "PERFECT"},
{color.hex47BDFF, "GREAT"},
{color.hex52CC4F, "GOOD"},
{color.hexF98322, "BAD"},
{color.hexFB2256, "MISS"}
}
local rankingQuad

Expand Down Expand Up @@ -56,6 +56,12 @@ local function leave()
Gamestate.leave(LoadingInstance.getInstance())
end

local function skipResultTween(self)
if not(self) then return end
self.persist.graphTimer = 3
self.persist.statusTimer = 5.7
end

function resultScreen:load(arg)
-- arg contains:
-- * name - beatmap name
Expand Down Expand Up @@ -291,7 +297,7 @@ function resultScreen:start(arg)
end

function resultScreen:update(dt)
local needRefresh = self.persist.graphTimer < 3
local needRefresh = self.persist.graphTimer <= 3
if needRefresh then
self.persist.graphTimer = math.min(self.persist.graphTimer + dt, 3)
end
Expand Down Expand Up @@ -399,4 +405,10 @@ resultScreen:registerEvent("keyreleased", function(_, key)
end
end)

resultScreen:registerEvent("mousepressed", function(self, _, _, b, ist)
if ist or b <= 2 then
return skipResultTween(self)
end
end)

return resultScreen

0 comments on commit 93c13e8

Please sign in to comment.