Skip to content

Commit

Permalink
Merge pull request #37 from MKN-Makuno/over_the_rainbow_Xp
Browse files Browse the repository at this point in the history
major adjustment to makunov2 and other minor adjustment.
  • Loading branch information
MikuAuahDark authored May 7, 2024
2 parents 21b0f16 + bf947e5 commit e27795b
Show file tree
Hide file tree
Showing 17 changed files with 430 additions and 392 deletions.
2 changes: 2 additions & 0 deletions assets/i18n/english.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@
"setting:live:vanish:none": "None",
"setting:live:vanish:hidden": "Hidden",
"setting:live:vanish:sudden": "Sudden",
"setting:live:vanish:stealth": "Stealth",
"setting:live:noteVisualSize": "Visual Note & Icon size",
"setting:volume": "Volume",
"setting:volume:effect": "SE Volume",
"setting:volume:master": "Master Volume",
Expand Down
2 changes: 2 additions & 0 deletions assets/i18n/thai.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@
"setting:live:vanish:none": "ปกติ",
"setting:live:vanish:hidden": "ล่องหนก่อนถึง",
"setting:live:vanish:sudden": "ปรากฏก่อนถึง",
"setting:live:vanish:stealth": "ไม่ปรากฏ",
"setting:live:noteVisualSize": "ขนาดโน้ตและไอคอน",

"setting:volume": "เสียง",
"setting:volume:effect": "ระดับเสียงเอฟเฟค",
Expand Down
Binary file modified assets/image/tap_circle/notes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions game/beatmap/loader/osu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ function osuLoader:__construct(f, dir)
internal.difficulty = diffInfo
line = readKVSection(lines, diffInfo, "(%w+):(.+)")

if diffInfo.CircleSize > 9 then
error("Beatmaps with 10K+ is not supported.")
end

-- [Events] section
assert(line == "[Events]", "missing [Events] section")
internal.storyboardLine = {}
Expand Down
2 changes: 1 addition & 1 deletion game/color_theme.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ local ColorTheme = {

local currentColor, currentColorDark, currentColorDarker

-- colid: 1 = μ's, 2 = Aqours, 3 = NijiGaku
-- colid: 1 = μ's, 2 = Aqours, 3 = NijiGaku, 4 = Liella, 5 = Hasunosora
function ColorTheme.init(colid)
if currentColor then return end
return ColorTheme.set(colid)
Expand Down
34 changes: 22 additions & 12 deletions game/live/note.lua
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ function noteManager:__construct(param)
self.noteImage = param.image
-- long note trail image
self.lnTrailImage = param.trailImage
-- note size
self.noteSize = param.noteVisualSize
-- note speed
self.noteSpeed = param.noteSpeed or Setting.get("NOTE_SPEED") * 0.001
-- list of notes
Expand Down Expand Up @@ -588,7 +590,7 @@ function normalMovingNote:__construct(definition, param)
self.simul = false -- set later
-- swing rotation
self.rotation = false -- set later
-- vanish type (1 = hidden, 2 = sudden)
-- vanish type (1 = hidden, 2 = sudden, 3 = stealth)
self.vanishType = definition.vanish or param.vanish or 0
-- opacity
self.opacity = 1
Expand Down Expand Up @@ -620,6 +622,9 @@ function normalMovingNote:update(dt)
elseif self.vanishType == 2 then
-- Sudden note
self.opacity = Util.clamp((self.elapsedTime - self.noteSpeed * 0.4) / self.noteSpeed * 5, 0, 1)
elseif self.vanishType == 3 then
-- Stealth note
self.opacity = 0
end
end

Expand All @@ -634,7 +639,7 @@ function normalMovingNote:draw()
self.noteLayers,
self.opacity,
self.position,
self.elapsedTime / self.noteSpeed,
(self.elapsedTime / self.noteSpeed) * self.manager.noteSize,
self.rotation
)
end
Expand Down Expand Up @@ -778,12 +783,16 @@ function longMovingNote:update(dt)
-- Sudden note
self.opacity = Util.clamp((self.elapsedTime - self.noteSpeed * 0.4) * 5, 0, 1)
self.lnOpacity = Util.clamp((x - self.noteSpeed * 0.4) * 5, 0, 1)
elseif self.vanishType == 3 then
-- Stealth note
self.opacity = 0
self.lnOpacity = 0
end
end

-- calculate vertices
local s1 = self.lnHolding and 1 or self.elapsedTime / self.noteSpeed
local s2 = math.max(self.elapsedTime - self.lnSpawnTime, 0) / self.noteSpeed
local s1 = self.lnHolding and self.manager.noteSize or (self.elapsedTime / self.noteSpeed) * self.manager.noteSize
local s2 = (math.max(self.elapsedTime - self.lnSpawnTime, 0) / self.noteSpeed) * self.manager.noteSize
local op = select(4, color.compat(0, 0, 0, self.opacity))
-- First position
self.lnVertices[4][1] = self.position.x + (s1 * 62) * math.cos(self.lnRotation)
Expand Down Expand Up @@ -825,7 +834,7 @@ function longMovingNote:drawBelow()
love.graphics.draw(self.lnMesh)
-- 2. draw end note circle
if self.elapsedTime - self.lnSpawnTime > 0 then
local s = (self.elapsedTime - self.lnSpawnTime) / self.noteSpeed
local s = ((self.elapsedTime - self.lnSpawnTime) / self.noteSpeed) * self.manager.noteSize
love.graphics.setColor(color.compat(255, 255, 255, self.manager.opacity * self.lnOpacity))
love.graphics.draw(
self.manager.noteImage, note.quadRegion[3],
Expand All @@ -841,7 +850,7 @@ function longMovingNote:draw()
self.noteLayers,
self.opacity,
self.position,
self.lnHolding and 1 or self.elapsedTime / self.noteSpeed,
self.lnHolding and self.manager.noteSize or (self.elapsedTime / self.noteSpeed) * self.manager.noteSize,
self.rotation
)
end
Expand All @@ -852,6 +861,7 @@ function longMovingNote:drawAbove()
love.graphics.push()
love.graphics.translate(self.position:unpack())
love.graphics.rotate(self.lnFlashRotation)
love.graphics.scale(self.manager.noteSize, self.manager.noteSize)
self.lnFlashEffect:setOpacity(self.manager.opacity * 255)
self.lnFlashEffect:draw()
love.graphics.pop()
Expand Down Expand Up @@ -1197,22 +1207,22 @@ end
function noteManager:draw()
-- draw timing window
if math.max(self.yellowTimingWindow.duration, self.redTimingWindow.duration) > 0 then
local xpy = math.sin(math.pi * self.yellowTimingWindow.rotation / 6) * 64
local ypy = math.cos(math.pi * self.yellowTimingWindow.rotation / 6) * 64
local xpr = math.sin(math.pi * self.redTimingWindow.rotation / 6) * 64
local ypr = math.cos(math.pi * self.redTimingWindow.rotation / 6) * 64
local xpy = math.sin(math.pi * self.yellowTimingWindow.rotation / 6) * (64 * self.noteSize)
local ypy = math.cos(math.pi * self.yellowTimingWindow.rotation / 6) * (64 * self.noteSize)
local xpr = math.sin(math.pi * self.redTimingWindow.rotation / 6) * (64 * self.noteSize)
local ypr = math.cos(math.pi * self.redTimingWindow.rotation / 6) * (64 * self.noteSize)

love.graphics.setColor(color.compat(255, 255, 255, self.opacity))

for i = 1, 9 do
local pos = self.lane[i]

if self.yellowTimingWindow.duration > 0 then
love.graphics.draw(self.timingImage, yellowTimingQuad, pos.x + xpy, pos.y + ypy, 0, 1, 1, 16, 16)
love.graphics.draw(self.timingImage, yellowTimingQuad, pos.x + xpy, pos.y + ypy, 0, self.noteSize, self.noteSize, 16, 16)
end

if self.redTimingWindow.duration > 0 then
love.graphics.draw(self.timingImage, redTimingQuad, pos.x + xpr, pos.y + ypr, 0, 1, 1, 16, 16)
love.graphics.draw(self.timingImage, redTimingQuad, pos.x + xpr, pos.y + ypr, 0, self.noteSize, self.noteSize, 16, 16)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion game/live/pause.lua
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ end
---@param x number
---@param y number
function Pause:mouseReleased(x, y)
if self.paused then
if self.paused and self.timer == math.huge then
local maxy = 300 + #buttons * 72
if x >= 384 and y >= 300 and x < 576 and y < maxy then
local index = (y - 300) / 72
Expand Down
85 changes: 53 additions & 32 deletions game/live/ui/makuno.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ local l = {
0 - Combo does affect the Score Multiplier.
1 - Combo doesn't affect the Score Multiplier.
]]
ds_casm = 1,
ds_casm = 0,

--[[ adm - AccuracyDisplayMode
1 - Start with 100%, decrease depend on judgements.
Expand Down Expand Up @@ -304,9 +304,7 @@ function MakunoUI:__construct(autoplay, mineff)
self.MC = true
--
self.audio_liveclearvoice = nil
self.audio_livefailvoice = nil
self.check_liveclearvoiceplayed = false
self.check_livefailvoiceplayed = false
--

---- Other #8
Expand Down Expand Up @@ -1002,37 +1000,60 @@ end

--------------------
-- Primary Draw Function

local dh = {
score_t = nil,
judge_t = nil,
acc_t = nil,
scacc_t = nil,
pigi_t = nil,
exsc_t = nil,
--
score_amo = nil,
scacc_amo = nil,
acc_amo = nil,
exscc_amo = nil,
ov_amo = nil,
sta_amo = nil,
--
pigi_ratio = nil,
--
pause_t = nil,
--
sta_pos = nil,
auto_pos = nil,
--
sbs = nil,
abs = nil,
ofs = nil,
--
t_y2 = nil,
}
function MakunoUI:drawHeader()

local dh = {
score_t = tostring(self.text.Top.SCORE.." (Rank "..self.dis_currentrank..")"),
judge_t = tostring(self.text.Top.JUDGE),
acc_t = tostring(self.text.Top.ACC),
scacc_t = tostring(self.text.Top.ACC.." "..self.text.Top.SCORE),
pigi_t = tostring(self.text.Top.PIGI),
exsc_t = tostring(self.text.Top.EXSCORE),
--
score_amo = string.format("%06d", self.dis_score),
scacc_amo = string.format("%06d", self.dis_score_2),
acc_amo = string.format("%.2f", self.dis_acc == 0 and 0 or self.dis_acc).."%",
exscc_amo = string.format("%04d", self.dis_ex_score),
ov_amo = "x"..tostring(self.overflow_bonus),
sta_amo = tostring(math.floor(self.dis_stamina)),
--
pigi_ratio = string.format("%.3f", tostring(self.PIGI_ratio))..":1",
--
pause_t = "",
--
sta_pos = 63,
auto_pos = 68,
--
sbs = 960,
abs = 160,
ofs = 0,
--
t_y2 = l.ds_sbt == 1 and 12 or 10,
}
dh.score_t = tostring(self.text.Top.SCORE.." (Rank "..self.dis_currentrank..")")
dh.judge_t = tostring(self.text.Top.JUDGE)
dh.acc_t = tostring(self.text.Top.ACC)
dh.scacc_t = tostring(self.text.Top.ACC.." "..self.text.Top.SCORE)
dh.pigi_t = tostring(self.text.Top.PIGI)
dh.exsc_t = tostring(self.text.Top.EXSCORE)
--
dh.score_amo = string.format("%06d", self.dis_score)
dh.scacc_amo = string.format("%06d", self.dis_score_2)
dh.acc_amo = string.format("%.2f%%", self.dis_acc == 0 and 0 or self.dis_acc)
dh.exscc_amo = string.format("%04d", self.dis_ex_score)
dh.ov_amo = "x"..tostring(self.overflow_bonus)
dh.sta_amo = tostring(math.floor(self.dis_stamina))
--
dh.pigi_ratio = string.format("%.3f:1", tostring(self.PIGI_ratio))
--
dh.sta_pos = 63
dh.auto_pos = 68
--
dh.sbs = 960
dh.abs = 160
dh.ofs = 0
--
dh.t_y2 = l.ds_sbt == 1 and 12 or 10

do
if self.nameDisplay ~= nil then
Expand Down
Loading

0 comments on commit e27795b

Please sign in to comment.