1
0
mirror of synced 2025-02-15 18:22:42 +01:00
This commit is contained in:
0auBSQ 2024-07-24 23:40:52 +09:00
parent d995b2d57b
commit f6a08d3a50
79 changed files with 2419 additions and 1421 deletions

View File

@ -42,7 +42,7 @@ namespace SampleFramework
public static GL Gl { get; private set; }
public static Silk.NET.Core.Contexts.IGLContext Context { get; private set; }
internal static List<Action> AsyncActions = new();
public static List<Action> AsyncActions { get; private set; } = new();
private string strIconFileName;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,76 @@
{
"font_name_normal":{
"size":22,
"maxsize":330
},
"font_name_withtitle":{
"size":18,
"maxsize":180
},
"font_title":{
"size":16,
"maxsize":240
},
"font_dan":{
"size":18,
"maxsize":100
},
"text_name_normal":{
"offset_x":181,
"offset_y":68
},
"text_name_withtitle":{
"offset_x":181,
"offset_y":68
},
"text_name_full":{
"offset_x":216,
"offset_y":68
},
"text_title":{
"offset_x":186,
"offset_y":35
},
"text_dan":{
"offset_x":103,
"offset_y":68
},
"title_plate":{
"offset_x":-3,
"offset_y":-3
},
"titles":{
"0":{
"framecount":0,
"effect":"none"
},
"1":{
"framecount":0,
"effect":"flash"
},
"2":{
"framecount":0,
"effect":"flash"
},
"3":{
"framecount":0,
"effect":"flash"
},
"4":{
"framecount":0,
"effect":"flash"
},
"5":{
"framecount":0,
"effect":"flash"
},
"6":{
"framecount":0,
"effect":"flash"
},
"7":{
"framecount":5,
"effect":"none"
}
}
}

View File

@ -0,0 +1,410 @@
import ('System.Drawing')
local dan_types = { "Clear", "FC", "AP" }
local config = nil
local config_font_name_normal_size = nil
local config_font_name_normal_maxsize = nil
local config_font_name_withtitle_size = nil
local config_font_name_withtitle_maxsize = nil
local config_text_name_full_offset_x = nil
local config_text_name_full_offset_y = nil
local config_font_title_size = nil
local config_font_title_maxsize = nil
local config_font_dan_size = nil
local config_font_dan_maxsize = nil
local config_text_title_offset_x = nil
local config_text_title_offset_y = nil
local config_text_dan_offset_x = nil
local config_text_dan_offset_y = nil
local config_title_plate_offset_x = nil
local config_title_plate_offset_y = nil
local config_titletypes = { "0", "1" }
local config_titleplate_effects = { }
local nameplate_count = 32
local base = nil
local dan_gradation = { }
local players = { }
local players_blue = nil
local titles = { }
local title_plates = { { } }
local title_plate_star_big = { }
local title_plate_star_small = { }
local slash = nil
local font_name_normal_size = nil
local font_name_withtitle = nil
local font_title = nil
local font_dan = nil
local player_data = { nil, nil, nil, nil, nil }
local name_titlekey = { nil, nil, nil, nil, nil }
local title_titlekey = { nil, nil, nil, nil, nil }
local dan_titlekey = { nil, nil, nil, nil, nil }
local notitle = { false, false, false, false, false }
local nodan = { false, false, false, false, false }
local titleplate_counter = 0
local namePlateEffect_counter = 0
function implDrawStar(scale, x, y, star_small)
star_small:tSetScale(scale, scale)
star_small:t2D_DisplayImage_AnchorCenter(x, y)
end
function implDrawStarFlash(x, y, titleTexIndex)
star_small = title_plate_star_small[titleTexIndex]
resolutionScaleX = 1920.0 / 1280.0;
resolutionScaleY = 1080.0 / 720.0;
if namePlateEffect_counter <= 10 then
implDrawStar(1.0 - (namePlateEffect_counter / 10 * 1.0), x + (63 * resolutionScaleX), y + (25 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 3 and namePlateEffect_counter <= 10 then
implDrawStar(1.0 - ((namePlateEffect_counter - 3) / 7 * 1.0), x + (38 * resolutionScaleX), y + (7 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 6 and namePlateEffect_counter <= 10 then
implDrawStar(1.0 - ((namePlateEffect_counter - 6) / 4 * 1.0), x + (51 * resolutionScaleX), y + (5 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 8 and namePlateEffect_counter <= 10 then
implDrawStar(0.3 - ((namePlateEffect_counter - 8) / 2 * 0.3), x + (110 * resolutionScaleX), y + (25 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 11 and namePlateEffect_counter <= 13 then
implDrawStar(1.0 - ((namePlateEffect_counter - 11) / 2 * 1.0), x + (38 * resolutionScaleX), y + (7 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 11 and namePlateEffect_counter <= 15 then
implDrawStar(1.0, x + (51 * resolutionScaleX), y + 5, star_small)
end
if namePlateEffect_counter >= 11 and namePlateEffect_counter <= 17 then
implDrawStar(1.0 - ((namePlateEffect_counter - 11) / 7 * 1.0), x + (110 * resolutionScaleX), y + (25 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 16 and namePlateEffect_counter <= 20 then
implDrawStar(0.2 - ((namePlateEffect_counter - 16) / 4 * 0.2), x + (63 * resolutionScaleX), y + (25 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 17 and namePlateEffect_counter <= 20 then
implDrawStar(1.0 - ((namePlateEffect_counter - 17) / 3 * 1.0), x + (99 * resolutionScaleX), y + (1 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 20 and namePlateEffect_counter <= 24 then
implDrawStar(0.4, x + (63 * resolutionScaleX), y + 25, star_small)
end
if namePlateEffect_counter >= 20 and namePlateEffect_counter <= 25 then
implDrawStar(1.0, x + (99 * resolutionScaleX), y + 1, star_small)
end
if namePlateEffect_counter >= 20 and namePlateEffect_counter <= 30 then
implDrawStar(0.5 - ((namePlateEffect_counter - 20) / 10 * 0.5), x + (152 * resolutionScaleX), y + (7 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 31 and namePlateEffect_counter <= 37 then
implDrawStar(0.5 - ((namePlateEffect_counter - 31) / 6 * 0.5), x + (176 * resolutionScaleX), y + (8 * resolutionScaleY), star_small)
implDrawStar(1.0 - ((namePlateEffect_counter - 31) / 6 * 1.0), x + (175 * resolutionScaleX), y + (25 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 31 and namePlateEffect_counter <= 40 then
implDrawStar(0.9 - ((namePlateEffect_counter - 31) / 9 * 0.9), x + (136 * resolutionScaleX), y + (24 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 34 and namePlateEffect_counter <= 40 then
implDrawStar(0.7 - ((namePlateEffect_counter - 34) / 6 * 0.7), x + (159 * resolutionScaleX), y + (25 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 41 and namePlateEffect_counter <= 42 then
implDrawStar(0.7, x + (159 * resolutionScaleX), y + (25 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 43 and namePlateEffect_counter <= 50 then
implDrawStar(0.8 - ((namePlateEffect_counter - 43) / 7 * 0.8), x + (196 * resolutionScaleX), y + (23 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 51 and namePlateEffect_counter <= 57 then
implDrawStar(0.8 - ((namePlateEffect_counter - 51) / 6 * 0.8), x + (51 * resolutionScaleX), y + (5 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 51 and namePlateEffect_counter <= 52 then
implDrawStar(0.2, x + (166 * resolutionScaleX), y + (22 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 51 and namePlateEffect_counter <= 53 then
implDrawStar(0.8, x + (136 * resolutionScaleX), y + (24 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 51 and namePlateEffect_counter <= 55 then
implDrawStar(1.0, x + (176 * resolutionScaleX), y + (8 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 51 and namePlateEffect_counter <= 55 then
implDrawStar(1.0, x + (176 * resolutionScaleX), y + (8 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 61 and namePlateEffect_counter <= 70 then
implDrawStar(1.0 - ((namePlateEffect_counter - 61) / 9 * 1.0), x + (196 * resolutionScaleX), y + (23 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 61 and namePlateEffect_counter <= 67 then
implDrawStar(0.7 - ((namePlateEffect_counter - 61) / 6 * 0.7), x + (214 * resolutionScaleX), y + (14 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 63 and namePlateEffect_counter <= 70 then
implDrawStar(0.5 - ((namePlateEffect_counter - 63) / 7 * 0.5), x + (129 * resolutionScaleX), y + (24 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 63 and namePlateEffect_counter <= 70 then
implDrawStar(0.5 - ((namePlateEffect_counter - 63) / 7 * 0.5), x + (129 * resolutionScaleX), y + (24 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 65 and namePlateEffect_counter <= 70 then
implDrawStar(0.8 - ((namePlateEffect_counter - 65) / 5 * 0.8), x + (117 * resolutionScaleX), y + (7 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 71 and namePlateEffect_counter <= 72 then
implDrawStar(0.8, x + (151 * resolutionScaleX), y + (25 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 71 and namePlateEffect_counter <= 74 then
implDrawStar(0.8, x + (117 * resolutionScaleX), y + (7 * resolutionScaleY), star_small)
end
if namePlateEffect_counter >= 85 and namePlateEffect_counter <= 112 then
slash.Opacity = 1400 - (namePlateEffect_counter - 85) * 50
slash:t2D_DisplayImage(x + ((((namePlateEffect_counter - 85) * (150 / 27))) * resolutionScaleX), y + (7 * resolutionScaleY));
end
if namePlateEffect_counter >= 105 and namePlateEffect_counter <= 120 then
big_scale = 1.0
if namePlateEffect_counter < 112 then
big_scale = (namePlateEffect_counter - 105) / 8
title_plate_star_big[titleTexIndex].Opacity = 255
else
title_plate_star_big[titleTexIndex].Opacity = (255 - (namePlateEffect_counter - 112) * 31.875)
end
title_plate_star_big[titleTexIndex]:tSetScale(big_scale, big_scale)
title_plate_star_big[titleTexIndex]:t2D_DisplayImage_AnchorCenter(x + (193 * resolutionScaleX), y + (6 * resolutionScaleY))
end
end
function implDrawTitleEffect(x, y, titleTexIndex)
if titleTexIndex >= 1 and titleTexIndex <= #title_plates then
if config_titleplate_effects[titleTexIndex] == "flash" then
implDrawStarFlash(x, y, titleTexIndex)
elseif config_titleplate_effects[titleTexIndex] == "none" then
else
end
end
end
function implDrawTitlePlate(x, y, opacity, titleTexIndex)
if titleTexIndex >= 1 and titleTexIndex <= #title_plates then
titleplate_frame = 1 + math.ceil(titleplate_counter * (#title_plates[titleTexIndex] - 1))
tx_titleplate = title_plates[titleTexIndex][titleplate_frame]
tx_titleplate.Opacity = opacity
tx_titleplate:t2D_DisplayImage(x + config_title_plate_offset_x, y + config_title_plate_offset_y)
end
end
function reloadLanguage(lang)
end
function getCharaOffset()
return base.szTextureSize.Width / 2
end
function setInfos(player, name, title, dan, data)
player_lua = player + 1
player_data[player_lua] = data
notitle[player_lua] = (title == "")
nodan[player_lua] = (player_data[player_lua].Dan == nil or player_data[player_lua].Dan == "")
if notitle[player_lua] then
name_titlekey[player_lua] = createTitleTextureKey(name, font_name_normal_size, 99999)
else
name_titlekey[player_lua] = createTitleTextureKey(name, font_name_withtitle, 99999)
end
title_titlekey[player_lua] = createTitleTextureKey(title, font_title, 99999, Color.FromArgb(0,0,0,1), Color.FromArgb(0,0,0,0))
dan_titlekey[player_lua] = createTitleTextureKey(dan, font_dan, 99999)
end
function loadAssets()
config = loadConfig("Config.json")
config_font_name_normal_size = getNum(config["font_name_normal"]["size"])
config_font_name_normal_maxsize = getNum(config["font_name_normal"]["maxsize"])
config_font_name_withtitle_size = getNum(config["font_name_withtitle"]["size"])
config_font_name_withtitle_maxsize = getNum(config["font_name_withtitle"]["maxsize"])
config_font_title_size = getNum(config["font_title"]["size"])
config_font_title_maxsize = getNum(config["font_title"]["maxsize"])
config_font_dan_size = getNum(config["font_dan"]["size"])
config_font_dan_maxsize = getNum(config["font_dan"]["maxsize"])
config_text_name_normal_offset_x = getNum(config["text_name_normal"]["offset_x"])
config_text_name_normal_offset_y = getNum(config["text_name_normal"]["offset_y"])
config_text_name_withtitle_offset_x = getNum(config["text_name_withtitle"]["offset_x"])
config_text_name_withtitle_offset_y = getNum(config["text_name_withtitle"]["offset_y"])
config_text_name_full_offset_x = getNum(config["text_name_full"]["offset_x"])
config_text_name_full_offset_y = getNum(config["text_name_full"]["offset_y"])
config_text_title_offset_x = getNum(config["text_title"]["offset_x"])
config_text_title_offset_y = getNum(config["text_title"]["offset_y"])
config_text_dan_offset_x = getNum(config["text_dan"]["offset_x"])
config_text_dan_offset_y = getNum(config["text_dan"]["offset_y"])
config_title_plate_offset_x = getNum(config["title_plate"]["offset_x"])
config_title_plate_offset_y = getNum(config["title_plate"]["offset_y"])
for i = 0, nameplate_count - 1 do
config_titletypes[i + 1] = tostring(i)
end
base = loadTexture("Base.png")
dan_base = loadTexture("Dan_Base.png")
slash = loadTexture("Shines/Slash.png")
for i = 1, 3 do
dan_gradation[i] = loadTexture("Dan_"..dan_types[i]..".png")
end
for i = 1, 5 do
players[i] = loadTexture(tostring(i).."P.png")
end
players_blue = loadTexture("1P_Blue.png")
for i = 1, #config_titletypes do
titledir = "Title/"..config_titletypes[i]
titleplate_config = config["titles"][config_titletypes[i]]
config_titleplate_effects[i] = "none"
config_titleplate_framecount = 0
if titleplate_config ~= nil then
config_titleplate_effects[i] = getText(titleplate_config["effect"])
config_titleplate_framecount = getNum(titleplate_config["framecount"])
end
local titleplates = { }
for j = 0, config_titleplate_framecount do
titleplates[j + 1] = loadTexture(titledir.."/"..j..".png")
end
title_plates[i] = titleplates
if config_titleplate_effects[i] == "flash" then
title_plate_star_small[i] = loadTexture(titledir.."/Small.png")
title_plate_star_big[i] = loadTexture(titledir.."/Big.png")
end
end
font_name_normal_size = loadFontRenderer(config_font_name_normal_size, "regular")
font_name_withtitle = loadFontRenderer(config_font_name_withtitle_size, "regular")
font_title = loadFontRenderer(config_font_title_size, "regular")
font_dan = loadFontRenderer(config_font_dan_size, "regular")
end
function drawDan(x, y, opacity, type, titleTex)
base.Opacity = opacity
base:t2D_DisplayImage(x, y)
dan_base.Opacity = opacity
dan_base:t2D_DisplayImage(x, y)
--Dan text
if not(nodan[player_lua]) then
titleTex:tSetScale(math.min(config_font_dan_maxsize / titleTex.szTextureSize.Width, 1.0), 1.0)
titleTex.Opacity = opacity
titleTex:t2D_DisplayImage_AnchorCenter(x + config_text_dan_offset_x, y + config_text_dan_offset_y)
end
end
function drawTitlePlate(x, y, opacity, titletype, titleTex)
base.Opacity = opacity
base:t2D_DisplayImage(x, y)
implDrawTitlePlate(x, y, opacity, titletype + 1)
titleTex:tSetScale(math.min(config_font_title_maxsize / titleTex.szTextureSize.Width, 1.0), 1.0)
titleTex.Opacity = opacity
titleTex:t2D_DisplayImage_AnchorCenter(x + config_text_title_offset_x, y + config_text_title_offset_y)
end
function update()
titleplate_counter = titleplate_counter + (3.3 * fps.deltaTime)
if titleplate_counter >= 1 then
titleplate_counter = 0
end
namePlateEffect_counter = namePlateEffect_counter + (60 * fps.deltaTime)
if namePlateEffect_counter >= 120 then
namePlateEffect_counter = 0
end
end
function draw(x, y, opacity, player, side)
player_lua = player + 1
side_lua = side + 1
--White background
base.Opacity = opacity
base:t2D_DisplayImage(x, y)
--Upper (title) plate
titleplate_index = player_data[player_lua].TitleType + 1
if not(notitle[player_lua]) then
implDrawTitlePlate(x, y, opacity, titleplate_index)
end
--Dan plate
if not(player_data[player_lua].Dan == nil) and not(player_data[player_lua].Dan == "") then
dan_base.Opacity = opacity
dan_base:t2D_DisplayImage(x, y)
dan_gradation[player_data[player_lua].DanType + 1].Opacity = opacity
dan_gradation[player_data[player_lua].DanType + 1]:t2D_DisplayImage(x, y)
end
--Glow
implDrawTitleEffect(x, y, titleplate_index)
--Player number
if (player_lua == 1 and side_lua == 2) then
players_blue.Opacity = opacity
players_blue:t2D_DisplayImage(x, y)
else
players[player_lua].Opacity = opacity
players[player_lua]:t2D_DisplayImage(x, y)
end
--Dan text
if not(nodan[player_lua]) then
tx_dan = getTextTex(dan_titlekey[player_lua], false, false)
tx_dan:tSetScale(math.min(config_font_dan_maxsize / tx_dan.szTextureSize.Width, 1.0), 1.0)
tx_dan.Opacity = opacity
tx_dan:t2D_DisplayImage_AnchorCenter(x + config_text_dan_offset_x, y + config_text_dan_offset_y)
end
--Title/Name text
if notitle[player_lua] then
tx_name = getTextTex(name_titlekey[player_lua], false, false)
tx_name:tSetScale(math.min(config_font_name_normal_maxsize / tx_name.szTextureSize.Width, 1.0), 1.0)
tx_name.Opacity = opacity
tx_name:t2D_DisplayImage_AnchorCenter(x + config_text_name_normal_offset_x, y + config_text_name_normal_offset_y)
else
tx_title = getTextTex(title_titlekey[player_lua], false, false)
tx_title:tSetScale(math.min(config_font_title_maxsize / tx_title.szTextureSize.Width, 1.0), 1.0)
tx_title.Opacity = opacity
tx_title:t2D_DisplayImage_AnchorCenter(x + config_text_title_offset_x, y + config_text_title_offset_y)
tx_name = getTextTex(name_titlekey[player_lua], false, false)
tx_name:tSetScale(math.min(config_font_name_withtitle_maxsize / tx_name.szTextureSize.Width, 1.0), 1.0)
tx_name.Opacity = opacity
if nodan[player_lua] then
tx_name:t2D_DisplayImage_AnchorCenter(x + config_text_name_withtitle_offset_x, y + config_text_name_withtitle_offset_y)
else
tx_name:t2D_DisplayImage_AnchorCenter(x + config_text_name_full_offset_x, y + config_text_name_full_offset_y)
end
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@ -0,0 +1,31 @@
0 - Wood
1 - Orange
2 - Purple
3 - Green
4 - Red
5 - Blue
6 - Gray
7 - Rainbow
8 - Space
9 - Diamond
10 - ?
11 - Gold
12 - Pearl
13 - Platinum
14 - Kohaku (Character plate)
15 - Dashy (Character plate)
16 - Blue
17 - Red
18 - Sky Purple
19 - AI
20 - Cyan
21 - OpTk Yellow (Roll)
22 - Bol white
23 - Saturated blue
24 - Saturated green
25 - OpTk Chapter I
26 - OpTk Chapter II
27 - OpTk Chapter III
28 - OpTk Light
29 - OpTk Dark
30 - NEP0

View File

@ -855,7 +855,8 @@ namespace TJAPlayer3
if( r現在のステージ != null )
{
this.n進行描画の戻り値 = ( r現在のステージ != null ) ? r現在のステージ.Draw() : 0;
TJAPlayer3.NamePlate.lcNamePlate.Update();
this.n進行描画の戻り値 = ( r現在のステージ != null ) ? r現在のステージ.Draw() : 0;
#region [ ]
//---------------------
@ -2566,8 +2567,8 @@ for (int i = 0; i < 3; i++) {
//-----------------
private bool bマウスカーソル表示中 = true;
private bool b終了処理完了済み;
private bool bネットワークに接続中 = false;
private long ms = long.MinValue;
public bool bネットワークに接続中 { get; private set; } = false;
private long ms = long.MinValue;
private static CDTX[] dtx = new CDTX[ 5 ];
public static TextureLoader Tx = new TextureLoader();

View File

@ -45,6 +45,7 @@ namespace TJAPlayer3
// CLangManager.LangInstance = new CLang_jp();
// break;
//}
CLuaScript.tReloadLanguage(lang);
}
public static int langToInt(string lang)

View File

@ -31,13 +31,30 @@ namespace TJAPlayer3
}
public string str項目名;
public string str説明文;
public string str項目名;
public string strName
{
get
{
return str項目名;
}
}
public string str説明文;
public string strDescription
{
get
{
return str説明文;
}
}
// コンストラクタ
// コンストラクタ
public CItemBase()
public CItemBase()
{
this.str項目名 = "";
this.str説明文 = "";
@ -109,7 +126,13 @@ namespace TJAPlayer3
{
return null;
}
public virtual int GetIndex()
public string tGetValueText()
{
object value = obj現在値();
return value == null ? "" : value.ToString();
}
public virtual int GetIndex()
{
return 0;
}

View File

@ -0,0 +1,268 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Text.Json.Nodes;
using System.Threading.Tasks;
using FDK;
using NLua;
using Silk.NET.OpenGLES;
using SkiaSharp;
using TJAPlayer3;
using static TJAPlayer3.CActSelect曲リスト;
namespace TJAPlayer3
{
class CLuaScript : IDisposable
{
private static List<CLuaScript> listScripts = new List<CLuaScript>();
public static void tReloadLanguage(string lang)
{
foreach (var item in listScripts)
{
item.ReloadLanguage(lang);
}
}
public string strDir { get; private set; }
public string strTexturesDir { get; private set; }
public string strSounsdDir { get; private set; }
public bool bLoadedAssets { get; private set; }
public bool bDisposed { get; private set; }
public bool bCrashed { get; protected set; }
protected Lua LuaScript { get; private set; }
private LuaFunction lfLoadAssets;
private LuaFunction lfReloadLanguage;
private CLuaInfo luaInfo;
private CLuaFps luaFPS = new CLuaFps();
private List<IDisposable> listDisposables = new List<IDisposable>();
protected bool Avaibale
{
get
{
return bLoadedAssets && !bDisposed && !bCrashed;
}
}
private double getNum(JsonValue x)
{
return (double)x;
}
private string getText(JsonValue x)
{
return (string)x;
}
private List<double> getNumArray(JsonArray x)
{
List<double> array = new List<double>();
foreach (double value in x)
{
array.Add(value);
}
return array;
}
private List<string> getTextArray(JsonArray x)
{
List<string> array = new List<string>();
foreach (string value in x)
{
array.Add(value);
}
return array;
}
protected object[] RunLuaCode(LuaFunction luaFunction, params object[] args)
{
try
{
return luaFunction.Call(args);
}
catch (Exception exception)
{
Crash(exception);
}
return new object[0];
}
private JsonNode LoadConfig(string name)
{
using Stream stream = File.OpenRead($"{strDir}/{name}");
JsonNode jsonNode = JsonNode.Parse(stream);
return jsonNode;
}
private CTexture LoadTexture(string name)
{
CTexture texture = new CTexture($"{strTexturesDir}/{name}", false);
listDisposables.Add(texture);
return texture;
}
private void DebugLog(string message)
{
Trace.TraceInformation("<Lua Log>: " + message);
}
private CSound LoadSound(string name, string soundGroupName)
{
ESoundGroup soundGroup;
switch (soundGroupName)
{
case "soundeffect":
soundGroup = ESoundGroup.SoundEffect;
break;
case "voice":
soundGroup = ESoundGroup.Voice;
break;
case "songpreview":
soundGroup = ESoundGroup.SongPreview;
break;
case "songplayback":
soundGroup = ESoundGroup.SongPlayback;
break;
default:
soundGroup = ESoundGroup.Unknown;
break;
}
CSound sound = TJAPlayer3.SoundManager?.tCreateSound($"{strSounsdDir}/{name}", soundGroup);
listDisposables.Add(sound);
return sound;
}
private CCachedFontRenderer LoadFontRenderer(int size, string fontStyleName)
{
CFontRenderer.FontStyle fontStyle;
switch (fontStyleName)
{
case "regular":
fontStyle = CFontRenderer.FontStyle.Regular;
break;
case "bold":
fontStyle = CFontRenderer.FontStyle.Bold;
break;
case "italic":
fontStyle = CFontRenderer.FontStyle.Italic;
break;
case "underline":
fontStyle = CFontRenderer.FontStyle.Underline;
break;
case "strikeout":
fontStyle = CFontRenderer.FontStyle.Strikeout;
break;
default:
fontStyle = CFontRenderer.FontStyle.Regular;
break;
}
CCachedFontRenderer fontRenderer = HPrivateFastFont.tInstantiateMainFont(size, fontStyle);
listDisposables.Add(fontRenderer);
return fontRenderer;
}
private TitleTextureKey CreateTitleTextureKey(string title, CCachedFontRenderer fontRenderer, int maxSize, Color? color = null, Color? edgeColor = null)
{
return new TitleTextureKey(title, fontRenderer, color ?? Color.White, edgeColor ?? Color.Black, maxSize);
}
private CTexture GetTextTex(CActSelect曲リスト.TitleTextureKey titleTextureKey, bool vertical, bool keepCenter)
{
return TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(titleTextureKey, vertical, keepCenter);
}
public CLuaScript(string dir, string? texturesDir = null, string? soundsDir = null, bool loadAssets = true)
{
strDir = dir;
strTexturesDir = texturesDir ?? $"{dir}/Textures";
strSounsdDir = soundsDir ?? $"{dir}/Sounds";
LuaScript = new Lua();
LuaScript.LoadCLRPackage();
LuaScript.State.Encoding = Encoding.UTF8;
LuaScript.DoFile($"{strDir}/Script.lua");
LuaScript["info"] = luaInfo = new CLuaInfo(strDir);
LuaScript["fps"] = luaFPS;
lfLoadAssets = (LuaFunction)LuaScript["loadAssets"];
lfReloadLanguage = (LuaFunction)LuaScript["reloadLanguage"];
LuaScript["loadConfig"] = LoadConfig;
LuaScript["loadTexture"] = LoadTexture;
LuaScript["loadSound"] = LoadSound;
LuaScript["loadFontRenderer"] = LoadFontRenderer;
LuaScript["createTitleTextureKey"] = CreateTitleTextureKey;
LuaScript["getTextTex"] = GetTextTex;
LuaScript["getNum"] = getNum;
LuaScript["getText"] = getText;
LuaScript["getNumArray"] = getNumArray;
LuaScript["getTextArray"] = getTextArray;
LuaScript["displayDanPlate"] = CActSelect段位リスト.tDisplayDanPlate;
LuaScript["debugLog"] = DebugLog;
if (loadAssets) LoadAssets();
listScripts.Add(this);
}
public void LoadAssets(params object[] args)
{
if (bLoadedAssets) return;
RunLuaCode(lfLoadAssets, args);
bLoadedAssets = true;
bDisposed = false;
}
public void ReloadLanguage(params object[] args)
{
RunLuaCode(lfReloadLanguage, args);
}
public void Dispose()
{
if (bDisposed) return;
foreach (IDisposable disposable in listDisposables)
{
disposable.Dispose();
}
listDisposables.Clear();
LuaScript.Dispose();
bDisposed = true;
bLoadedAssets = false;
listScripts.Remove(this);
}
private void Crash(Exception exception)
{
bCrashed = true;
LogNotification.PopError($"Lua Script Error: {exception.ToString()}");
}
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TJAPlayer3
{
internal class CLuaFps
{
public double deltaTime => TJAPlayer3.FPS.DeltaTime;
public int fps => TJAPlayer3.FPS.NowFPS;
}
}

View File

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TJAPlayer3
{
internal class CLuaInfo
{
public int playerCount => TJAPlayer3.ConfigIni.nPlayerCount;
public string lang => TJAPlayer3.ConfigIni.sLang;
public bool simplemode => TJAPlayer3.ConfigIni.SimpleMode;
public bool p1IsBlue => TJAPlayer3.P1IsBlue();
public bool online => TJAPlayer3.app.bネットワークに接続中;
public string dir { get; init; }
public CLuaInfo(string dir)
{
this.dir = dir;
}
}
}

View File

@ -0,0 +1,72 @@
using FDK;
using NLua;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TJAPlayer3
{
internal class CLuaNamePlateScript : CLuaScript
{
private LuaFunction lfGetCharaOffset;
private LuaFunction lfSetInfos;
private LuaFunction lfDrawDan;
private LuaFunction lfDrawTitlePlate;
private LuaFunction lfUpdate;
private LuaFunction lfDraw;
public CLuaNamePlateScript(string dir, string? texturesDir = null, string? soundsDir = null, bool loadAssets = true) : base(dir, texturesDir, soundsDir, loadAssets)
{
lfGetCharaOffset = (LuaFunction)LuaScript["getCharaOffset"];
lfSetInfos = (LuaFunction)LuaScript["setInfos"];
lfDrawDan = (LuaFunction)LuaScript["drawDan"];
lfDrawTitlePlate = (LuaFunction)LuaScript["drawTitlePlate"];
lfUpdate = (LuaFunction)LuaScript["update"];
lfDraw = (LuaFunction)LuaScript["draw"];
}
public int GetCharaOffset()
{
if (!Avaibale) return 0;
double result = (double)RunLuaCode(lfGetCharaOffset)[0];
return (int)result;
}
public void SetInfos(int player, string name, string title, string dan, SaveFile.Data data)
{
if (!Avaibale) return;
RunLuaCode(lfSetInfos, player, name ?? "", title ?? "", dan ?? "", data);
}
public void DrawDan(int x, int y, int opacity, int danGrade, CTexture titleTex)
{
if (!Avaibale) return;
RunLuaCode(lfDrawDan, x, y, opacity, danGrade, titleTex);
}
public void DrawTitlePlate(int x, int y, int opacity, int type, CTexture titleTex)
{
if (!Avaibale) return;
RunLuaCode(lfDrawTitlePlate, x, y, opacity, type, titleTex);
}
public void Update(params object[] args)
{
if (!Avaibale) return;
RunLuaCode(lfUpdate, args);
}
public void Draw(int x, int y, int opacity, int player, int side)
{
if (!Avaibale) return;
RunLuaCode(lfDraw, x, y, opacity, player, side);
}
}
}

View File

@ -415,13 +415,13 @@ namespace TJAPlayer3
{
tmpTex.color4 = CConversion.ColorToColor4(Color.DarkGray);
TJAPlayer3.Tx.Heya_Side_Menu.color4 = CConversion.ColorToColor4(Color.DarkGray);
TJAPlayer3.Tx.NamePlateBase.color4 = CConversion.ColorToColor4(Color.DarkGray);
//TJAPlayer3.Tx.NamePlateBase.color4 = CConversion.ColorToColor4(Color.DarkGray);
}
else
{
tmpTex.color4 = CConversion.ColorToColor4(Color.White);
TJAPlayer3.Tx.Heya_Side_Menu.color4 = CConversion.ColorToColor4(Color.White);
TJAPlayer3.Tx.NamePlateBase.color4 = CConversion.ColorToColor4(Color.White);
//TJAPlayer3.Tx.NamePlateBase.color4 = CConversion.ColorToColor4(Color.White);
}
int danGrade = 0;
@ -432,6 +432,7 @@ namespace TJAPlayer3
var scroll = DrawSide_Menu(i + (TJAPlayer3.Skin.Heya_Side_Menu_Count / 2));
/*
TJAPlayer3.NamePlate.tNamePlateDisplayNamePlateBase(
scroll.Item1 - TJAPlayer3.Tx.NamePlateBase.szTextureSize.Width / 2,
scroll.Item2 - TJAPlayer3.Tx.NamePlateBase.szTextureSize.Height / 24,
@ -439,7 +440,8 @@ namespace TJAPlayer3
TJAPlayer3.Tx.NamePlateBase.color4 = CConversion.ColorToColor4(Color.White);
tmpTex.t2D拡大率考慮上中央基準描画(scroll.Item1 + TJAPlayer3.Skin.Heya_Side_Menu_Font_Offset[0], scroll.Item2 + TJAPlayer3.Skin.Heya_Side_Menu_Font_Offset[1]);
*/
TJAPlayer3.NamePlate.lcNamePlate.DrawDan(scroll.Item1, scroll.Item2, 255, danGrade, tmpTex);
}
}
@ -481,14 +483,18 @@ namespace TJAPlayer3
else if (pos == 0)
iType = 0;
/*
if (iType >= 0 && iType < TJAPlayer3.Skin.Config_NamePlate_Ptn_Title)
{
TJAPlayer3.Tx.NamePlate_Title[iType][TJAPlayer3.NamePlate.ctAnimatedNamePlateTitle.CurrentValue % TJAPlayer3.Skin.Config_NamePlate_Ptn_Title_Boxes[iType]].t2D拡大率考慮上中央基準描画(
scroll.Item1,
scroll.Item2);
}
}
*/
TJAPlayer3.NamePlate.lcNamePlate.DrawTitlePlate(scroll.Item1, scroll.Item2, 255, iType, tmpTex);
tmpTex.t2D拡大率考慮上中央基準描画(scroll.Item1 + TJAPlayer3.Skin.Heya_Side_Menu_Font_Offset[0], scroll.Item2 + TJAPlayer3.Skin.Heya_Side_Menu_Font_Offset[1]);
//tmpTex.t2D拡大率考慮上中央基準描画(scroll.Item1 + TJAPlayer3.Skin.Heya_Side_Menu_Font_Offset[0], scroll.Item2 + TJAPlayer3.Skin.Heya_Side_Menu_Font_Offset[1]);
}
}

View File

@ -606,9 +606,9 @@ namespace TJAPlayer3
if (iType >= 0 && iType < TJAPlayer3.Skin.Config_NamePlate_Ptn_Title)
{
TJAPlayer3.Tx.NamePlate_Title[iType][TJAPlayer3.NamePlate.ctAnimatedNamePlateTitle.CurrentValue % TJAPlayer3.Skin.Config_NamePlate_Ptn_Title_Boxes[iType]].t2D拡大率考慮上中央基準描画(
x,
y);
//TJAPlayer3.Tx.NamePlate_Title[iType][TJAPlayer3.NamePlate.ctAnimatedNamePlateTitle.CurrentValue % TJAPlayer3.Skin.Config_NamePlate_Ptn_Title_Boxes[iType]].t2D拡大率考慮上中央基準描画(
// x,
// y);
}
tmpTex.t2D拡大率考慮上中央基準描画(x + TJAPlayer3.Skin.Heya_Side_Menu_Font_Offset[0], y + TJAPlayer3.Skin.Heya_Side_Menu_Font_Offset[1]);
@ -653,6 +653,7 @@ namespace TJAPlayer3
danGrade = TJAPlayer3.SaveFileInstances[CurrentPlayer].data.DanTitles[this.ttkDanTitles[index].str文字].clearStatus;
}
/*
TJAPlayer3.NamePlate.tNamePlateDisplayNamePlateBase(
x - TJAPlayer3.Tx.NamePlateBase.szTextureSize.Width / 2,
y - TJAPlayer3.Tx.NamePlateBase.szTextureSize.Height / 24,
@ -660,7 +661,7 @@ namespace TJAPlayer3
TJAPlayer3.Tx.NamePlateBase.color4 = CConversion.ColorToColor4(Color.White);
tmpTex.t2D拡大率考慮上中央基準描画(x + TJAPlayer3.Skin.Heya_Side_Menu_Font_Offset[0], y + TJAPlayer3.Skin.Heya_Side_Menu_Font_Offset[1]);
*/
}
break;
}

View File

@ -1,391 +1,425 @@
using FDK;
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static TJAPlayer3.CActSelect曲リスト;
namespace TJAPlayer3
{
class CNamePlate
{
public void RefleshSkin()
{
for (int player = 0; player < 5; player++)
{
this.pfName[player]?.Dispose();
if (TJAPlayer3.SaveFileInstances[player].data.Title == "" || TJAPlayer3.SaveFileInstances[player].data.Title == null)
this.pfName[player] = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Name_Size_Normal);
else
this.pfName[player] = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Name_Size_WithTitle);
}
this.pfTitle?.Dispose();
this.pfdan?.Dispose();
this.pfTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Title_Size);
this.pfdan = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Dan_Size);
}
public CNamePlate()
{
RefleshSkin();
for (int player = 0; player < 5; player++)
{
if (TJAPlayer3.SaveFileInstances[player].data.DanType < 0) TJAPlayer3.SaveFileInstances[player].data.DanType = 0;
else if (TJAPlayer3.SaveFileInstances[player].data.DanType > 2) TJAPlayer3.SaveFileInstances[player].data.DanType = 2;
if (TJAPlayer3.SaveFileInstances[player].data.TitleType < 0) TJAPlayer3.SaveFileInstances[player].data.TitleType = 0;
tNamePlateRefreshTitles(player);
}
ctNamePlateEffect = new CCounter(0, 120, 16.6f, TJAPlayer3.Timer);
ctAnimatedNamePlateTitle = new CCounter(0, 10000, 60.0f, TJAPlayer3.Timer);
}
public void tNamePlateDisplayNamePlateBase(int x, int y, int item)
{
int namePlateBaseX = TJAPlayer3.Tx.NamePlateBase.szTextureSize.Width;
int namePlateBaseY = TJAPlayer3.Tx.NamePlateBase.szTextureSize.Height / 12;
TJAPlayer3.Tx.NamePlateBase?.t2D描画(x, y, new RectangleF(0, item * namePlateBaseY, namePlateBaseX, namePlateBaseY));
}
public void tNamePlateDisplayNamePlate_Extension(int x, int y, int item)
{
int namePlateBaseX = TJAPlayer3.Tx.NamePlate_Extension.szTextureSize.Width;
int namePlateBaseY = TJAPlayer3.Tx.NamePlate_Extension.szTextureSize.Height / 12;
TJAPlayer3.Tx.NamePlate_Extension?.t2D描画(x, y, new RectangleF(0, item * namePlateBaseY, namePlateBaseX, namePlateBaseY));
}
public void tNamePlateRefreshTitles(int player)
{
int actualPlayer = TJAPlayer3.GetActualPlayer(player);
string[] stages = { "初", "二", "三", "四", "五", "六", "七", "八", "九", "極" };
string name = CLangManager.LangInstance.GetString("AI_NAME");
string title = CLangManager.LangInstance.GetString("AI_TITLE");
string dan = stages[Math.Max(0, TJAPlayer3.ConfigIni.nAILevel - 1)] + "面";
if (!TJAPlayer3.ConfigIni.bAIBattleMode || actualPlayer == 0)
{
name = TJAPlayer3.SaveFileInstances[player].data.Name;
title = TJAPlayer3.SaveFileInstances[player].data.Title;
dan = TJAPlayer3.SaveFileInstances[player].data.Dan;
}
txTitle[player] = TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(new TitleTextureKey(title, pfTitle, Color.Black, Color.Empty, 1000));
txName[player] = TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(new TitleTextureKey(name, pfName[player], Color.White, Color.Black, 1000));
using FDK;
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static TJAPlayer3.CActSelect曲リスト;
namespace TJAPlayer3
{
class CNamePlate
{
public CLuaNamePlateScript lcNamePlate { get; private set; }
public void RefleshSkin()
{
/*
for (int player = 0; player < 5; player++)
{
this.pfName[player]?.Dispose();
if (TJAPlayer3.SaveFileInstances[player].data.Title == "" || TJAPlayer3.SaveFileInstances[player].data.Title == null)
this.pfName[player] = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Name_Size_Normal);
else
this.pfName[player] = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Name_Size_WithTitle);
}
this.pfTitle?.Dispose();
this.pfdan?.Dispose();
this.pfTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Title_Size);
this.pfdan = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Dan_Size);
*/
lcNamePlate?.Dispose();
lcNamePlate = new CLuaNamePlateScript(CSkin.Path("Modules/NamePlate"));
for (int player = 0; player < 5; player++)
{
tNamePlateRefreshTitles(player);
}
}
public CNamePlate()
{
for (int player = 0; player < 5; player++)
{
if (TJAPlayer3.SaveFileInstances[player].data.DanType < 0) TJAPlayer3.SaveFileInstances[player].data.DanType = 0;
else if (TJAPlayer3.SaveFileInstances[player].data.DanType > 2) TJAPlayer3.SaveFileInstances[player].data.DanType = 2;
if (TJAPlayer3.SaveFileInstances[player].data.TitleType < 0) TJAPlayer3.SaveFileInstances[player].data.TitleType = 0;
}
RefleshSkin();
//ctNamePlateEffect = new CCounter(0, 120, 16.6f, TJAPlayer3.Timer);
//ctAnimatedNamePlateTitle = new CCounter(0, 10000, 60.0f, TJAPlayer3.Timer);
}
/*
public void tNamePlateDisplayNamePlateBase(int x, int y, int item)
{
int namePlateBaseX = TJAPlayer3.Tx.NamePlateBase.szTextureSize.Width;
int namePlateBaseY = TJAPlayer3.Tx.NamePlateBase.szTextureSize.Height / 12;
TJAPlayer3.Tx.NamePlateBase?.t2D描画(x, y, new RectangleF(0, item * namePlateBaseY, namePlateBaseX, namePlateBaseY));
}
public void tNamePlateDisplayNamePlate_Extension(int x, int y, int item)
{
int namePlateBaseX = TJAPlayer3.Tx.NamePlate_Extension.szTextureSize.Width;
int namePlateBaseY = TJAPlayer3.Tx.NamePlate_Extension.szTextureSize.Height / 12;
TJAPlayer3.Tx.NamePlate_Extension?.t2D描画(x, y, new RectangleF(0, item * namePlateBaseY, namePlateBaseX, namePlateBaseY));
}
*/
public void tNamePlateRefreshTitles(int player)
{
int actualPlayer = TJAPlayer3.GetActualPlayer(player);
string[] stages = { "初", "二", "三", "四", "五", "六", "七", "八", "九", "極" };
string name;
string title;
string dan;
bool isAI = TJAPlayer3.ConfigIni.bAIBattleMode && player == 1;
if (isAI)
{
name = CLangManager.LangInstance.GetString("AI_NAME");
title = CLangManager.LangInstance.GetString("AI_TITLE");
dan = stages[Math.Max(0, TJAPlayer3.ConfigIni.nAILevel - 1)] + "面";
}
else
{
name = TJAPlayer3.SaveFileInstances[player].data.Name;
title = TJAPlayer3.SaveFileInstances[player].data.Title;
dan = TJAPlayer3.SaveFileInstances[player].data.Dan;
}
bIsPrevAI[player] = isAI;
/*
txTitle[player] = TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(new TitleTextureKey(title, pfTitle, Color.Black, Color.Empty, 1000));
txName[player] = TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(new TitleTextureKey(name, pfName[player], Color.White, Color.Black, 1000));
if (TJAPlayer3.SaveFileInstances[player].data.DanGold) txdan[player] = TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(new TitleTextureKey($"<g.#FFE34A.#EA9622>{dan}</g>", pfdan, Color.White, Color.Black, 1000));
else txdan[player] = TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(new TitleTextureKey(dan, pfdan, Color.White, Color.Black, 1000));
}
public void tNamePlateDraw(int x, int y, int player, bool bTitle = false, int Opacity = 255)
else txdan[player] = TJAPlayer3.stageSongSelect.actSongList.ResolveTitleTexture(new TitleTextureKey(dan, pfdan, Color.White, Color.Black, 1000));
*/
if (TJAPlayer3.SaveFileInstances[player].data.DanGold)
lcNamePlate.SetInfos(player, name, title, $"<g.#FFE34A.#EA9622>{dan}</g>", TJAPlayer3.SaveFileInstances[player].data);
else
lcNamePlate.SetInfos(player, name, title, dan, TJAPlayer3.SaveFileInstances[player].data);
}
public void tNamePlateDraw(int x, int y, int player, bool bTitle = false, int Opacity = 255)
{
float resolutionScaleX = TJAPlayer3.Skin.Resolution[0] / 1280.0f;
float resolutionScaleY = TJAPlayer3.Skin.Resolution[1] / 720.0f;
int basePlayer = player;
player = TJAPlayer3.GetActualPlayer(player);
tNamePlateRefreshTitles(player);
ctNamePlateEffect.TickLoop();
ctAnimatedNamePlateTitle.TickLoop();
this.txName[player].Opacity = Opacity;
this.txTitle[player].Opacity = Opacity;
this.txdan[player].Opacity = Opacity;
TJAPlayer3.Tx.NamePlateBase.Opacity = Opacity;
for (int i = 0; i < 5; i++)
TJAPlayer3.Tx.NamePlate_Effect[i].Opacity = Opacity;
// White background
tNamePlateDisplayNamePlateBase(x, y, 3);
// Upper (title) plate
if (TJAPlayer3.SaveFileInstances[player].data.Title != "" && TJAPlayer3.SaveFileInstances[player].data.Title != null)
{
int tt = TJAPlayer3.SaveFileInstances[player].data.TitleType;
if (tt >= 0 && tt < TJAPlayer3.Skin.Config_NamePlate_Ptn_Title)
{
var _tex = TJAPlayer3.Tx.NamePlate_Title[tt][ctAnimatedNamePlateTitle.CurrentValue % TJAPlayer3.Skin.Config_NamePlate_Ptn_Title_Boxes[tt]];
if (_tex != null)
{
_tex.Opacity = Opacity;
_tex.t2D描画(x - (2 * resolutionScaleX), y - (2 * resolutionScaleY));
}
}
}
// Dan plate
if (TJAPlayer3.SaveFileInstances[player].data.Dan != "" && TJAPlayer3.SaveFileInstances[player].data.Dan != null)
{
tNamePlateDisplayNamePlateBase(x, y, 7);
tNamePlateDisplayNamePlateBase(x, y, (8 + TJAPlayer3.SaveFileInstances[player].data.DanType));
}
// Glow
tNamePlateDraw(player, x, y, Opacity);
// Player number
if (TJAPlayer3.PlayerSide == 0 || TJAPlayer3.ConfigIni.nPlayerCount > 1)
{
if (basePlayer < 2)
{
tNamePlateDisplayNamePlateBase(x, y, basePlayer == 1 ? 2 : 0);
}
else
{
tNamePlateDisplayNamePlate_Extension(x, y, basePlayer - 2);
}
}
else
tNamePlateDisplayNamePlateBase(x, y, 1);
// Name text squash (to add to skin config)
if (TJAPlayer3.SaveFileInstances[player].data.Dan != "" && TJAPlayer3.SaveFileInstances[player].data.Dan != null)
{
if (txName[player].szTextureSize.Width > TJAPlayer3.Skin.NamePlate_Name_Width_Full)
txName[player].vcScaleRatio.X = (float)TJAPlayer3.Skin.NamePlate_Name_Width_Full / txName[player].szTextureSize.Width;
}
else
{
if (txName[player].szTextureSize.Width > TJAPlayer3.Skin.NamePlate_Name_Width_Normal)
txName[player].vcScaleRatio.X = (float)TJAPlayer3.Skin.NamePlate_Name_Width_Normal / txName[player].szTextureSize.Width;
}
// Dan text squash (to add to skin config)
if (txdan[player].szTextureSize.Width > TJAPlayer3.Skin.NamePlate_Dan_Width)
txdan[player].vcScaleRatio.X = (float)TJAPlayer3.Skin.NamePlate_Dan_Width / txdan[player].szTextureSize.Width;
// Dan text
if (TJAPlayer3.SaveFileInstances[player].data.Dan != "" && TJAPlayer3.SaveFileInstances[player].data.Dan != null)
{
this.txdan[player].t2D拡大率考慮中央基準描画(x + TJAPlayer3.Skin.NamePlate_Dan_Offset[0], y + TJAPlayer3.Skin.NamePlate_Dan_Offset[1]);
}
// Title text
if (TJAPlayer3.SaveFileInstances[player].data.Title != "" && TJAPlayer3.SaveFileInstances[player].data.Title != null)
{
if (txTitle[player].szTextureSize.Width > TJAPlayer3.Skin.NamePlate_Title_Width)
{
txTitle[player].vcScaleRatio.X = (float)TJAPlayer3.Skin.NamePlate_Title_Width / txTitle[player].szTextureSize.Width;
txTitle[player].vcScaleRatio.Y = (float)TJAPlayer3.Skin.NamePlate_Title_Width / txTitle[player].szTextureSize.Width;
}
txTitle[player].t2D拡大率考慮中央基準描画(x + TJAPlayer3.Skin.NamePlate_Title_Offset[0], y + TJAPlayer3.Skin.NamePlate_Title_Offset[1]);
// Name text
if (TJAPlayer3.SaveFileInstances[player].data.Dan == "" || TJAPlayer3.SaveFileInstances[player].data.Dan == null)
this.txName[player].t2D拡大率考慮中央基準描画(x + TJAPlayer3.Skin.NamePlate_Name_Offset_WithTitle[0], y + TJAPlayer3.Skin.NamePlate_Name_Offset_WithTitle[1]);
else
this.txName[player].t2D拡大率考慮中央基準描画(x + TJAPlayer3.Skin.NamePlate_Name_Offset_Full[0], y + TJAPlayer3.Skin.NamePlate_Name_Offset_Full[1]);
}
else
this.txName[player].t2D拡大率考慮中央基準描画(x + TJAPlayer3.Skin.NamePlate_Name_Offset_Normal[0], y + TJAPlayer3.Skin.NamePlate_Name_Offset_Normal[1]);
// Overlap frame
tNamePlateDisplayNamePlateBase(x, y, 4);
}
private void tNamePlateDraw(int player, int x, int y, int Opacity = 255)
{
if (Opacity == 0)
float resolutionScaleY = TJAPlayer3.Skin.Resolution[1] / 720.0f;
int basePlayer = player;
player = TJAPlayer3.GetActualPlayer(player);
//tNamePlateRefreshTitles(player);
/*
ctNamePlateEffect.TickLoop();
ctAnimatedNamePlateTitle.TickLoop();
this.txName[player].Opacity = Opacity;
this.txTitle[player].Opacity = Opacity;
this.txdan[player].Opacity = Opacity;
*/
bool isAI = TJAPlayer3.ConfigIni.bAIBattleMode && basePlayer == 1;
if (bIsPrevAI[basePlayer] != isAI)
{
tNamePlateRefreshTitles(player);
}
bIsPrevAI[basePlayer] = isAI;
lcNamePlate.Draw(x, y, Opacity, basePlayer, player);
/*
TJAPlayer3.Tx.NamePlateBase.Opacity = Opacity;
for (int i = 0; i < 5; i++)
TJAPlayer3.Tx.NamePlate_Effect[i].Opacity = Opacity;
// White background
tNamePlateDisplayNamePlateBase(x, y, 3);
// Upper (title) plate
if (TJAPlayer3.SaveFileInstances[player].data.Title != "" && TJAPlayer3.SaveFileInstances[player].data.Title != null)
{
int tt = TJAPlayer3.SaveFileInstances[player].data.TitleType;
if (tt >= 0 && tt < TJAPlayer3.Skin.Config_NamePlate_Ptn_Title)
{
var _tex = TJAPlayer3.Tx.NamePlate_Title[tt][ctAnimatedNamePlateTitle.CurrentValue % TJAPlayer3.Skin.Config_NamePlate_Ptn_Title_Boxes[tt]];
if (_tex != null)
{
_tex.Opacity = Opacity;
_tex.t2D描画(x - (2 * resolutionScaleX), y - (2 * resolutionScaleY));
}
}
}
// Dan plate
if (TJAPlayer3.SaveFileInstances[player].data.Dan != "" && TJAPlayer3.SaveFileInstances[player].data.Dan != null)
{
tNamePlateDisplayNamePlateBase(x, y, 7);
tNamePlateDisplayNamePlateBase(x, y, (8 + TJAPlayer3.SaveFileInstances[player].data.DanType));
}
// Glow
tNamePlateDraw(player, x, y, Opacity);
// Player number
if (TJAPlayer3.PlayerSide == 0 || TJAPlayer3.ConfigIni.nPlayerCount > 1)
{
if (basePlayer < 2)
{
tNamePlateDisplayNamePlateBase(x, y, basePlayer == 1 ? 2 : 0);
}
else
{
tNamePlateDisplayNamePlate_Extension(x, y, basePlayer - 2);
}
}
else
tNamePlateDisplayNamePlateBase(x, y, 1);
// Name text squash (to add to skin config)
if (TJAPlayer3.SaveFileInstances[player].data.Dan != "" && TJAPlayer3.SaveFileInstances[player].data.Dan != null)
{
if (txName[player].szTextureSize.Width > TJAPlayer3.Skin.NamePlate_Name_Width_Full)
txName[player].vcScaleRatio.X = (float)TJAPlayer3.Skin.NamePlate_Name_Width_Full / txName[player].szTextureSize.Width;
}
else
{
if (txName[player].szTextureSize.Width > TJAPlayer3.Skin.NamePlate_Name_Width_Normal)
txName[player].vcScaleRatio.X = (float)TJAPlayer3.Skin.NamePlate_Name_Width_Normal / txName[player].szTextureSize.Width;
}
// Dan text squash (to add to skin config)
if (txdan[player].szTextureSize.Width > TJAPlayer3.Skin.NamePlate_Dan_Width)
txdan[player].vcScaleRatio.X = (float)TJAPlayer3.Skin.NamePlate_Dan_Width / txdan[player].szTextureSize.Width;
// Dan text
if (TJAPlayer3.SaveFileInstances[player].data.Dan != "" && TJAPlayer3.SaveFileInstances[player].data.Dan != null)
{
this.txdan[player].t2D拡大率考慮中央基準描画(x + TJAPlayer3.Skin.NamePlate_Dan_Offset[0], y + TJAPlayer3.Skin.NamePlate_Dan_Offset[1]);
}
// Title text
if (TJAPlayer3.SaveFileInstances[player].data.Title != "" && TJAPlayer3.SaveFileInstances[player].data.Title != null)
{
if (txTitle[player].szTextureSize.Width > TJAPlayer3.Skin.NamePlate_Title_Width)
{
txTitle[player].vcScaleRatio.X = (float)TJAPlayer3.Skin.NamePlate_Title_Width / txTitle[player].szTextureSize.Width;
txTitle[player].vcScaleRatio.Y = (float)TJAPlayer3.Skin.NamePlate_Title_Width / txTitle[player].szTextureSize.Width;
}
txTitle[player].t2D拡大率考慮中央基準描画(x + TJAPlayer3.Skin.NamePlate_Title_Offset[0], y + TJAPlayer3.Skin.NamePlate_Title_Offset[1]);
// Name text
if (TJAPlayer3.SaveFileInstances[player].data.Dan == "" || TJAPlayer3.SaveFileInstances[player].data.Dan == null)
this.txName[player].t2D拡大率考慮中央基準描画(x + TJAPlayer3.Skin.NamePlate_Name_Offset_WithTitle[0], y + TJAPlayer3.Skin.NamePlate_Name_Offset_WithTitle[1]);
else
this.txName[player].t2D拡大率考慮中央基準描画(x + TJAPlayer3.Skin.NamePlate_Name_Offset_Full[0], y + TJAPlayer3.Skin.NamePlate_Name_Offset_Full[1]);
}
else
this.txName[player].t2D拡大率考慮中央基準描画(x + TJAPlayer3.Skin.NamePlate_Name_Offset_Normal[0], y + TJAPlayer3.Skin.NamePlate_Name_Offset_Normal[1]);
// Overlap frame
tNamePlateDisplayNamePlateBase(x, y, 4);
*/
}
/*
private void tNamePlateDraw(int player, int x, int y, int Opacity = 255)
{
if (Opacity == 0)
return;
float resolutionScaleX = TJAPlayer3.Skin.Resolution[0] / 1280.0f;
float resolutionScaleY = TJAPlayer3.Skin.Resolution[1] / 720.0f;
if (TJAPlayer3.SaveFileInstances[player].data.TitleType != 0 && !TJAPlayer3.ConfigIni.SimpleMode)
{
int Type = TJAPlayer3.SaveFileInstances[player].data.TitleType - 1;
if (this.ctNamePlateEffect.CurrentValue <= 10)
{
tNamePlateStarDraw(player, 1.0f - (ctNamePlateEffect.CurrentValue / 10f * 1.0f), x + (63 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 3 && this.ctNamePlateEffect.CurrentValue <= 10)
{
tNamePlateStarDraw(player, 1.0f - ((ctNamePlateEffect.CurrentValue - 3) / 7f * 1.0f), x + (38 * resolutionScaleX), y + (7 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 6 && this.ctNamePlateEffect.CurrentValue <= 10)
{
tNamePlateStarDraw(player, 1.0f - ((ctNamePlateEffect.CurrentValue - 6) / 4f * 1.0f), x + (51 * resolutionScaleX), y + (5 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 8 && this.ctNamePlateEffect.CurrentValue <= 10)
{
tNamePlateStarDraw(player, 0.3f - ((ctNamePlateEffect.CurrentValue - 8) / 2f * 0.3f), x + (110 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 11 && this.ctNamePlateEffect.CurrentValue <= 13)
{
tNamePlateStarDraw(player, 1.0f - ((ctNamePlateEffect.CurrentValue - 11) / 2f * 1.0f), x + (38 * resolutionScaleX), y + (7 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 11 && this.ctNamePlateEffect.CurrentValue <= 15)
{
tNamePlateStarDraw(player, 1.0f, x + (51 * resolutionScaleX), y + 5);
}
if (this.ctNamePlateEffect.CurrentValue >= 11 && this.ctNamePlateEffect.CurrentValue <= 17)
{
tNamePlateStarDraw(player, 1.0f - ((ctNamePlateEffect.CurrentValue - 11) / 7f * 1.0f), x + (110 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 16 && this.ctNamePlateEffect.CurrentValue <= 20)
{
tNamePlateStarDraw(player, 0.2f - ((ctNamePlateEffect.CurrentValue - 16) / 4f * 0.2f), x + (63 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 17 && this.ctNamePlateEffect.CurrentValue <= 20)
{
tNamePlateStarDraw(player, 1.0f - ((ctNamePlateEffect.CurrentValue - 17) / 3f * 1.0f), x + (99 * resolutionScaleX), y + (1 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 20 && this.ctNamePlateEffect.CurrentValue <= 24)
{
tNamePlateStarDraw(player, 0.4f, x + (63 * resolutionScaleX), y + 25);
}
if (this.ctNamePlateEffect.CurrentValue >= 20 && this.ctNamePlateEffect.CurrentValue <= 25)
{
tNamePlateStarDraw(player, 1.0f, x + (99 * resolutionScaleX), y + 1);
}
if (this.ctNamePlateEffect.CurrentValue >= 20 && this.ctNamePlateEffect.CurrentValue <= 30)
{
tNamePlateStarDraw(player, 0.5f - ((this.ctNamePlateEffect.CurrentValue - 20) / 10f * 0.5f), x + (152 * resolutionScaleX), y + (7 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 31 && this.ctNamePlateEffect.CurrentValue <= 37)
{
tNamePlateStarDraw(player, 0.5f - ((this.ctNamePlateEffect.CurrentValue - 31) / 6f * 0.5f), x + (176 * resolutionScaleX), y + (8 * resolutionScaleY));
tNamePlateStarDraw(player, 1.0f - ((this.ctNamePlateEffect.CurrentValue - 31) / 6f * 1.0f), x + (175 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 31 && this.ctNamePlateEffect.CurrentValue <= 40)
{
tNamePlateStarDraw(player, 0.9f - ((this.ctNamePlateEffect.CurrentValue - 31) / 9f * 0.9f), x + (136 * resolutionScaleX), y + (24 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 34 && this.ctNamePlateEffect.CurrentValue <= 40)
{
tNamePlateStarDraw(player, 0.7f - ((this.ctNamePlateEffect.CurrentValue - 34) / 6f * 0.7f), x + (159 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 41 && this.ctNamePlateEffect.CurrentValue <= 42)
{
tNamePlateStarDraw(player, 0.7f, x + (159 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 43 && this.ctNamePlateEffect.CurrentValue <= 50)
{
tNamePlateStarDraw(player, 0.8f - ((this.ctNamePlateEffect.CurrentValue - 43) / 7f * 0.8f), x + (196 * resolutionScaleX), y + (23 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 51 && this.ctNamePlateEffect.CurrentValue <= 57)
{
tNamePlateStarDraw(player, 0.8f - ((this.ctNamePlateEffect.CurrentValue - 51) / 6f * 0.8f), x + (51 * resolutionScaleX), y + (5 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 51 && this.ctNamePlateEffect.CurrentValue <= 52)
{
tNamePlateStarDraw(player, 0.2f, x + (166 * resolutionScaleX), y + (22 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 51 && this.ctNamePlateEffect.CurrentValue <= 53)
{
tNamePlateStarDraw(player, 0.8f, x + (136 * resolutionScaleX), y + (24 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 51 && this.ctNamePlateEffect.CurrentValue <= 55)
{
tNamePlateStarDraw(player, 1.0f, x + (176 * resolutionScaleX), y + (8 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 51 && this.ctNamePlateEffect.CurrentValue <= 55)
{
tNamePlateStarDraw(player, 1.0f, x + (176 * resolutionScaleX), y + (8 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 61 && this.ctNamePlateEffect.CurrentValue <= 70)
{
tNamePlateStarDraw(player, 1.0f - ((this.ctNamePlateEffect.CurrentValue - 61) / 9f * 1.0f), x + (196 * resolutionScaleX), y + (23 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 61 && this.ctNamePlateEffect.CurrentValue <= 67)
{
tNamePlateStarDraw(player, 0.7f - ((this.ctNamePlateEffect.CurrentValue - 61) / 6f * 0.7f), x + (214 * resolutionScaleX), y + (14 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 63 && this.ctNamePlateEffect.CurrentValue <= 70)
{
tNamePlateStarDraw(player, 0.5f - ((this.ctNamePlateEffect.CurrentValue - 63) / 7f * 0.5f), x + (129 * resolutionScaleX), y + (24 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 63 && this.ctNamePlateEffect.CurrentValue <= 70)
{
tNamePlateStarDraw(player, 0.5f - ((this.ctNamePlateEffect.CurrentValue - 63) / 7f * 0.5f), x + (129 * resolutionScaleX), y + (24 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 65 && this.ctNamePlateEffect.CurrentValue <= 70)
{
tNamePlateStarDraw(player, 0.8f - ((this.ctNamePlateEffect.CurrentValue - 65) / 5f * 0.8f), x + (117 * resolutionScaleX), y + (7 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 71 && this.ctNamePlateEffect.CurrentValue <= 72)
{
tNamePlateStarDraw(player, 0.8f, x + (151 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 71 && this.ctNamePlateEffect.CurrentValue <= 74)
{
tNamePlateStarDraw(player, 0.8f, x + (117 * resolutionScaleX), y + (7 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 85 && this.ctNamePlateEffect.CurrentValue <= 112)
{
TJAPlayer3.Tx.NamePlate_Effect[4].Opacity = (int)(1400 - (this.ctNamePlateEffect.CurrentValue - 85) * 50f);
TJAPlayer3.Tx.NamePlate_Effect[4].t2D描画(x + ((((this.ctNamePlateEffect.CurrentValue - 85) * (150f / 27f))) * resolutionScaleX), y + (7 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 105 && this.ctNamePlateEffect.CurrentValue <= 120)
{
/*
TJAPlayer3.Tx.NamePlate_Effect[TJAPlayer3.NamePlateConfig.data.TitleType[player] + 1].Opacity = this.ctNamePlateEffect.n現在の値 >= 112 ? (int)(255 - (this.ctNamePlateEffect.n現在の値 - 112) * 31.875f) : 255;
TJAPlayer3.Tx.NamePlate_Effect[TJAPlayer3.NamePlateConfig.data.TitleType[player] + 1].vc拡大縮小倍率.X = this.ctNamePlateEffect.n現在の値 >= 112 ? 1.0f : (this.ctNamePlateEffect.n現在の値 - 105) / 8f;
TJAPlayer3.Tx.NamePlate_Effect[TJAPlayer3.NamePlateConfig.data.TitleType[player] + 1].vc拡大縮小倍率.Y = this.ctNamePlateEffect.n現在の値 >= 112 ? 1.0f : (this.ctNamePlateEffect.n現在の値 - 105) / 8f;
TJAPlayer3.Tx.NamePlate_Effect[TJAPlayer3.NamePlateConfig.data.TitleType[player] + 1].t2D拡大率考慮中央基準描画(x + 193, y + 6);
*/
int tt = TJAPlayer3.SaveFileInstances[player].data.TitleType;
if (tt >= 0 && tt < TJAPlayer3.Skin.Config_NamePlate_Ptn_Title && TJAPlayer3.Tx.NamePlate_Title_Big[tt] != null) {
TJAPlayer3.Tx.NamePlate_Title_Big[tt].Opacity = this.ctNamePlateEffect.CurrentValue >= 112 ? (int)(255 - (this.ctNamePlateEffect.CurrentValue - 112) * 31.875f) : 255;
TJAPlayer3.Tx.NamePlate_Title_Big[tt].vcScaleRatio.X = this.ctNamePlateEffect.CurrentValue >= 112 ? 1.0f : (this.ctNamePlateEffect.CurrentValue - 105) / 8f;
TJAPlayer3.Tx.NamePlate_Title_Big[tt].vcScaleRatio.Y = this.ctNamePlateEffect.CurrentValue >= 112 ? 1.0f : (this.ctNamePlateEffect.CurrentValue - 105) / 8f;
TJAPlayer3.Tx.NamePlate_Title_Big[tt].t2D拡大率考慮中央基準描画(x + (193 * resolutionScaleX), y + (6 * resolutionScaleY));
}
}
}
}
private void tNamePlateStarDraw(int player, float Scale, float x, float y)
float resolutionScaleY = TJAPlayer3.Skin.Resolution[1] / 720.0f;
if (TJAPlayer3.SaveFileInstances[player].data.TitleType != 0 && !TJAPlayer3.ConfigIni.SimpleMode)
{
int Type = TJAPlayer3.SaveFileInstances[player].data.TitleType - 1;
if (this.ctNamePlateEffect.CurrentValue <= 10)
{
tNamePlateStarDraw(player, 1.0f - (ctNamePlateEffect.CurrentValue / 10f * 1.0f), x + (63 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 3 && this.ctNamePlateEffect.CurrentValue <= 10)
{
tNamePlateStarDraw(player, 1.0f - ((ctNamePlateEffect.CurrentValue - 3) / 7f * 1.0f), x + (38 * resolutionScaleX), y + (7 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 6 && this.ctNamePlateEffect.CurrentValue <= 10)
{
tNamePlateStarDraw(player, 1.0f - ((ctNamePlateEffect.CurrentValue - 6) / 4f * 1.0f), x + (51 * resolutionScaleX), y + (5 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 8 && this.ctNamePlateEffect.CurrentValue <= 10)
{
tNamePlateStarDraw(player, 0.3f - ((ctNamePlateEffect.CurrentValue - 8) / 2f * 0.3f), x + (110 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 11 && this.ctNamePlateEffect.CurrentValue <= 13)
{
tNamePlateStarDraw(player, 1.0f - ((ctNamePlateEffect.CurrentValue - 11) / 2f * 1.0f), x + (38 * resolutionScaleX), y + (7 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 11 && this.ctNamePlateEffect.CurrentValue <= 15)
{
tNamePlateStarDraw(player, 1.0f, x + (51 * resolutionScaleX), y + 5);
}
if (this.ctNamePlateEffect.CurrentValue >= 11 && this.ctNamePlateEffect.CurrentValue <= 17)
{
tNamePlateStarDraw(player, 1.0f - ((ctNamePlateEffect.CurrentValue - 11) / 7f * 1.0f), x + (110 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 16 && this.ctNamePlateEffect.CurrentValue <= 20)
{
tNamePlateStarDraw(player, 0.2f - ((ctNamePlateEffect.CurrentValue - 16) / 4f * 0.2f), x + (63 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 17 && this.ctNamePlateEffect.CurrentValue <= 20)
{
tNamePlateStarDraw(player, 1.0f - ((ctNamePlateEffect.CurrentValue - 17) / 3f * 1.0f), x + (99 * resolutionScaleX), y + (1 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 20 && this.ctNamePlateEffect.CurrentValue <= 24)
{
tNamePlateStarDraw(player, 0.4f, x + (63 * resolutionScaleX), y + 25);
}
if (this.ctNamePlateEffect.CurrentValue >= 20 && this.ctNamePlateEffect.CurrentValue <= 25)
{
tNamePlateStarDraw(player, 1.0f, x + (99 * resolutionScaleX), y + 1);
}
if (this.ctNamePlateEffect.CurrentValue >= 20 && this.ctNamePlateEffect.CurrentValue <= 30)
{
tNamePlateStarDraw(player, 0.5f - ((this.ctNamePlateEffect.CurrentValue - 20) / 10f * 0.5f), x + (152 * resolutionScaleX), y + (7 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 31 && this.ctNamePlateEffect.CurrentValue <= 37)
{
tNamePlateStarDraw(player, 0.5f - ((this.ctNamePlateEffect.CurrentValue - 31) / 6f * 0.5f), x + (176 * resolutionScaleX), y + (8 * resolutionScaleY));
tNamePlateStarDraw(player, 1.0f - ((this.ctNamePlateEffect.CurrentValue - 31) / 6f * 1.0f), x + (175 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 31 && this.ctNamePlateEffect.CurrentValue <= 40)
{
tNamePlateStarDraw(player, 0.9f - ((this.ctNamePlateEffect.CurrentValue - 31) / 9f * 0.9f), x + (136 * resolutionScaleX), y + (24 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 34 && this.ctNamePlateEffect.CurrentValue <= 40)
{
tNamePlateStarDraw(player, 0.7f - ((this.ctNamePlateEffect.CurrentValue - 34) / 6f * 0.7f), x + (159 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 41 && this.ctNamePlateEffect.CurrentValue <= 42)
{
tNamePlateStarDraw(player, 0.7f, x + (159 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 43 && this.ctNamePlateEffect.CurrentValue <= 50)
{
tNamePlateStarDraw(player, 0.8f - ((this.ctNamePlateEffect.CurrentValue - 43) / 7f * 0.8f), x + (196 * resolutionScaleX), y + (23 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 51 && this.ctNamePlateEffect.CurrentValue <= 57)
{
tNamePlateStarDraw(player, 0.8f - ((this.ctNamePlateEffect.CurrentValue - 51) / 6f * 0.8f), x + (51 * resolutionScaleX), y + (5 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 51 && this.ctNamePlateEffect.CurrentValue <= 52)
{
tNamePlateStarDraw(player, 0.2f, x + (166 * resolutionScaleX), y + (22 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 51 && this.ctNamePlateEffect.CurrentValue <= 53)
{
tNamePlateStarDraw(player, 0.8f, x + (136 * resolutionScaleX), y + (24 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 51 && this.ctNamePlateEffect.CurrentValue <= 55)
{
tNamePlateStarDraw(player, 1.0f, x + (176 * resolutionScaleX), y + (8 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 51 && this.ctNamePlateEffect.CurrentValue <= 55)
{
tNamePlateStarDraw(player, 1.0f, x + (176 * resolutionScaleX), y + (8 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 61 && this.ctNamePlateEffect.CurrentValue <= 70)
{
tNamePlateStarDraw(player, 1.0f - ((this.ctNamePlateEffect.CurrentValue - 61) / 9f * 1.0f), x + (196 * resolutionScaleX), y + (23 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 61 && this.ctNamePlateEffect.CurrentValue <= 67)
{
tNamePlateStarDraw(player, 0.7f - ((this.ctNamePlateEffect.CurrentValue - 61) / 6f * 0.7f), x + (214 * resolutionScaleX), y + (14 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 63 && this.ctNamePlateEffect.CurrentValue <= 70)
{
tNamePlateStarDraw(player, 0.5f - ((this.ctNamePlateEffect.CurrentValue - 63) / 7f * 0.5f), x + (129 * resolutionScaleX), y + (24 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 63 && this.ctNamePlateEffect.CurrentValue <= 70)
{
tNamePlateStarDraw(player, 0.5f - ((this.ctNamePlateEffect.CurrentValue - 63) / 7f * 0.5f), x + (129 * resolutionScaleX), y + (24 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 65 && this.ctNamePlateEffect.CurrentValue <= 70)
{
tNamePlateStarDraw(player, 0.8f - ((this.ctNamePlateEffect.CurrentValue - 65) / 5f * 0.8f), x + (117 * resolutionScaleX), y + (7 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 71 && this.ctNamePlateEffect.CurrentValue <= 72)
{
tNamePlateStarDraw(player, 0.8f, x + (151 * resolutionScaleX), y + (25 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 71 && this.ctNamePlateEffect.CurrentValue <= 74)
{
tNamePlateStarDraw(player, 0.8f, x + (117 * resolutionScaleX), y + (7 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 85 && this.ctNamePlateEffect.CurrentValue <= 112)
{
TJAPlayer3.Tx.NamePlate_Effect[4].Opacity = (int)(1400 - (this.ctNamePlateEffect.CurrentValue - 85) * 50f);
TJAPlayer3.Tx.NamePlate_Effect[4].t2D描画(x + ((((this.ctNamePlateEffect.CurrentValue - 85) * (150f / 27f))) * resolutionScaleX), y + (7 * resolutionScaleY));
}
if (this.ctNamePlateEffect.CurrentValue >= 105 && this.ctNamePlateEffect.CurrentValue <= 120)
{
int tt = TJAPlayer3.SaveFileInstances[player].data.TitleType;
if (tt >= 0 && tt < TJAPlayer3.Skin.Config_NamePlate_Ptn_Title && TJAPlayer3.Tx.NamePlate_Title_Big[tt] != null) {
TJAPlayer3.Tx.NamePlate_Title_Big[tt].Opacity = this.ctNamePlateEffect.CurrentValue >= 112 ? (int)(255 - (this.ctNamePlateEffect.CurrentValue - 112) * 31.875f) : 255;
TJAPlayer3.Tx.NamePlate_Title_Big[tt].vcScaleRatio.X = this.ctNamePlateEffect.CurrentValue >= 112 ? 1.0f : (this.ctNamePlateEffect.CurrentValue - 105) / 8f;
TJAPlayer3.Tx.NamePlate_Title_Big[tt].vcScaleRatio.Y = this.ctNamePlateEffect.CurrentValue >= 112 ? 1.0f : (this.ctNamePlateEffect.CurrentValue - 105) / 8f;
TJAPlayer3.Tx.NamePlate_Title_Big[tt].t2D拡大率考慮中央基準描画(x + (193 * resolutionScaleX), y + (6 * resolutionScaleY));
}
}
}
}
*/
/*
private void tNamePlateStarDraw(int player, float Scale, float x, float y)
{
/*
TJAPlayer3.Tx.NamePlate_Effect[TJAPlayer3.NamePlateConfig.data.TitleType[player] - 1].vc拡大縮小倍率.X = Scale;
TJAPlayer3.Tx.NamePlate_Effect[TJAPlayer3.NamePlateConfig.data.TitleType[player] - 1].vc拡大縮小倍率.Y = Scale;
TJAPlayer3.Tx.NamePlate_Effect[TJAPlayer3.NamePlateConfig.data.TitleType[player] - 1].t2D拡大率考慮中央基準描画(x, y);
*/
int tt = TJAPlayer3.SaveFileInstances[player].data.TitleType;
if (tt >= 0 && tt < TJAPlayer3.Skin.Config_NamePlate_Ptn_Title && TJAPlayer3.Tx.NamePlate_Title_Small[tt] != null)
{
TJAPlayer3.Tx.NamePlate_Title_Small[tt].vcScaleRatio.X = Scale;
TJAPlayer3.Tx.NamePlate_Title_Small[tt].vcScaleRatio.Y = Scale;
TJAPlayer3.Tx.NamePlate_Title_Small[tt].t2D拡大率考慮中央基準描画(x, y);
}
}
private CCachedFontRenderer[] pfName = new CCachedFontRenderer[5];
private CCachedFontRenderer pfTitle;
private CCachedFontRenderer pfdan;
private CCounter ctNamePlateEffect;
public CCounter ctAnimatedNamePlateTitle;
private CTexture[] txName = new CTexture[5];
private CTexture[] txTitle = new CTexture[5];
private CTexture[] txdan = new CTexture[5];
}
}
int tt = TJAPlayer3.SaveFileInstances[player].data.TitleType;
if (tt >= 0 && tt < TJAPlayer3.Skin.Config_NamePlate_Ptn_Title && TJAPlayer3.Tx.NamePlate_Title_Small[tt] != null)
{
TJAPlayer3.Tx.NamePlate_Title_Small[tt].vcScaleRatio.X = Scale;
TJAPlayer3.Tx.NamePlate_Title_Small[tt].vcScaleRatio.Y = Scale;
TJAPlayer3.Tx.NamePlate_Title_Small[tt].t2D拡大率考慮中央基準描画(x, y);
}
}
*/
/*
private CCachedFontRenderer[] pfName = new CCachedFontRenderer[5];
private CCachedFontRenderer pfTitle;
private CCachedFontRenderer pfdan;
private CCounter ctNamePlateEffect;
public CCounter ctAnimatedNamePlateTitle;
private CTexture[] txName = new CTexture[5];
private CTexture[] txTitle = new CTexture[5];
private CTexture[] txdan = new CTexture[5];
*/
private bool[] bIsPrevAI = new bool[5];
}
}