Result crown: shine sweep per crown colour #74
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -90,5 +90,95 @@
|
|||||||
"x": 989,
|
"x": 989,
|
||||||
"y": 626
|
"y": 626
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"shine_clear": [
|
||||||
|
{
|
||||||
|
"x": 232,
|
||||||
|
"y": 349,
|
||||||
|
"crop": [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
320,
|
||||||
|
320
|
||||||
|
],
|
||||||
|
[
|
||||||
|
320,
|
||||||
|
0,
|
||||||
|
320,
|
||||||
|
320
|
||||||
|
],
|
||||||
|
[
|
||||||
|
640,
|
||||||
|
0,
|
||||||
|
320,
|
||||||
|
320
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 1188,
|
||||||
|
"y": 349
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"shine_fc": [
|
||||||
|
{
|
||||||
|
"x": 232,
|
||||||
|
"y": 349,
|
||||||
|
"crop": [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
320,
|
||||||
|
320
|
||||||
|
],
|
||||||
|
[
|
||||||
|
320,
|
||||||
|
0,
|
||||||
|
320,
|
||||||
|
320
|
||||||
|
],
|
||||||
|
[
|
||||||
|
640,
|
||||||
|
0,
|
||||||
|
320,
|
||||||
|
320
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 1188,
|
||||||
|
"y": 349
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"shine_dfc": [
|
||||||
|
{
|
||||||
|
"x": 232,
|
||||||
|
"y": 349,
|
||||||
|
"crop": [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
320,
|
||||||
|
320
|
||||||
|
],
|
||||||
|
[
|
||||||
|
320,
|
||||||
|
0,
|
||||||
|
320,
|
||||||
|
320
|
||||||
|
],
|
||||||
|
[
|
||||||
|
640,
|
||||||
|
0,
|
||||||
|
320,
|
||||||
|
320
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 1188,
|
||||||
|
"y": 349
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -57,6 +57,10 @@ function ResultCrown.new(crown_type, is_2p, has_2p)
|
|||||||
self.t_crown = tex.get_texture("result/crown/" .. (crown_names[crown_type] or "crown_clear"))
|
self.t_crown = tex.get_texture("result/crown/" .. (crown_names[crown_type] or "crown_clear"))
|
||||||
self.t_crown_fade = tex.get_texture("result/crown/crown_fade")
|
self.t_crown_fade = tex.get_texture("result/crown/crown_fade")
|
||||||
self.t_gleam = tex.get_texture("result/crown/gleam")
|
self.t_gleam = tex.get_texture("result/crown/gleam")
|
||||||
|
-- crown_loop shine: each crown colour has its own three sweep frames, pieces of that crown's
|
||||||
|
-- art crossed by a diagonal light band
|
||||||
|
local shine_names = { [0] = "shine_clear", [1] = "shine_fc", [2] = "shine_dfc" }
|
||||||
|
self.t_shine = tex.get_texture("result/crown/" .. (shine_names[crown_type] or "shine_clear"))
|
||||||
|
|
||||||
local colours = { [0] = "silver", [1] = "gold", [2] = "rainbow" }
|
local colours = { [0] = "silver", [1] = "gold", [2] = "rainbow" }
|
||||||
local seat = has_2p and (is_2p and "_r" or "_l") or "_c"
|
local seat = has_2p and (is_2p and "_r" or "_l") or "_c"
|
||||||
@@ -127,11 +131,12 @@ function ResultCrown:draw()
|
|||||||
if f >= CROWN_END_F - 5 then
|
if f >= CROWN_END_F - 5 then
|
||||||
local k = (f - (CROWN_END_F - 5)) % (CLOOP_LEN > 1 and CLOOP_LEN or 180)
|
local k = (f - (CROWN_END_F - 5)) % (CLOOP_LEN > 1 and CLOOP_LEN or 180)
|
||||||
local shine, have_table = crown_loop_shine(k)
|
local shine, have_table = crown_loop_shine(k)
|
||||||
|
if not self.t_shine then return end
|
||||||
if shine then
|
if shine then
|
||||||
tex.draw_texture(self.t_gleam,
|
tex.draw_texture(self.t_shine,
|
||||||
{ frame = GL_SHINE[shine], center = true, index = idx })
|
{ frame = GL_SHINE[shine], center = true, index = idx })
|
||||||
elseif not have_table and k < 9 then
|
elseif not have_table and k < 9 then
|
||||||
tex.draw_texture(self.t_gleam,
|
tex.draw_texture(self.t_shine,
|
||||||
{ frame = GL_SHINE[math.floor(k / 3) + 1], center = true, index = idx })
|
{ frame = GL_SHINE[math.floor(k / 3) + 1], center = true, index = idx })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user