1
0
mirror of synced 2024-11-27 17:00:50 +01:00

Squashed commit of the following:

commit 6ca0743f50
Author: 0auBSQ <58159635+0auBSQ@users.noreply.github.com>
Date:   Fri Jul 26 21:39:38 2024 +0900

    cleanup

commit 756a9370b0
Author: 0auBSQ <58159635+0auBSQ@users.noreply.github.com>
Date:   Fri Jul 26 21:33:24 2024 +0900

    apply cleanup

commit 75d3fd0da8
Author: 0auBSQ <58159635+0auBSQ@users.noreply.github.com>
Date:   Fri Jul 26 19:53:27 2024 +0900

    Update Taiko hitsounds to Dashy's 2P hitsounds, old Taiko hitsounds are renamed to "Old Taiko"

commit ba18fb6832
Author: 0auBSQ <58159635+0auBSQ@users.noreply.github.com>
Date:   Fri Jul 26 19:52:19 2024 +0900

    oopsie

commit 4806f53c49
Author: 0auBSQ <58159635+0auBSQ@users.noreply.github.com>
Date:   Fri Jul 26 17:27:21 2024 +0900

    fix memory leak

commit 5ae90c94f3
Author: 0auBSQ <58159635+0auBSQ@users.noreply.github.com>
Date:   Fri Jul 26 17:06:36 2024 +0900

    fix nameplate unlockables and upgrade nlua and system.text.json

commit 57daa487c1
Author: 0auBSQ <58159635+0auBSQ@users.noreply.github.com>
Date:   Fri Jul 26 01:12:54 2024 +0900

    oopsie

commit 88a15defc1
Author: 0auBSQ <58159635+0auBSQ@users.noreply.github.com>
Date:   Fri Jul 26 01:07:31 2024 +0900

    Squashed commit of the following:

    commit c99443a7d3
    Author: Ashiro12138 <ashiro12138@gmail.com>
    Date:   Fri Jul 26 01:29:15 2024 +1000

        Chore/add editor config (#656)

        * Create .editorconfig

        * format ENTIRE project

        * Remove unnecessary import or usings

        Sort Imports or usings
        Apply file header preferences

        * Fix build error by adding import

commit c47c9c9400
Author: 0auBSQ <58159635+0auBSQ@users.noreply.github.com>
Date:   Thu Jul 25 02:11:10 2024 +0900

    Update Script.lua

commit eee9350d2f
Author: 0auBSQ <58159635+0auBSQ@users.noreply.github.com>
Date:   Thu Jul 25 02:05:16 2024 +0900

    badges

commit a26c76aa60
Author: 0auBSQ <58159635+0auBSQ@users.noreply.github.com>
Date:   Thu Jul 25 01:44:49 2024 +0900

    stars

commit c571070428
Author: 0auBSQ <58159635+0auBSQ@users.noreply.github.com>
Date:   Wed Jul 24 23:57:02 2024 +0900

    improve nameplate lua script

commit f6a08d3a50
Author: 0auBSQ <58159635+0auBSQ@users.noreply.github.com>
Date:   Wed Jul 24 23:40:52 2024 +0900

    base
This commit is contained in:
0auBSQ 2024-07-26 21:48:06 +09:00
parent 0a60d3f57e
commit e8ab079e4d
97 changed files with 1276 additions and 444 deletions

View File

@ -35,7 +35,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;

View File

@ -250,6 +250,10 @@ namespace FDK {
get;
set;
}
public float fZRotation {
get => fZ軸中心回転;
set { fZ軸中心回転 = value; }
}
public int Opacity {
get {
return this._opacity;
@ -447,6 +451,12 @@ namespace FDK {
throw new CTextureCreateFailedException(string.Format("テクスチャの生成に失敗しました。\n"));
}
}
public void tSetScale(float x, float y) {
vcScaleRatio.X = x;
vcScaleRatio.Y = y;
}
// メソッド
// 2016.11.10 kairera0467 拡張
@ -589,6 +599,15 @@ namespace FDK {
}
}
public void t2D_DisplayImage_AnchorCenter(int x, int y) {
this.t2D描画(x - (this.rc全画像.Width / 2 * this.vcScaleRatio.X), y - (this.rc全画像.Height / 2 * this.vcScaleRatio.Y), 1f, this.rc全画像);
}
public void t2D_DisplayImage_AnchorCenter(int x, int y, Rectangle rc) {
this.t2D描画(x - (rc.Width / 2 * this.vcScaleRatio.X), y - (rc.Height / 2 * this.vcScaleRatio.Y), 1f, rc);
}
public void t2D_DisplayImage_AnchorCenter(int x, int y, RectangleF rc) {
this.t2D描画(x - (rc.Width / 2 * this.vcScaleRatio.X), y - (rc.Height / 2 * this.vcScaleRatio.Y), 1f, rc);
}
public enum RefPnt {
UpLeft,
@ -602,6 +621,16 @@ namespace FDK {
DownRight,
}
public void t2D_DisplayImage(int x, int y) {
this.t2D描画(x, y, 1f, this.rc全画像);
}
public void t2D_DisplayImage(int x, int y, Rectangle rc画像内の描画領域) {
this.t2D描画(x, y, 1f, rc画像内の描画領域);
}
public void t2D_DisplayImage(int x, int y, RectangleF rc) {
this.t2D描画(x, y, 1f, rc);
}
/// <summary>
/// テクスチャを 2D 画像と見なして描画する。
/// </summary>

View File

@ -2,6 +2,11 @@
{
"name": "Taiko",
"path": "Taiko\\",
"format": "WAV",
},
{
"name": "Old Taiko",
"path": "Old Taiko\\",
"format": "OGG",
},
{

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -7,9 +7,10 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.20" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="SevenZip" Version="19.0.0" />
<PackageReference Include="NLua" Version="1.6.3" />
<PackageReference Include="NLua" Version="1.7.3" />
<PackageReference Include="System.Resources.Extensions" Version="7.0.0" />
<PackageReference Include="DiscordRichPresence" Version="1.143.0" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
</ItemGroup>
<ItemGroup>
<Content Include="Databases/**" CopyToOutputDirectory="PreserveNewest" />

Binary file not shown.

View File

@ -1,6 +1,6 @@
// PeepoDrumKit 2023/10/28
TITLE:CIRCUNFERENCIA
SUBTITLE:--UKLO
SUBTITLE:--ULKO
BPM:216
WAVE:CIRCUNFERENCIA.ogg
OFFSET:0

View File

@ -0,0 +1,87 @@
{
"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"
}
},
"stars": {
"1":{
"framecount":0
},
"2":{
"framecount":0
},
"3":{
"framecount":0
}
}
}

View File

@ -0,0 +1,525 @@
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 title_stars_folders = { "1", "2", "3" }
local title_stars = { { } }
local title_badge_of_achievement = nil
local nameplates_achievement = {134,135,136,78,66,71,44,14,17}
local title_badge_of_team_member = nil
local nameplates_team_member = {}
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 tableContains(testTable, value)
for i = 1,#testTable do
if (testTable[i] == value) then
return true
end
end
return false
end
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 implDrawRarityStars(o_x, o_y, opacity, rarity)
local x = o_x
local y = o_y - 20
local star_count = 0
--Rare
if rarity == 3 then
star_count = 1
--Epic
elseif rarity == 4 then
star_count = 2
--Legendary / Mythical
elseif rarity >= 5 then
star_count = 3
end
if star_count > 0 then
local star_frame = 1 + math.ceil(titleplate_counter * (#title_stars[star_count] - 1))
tx_titlestar = title_stars[star_count][star_frame]
tx_titlestar.Opacity = opacity
tx_titlestar:t2D_DisplayImage(x + config_title_plate_offset_x, y + config_title_plate_offset_y)
end
end
function implDrawBadges(x, y, opacity, nameplateId)
if tableContains(nameplates_achievement, nameplateId) then
title_badge_of_achievement.Opacity = opacity
title_badge_of_achievement:t2D_DisplayImage(x + config_title_plate_offset_x, y + config_title_plate_offset_y)
elseif tableContains(nameplates_team_member, nameplateId) then
title_badge_of_team_member.Opacity = opacity
title_badge_of_team_member:t2D_DisplayImage(x + config_title_plate_offset_x, y + config_title_plate_offset_y)
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 implDrawPlayerRing(x, y, opacity, player_lua, side_lua)
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
end
function reloadLanguage(lang)
end
function getCharaOffset()
return base.szTextureSize.Width / 2
end
function setInfos(player, name, title, dan, data)
local 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")
title_badge_of_achievement = loadTexture("Badges/0.png")
title_badge_of_team_member = loadTexture("Badges/1.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")
--Load title plates
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
--Load rarity stars
for i = 1, #title_stars_folders do
stardir = "Stars/"..title_stars_folders[i]
title_stars_config = config["stars"][title_stars_folders[i]]
config_stars_framecount = 0
if title_stars_config ~= nil then
config_stars_framecount = getNum(title_stars_config["framecount"])
end
local stars = { }
for j = 0, config_stars_framecount do
stars[j + 1] = loadTexture(stardir.."/"..j..".png")
end
title_stars[i] = stars
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(o_x, o_y, opacity, type, titleTex)
--Shift on side bar
local x = o_x - 180
local y = o_y + 5
--White background
base.Opacity = opacity
base:t2D_DisplayImage(x, y)
--Dan base
dan_base.Opacity = opacity
dan_base:t2D_DisplayImage(x, y)
dan_gradation[type + 1].Opacity = opacity
dan_gradation[type + 1]:t2D_DisplayImage(x, y)
--Player number
implDrawPlayerRing(x, y, opacity, 1, 1)
--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(o_x, o_y, opacity, titletype, titleTex, rarityInt, nameplateId)
--Shift on side bar
local x = o_x - 180
local y = o_y + 5
--White background
base.Opacity = opacity
base:t2D_DisplayImage(x, y)
--Upper (title) plate
implDrawTitlePlate(x, y, opacity, titletype + 1)
--Rarity stars
implDrawRarityStars(x, y, opacity, rarityInt)
--Badges
implDrawBadges(x, y, opacity, nameplateId)
--Glow
implDrawTitleEffect(x, y, titletype + 1)
--Player number
implDrawPlayerRing(x, y, opacity, 1, 1)
--Title/Name text
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)
local player_lua = player + 1
local side_lua = side + 1
local rarityInt = player_data[player_lua].TitleRarityInt
local nameplateId = player_data[player_lua].TitleId
--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
--Rarity stars
implDrawRarityStars(x, y, opacity, rarityInt)
--Badges
implDrawBadges(x, y, opacity, nameplateId)
--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
implDrawPlayerRing(x, y, opacity, player_lua, side_lua)
--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: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 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

@ -1,6 +1,5 @@
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;

View File

@ -193,9 +193,16 @@ namespace TJAPlayer3 {
[JsonProperty("titleType")]
public int TitleType = 0;
[JsonIgnore]
public int TitleRarityInt = 1;
[JsonIgnore]
public int TitleId = -1;
[JsonProperty("puchiChara")]
public string PuchiChara = "0";
[JsonProperty("medals")]
public Int64 Medals = 0;

View File

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

View File

@ -157,6 +157,8 @@ namespace TJAPlayer3 {
sf.data.TotalPlaycount = (int)(Int64)reader["TotalPlaycount"];
sf.data.AIBattleModePlaycount = (int)(Int64)reader["AIBattleModePlaycount"];
sf.data.AIBattleModeWins = (int)(Int64)reader["AIBattleModeWins"];
sf.data.TitleRarityInt = (int)(Int64)reader["PlayerNameplateRarityInt"];
sf.data.TitleId = (int)(Int64)reader["PlayerNameplateId"];
sf.tInitSaveFile();
sf.tLoadUnlockables();
@ -207,6 +209,8 @@ namespace TJAPlayer3 {
PlayerNameplateType = {SaveData.TitleType},
PlayerPuchichara = '{SaveData.PuchiChara.EscapeSingleQuotes()}',
PlayerCharacter = {SaveData.Character},
PlayerNameplateRarityInt = {SaveData.TitleRarityInt},
PlayerNameplateId = {SaveData.TitleId},
PlayerCharacterName = '{SaveData.CharacterName.EscapeSingleQuotes()}'
WHERE SaveId = {SaveData.SaveId};
;";

View File

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

View File

@ -24,7 +24,20 @@ namespace TJAPlayer3 {
}
public string str項目名;
public string strName {
get {
return str項目名;
}
}
public string str説明文;
public string strDescription {
get {
return str説明文;
}
}
// コンストラクタ
@ -92,6 +105,11 @@ namespace TJAPlayer3 {
public virtual object obj現在値() {
return null;
}
public string tGetValueText() {
object value = obj現在値();
return value == null ? "" : value.ToString();
}
public virtual int GetIndex() {
return 0;
}

View File

@ -0,0 +1,231 @@
using System.Diagnostics;
using System.Drawing;
using System.Text;
using System.Text.Json.Nodes;
using FDK;
using NLua;
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 {
var ret = luaFunction.Call(args);
LuaScript.State.GarbageCollector(KeraLua.LuaGC.Collect, 0);
return ret;
} 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,6 @@
namespace TJAPlayer3 {
internal class CLuaFps {
public double deltaTime => TJAPlayer3.FPS.DeltaTime;
public int fps => TJAPlayer3.FPS.NowFPS;
}
}

View File

@ -0,0 +1,15 @@
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,58 @@
using FDK;
using NLua;
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, int rarity, int nameplateId) {
if (!Avaibale) return;
RunLuaCode(lfDrawTitlePlate, x, y, opacity, type, titleTex, rarity, nameplateId);
}
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

@ -1,4 +1,4 @@
using FDK;
using FDK;
using static TJAPlayer3.CActSelect曲リスト;
using Color = System.Drawing.Color;
using Rectangle = System.Drawing.Rectangle;
@ -365,11 +365,11 @@ namespace TJAPlayer3 {
if (i != 0) {
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;
@ -379,6 +379,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,
@ -386,7 +387,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);
}
}
@ -412,22 +414,31 @@ namespace TJAPlayer3 {
var scroll = DrawSide_Menu(i + (TJAPlayer3.Skin.Heya_Side_Menu_Count / 2));
int iType = -1;
int _rarity = 1;
int _titleid = -1;
if (TJAPlayer3.SaveFileInstances[iPlayer].data.UnlockedNameplateIds != null &&
TJAPlayer3.SaveFileInstances[iPlayer].data.UnlockedNameplateIds.Contains(this.titlesKeys[pos])) {
var _dc = TJAPlayer3.Databases.DBNameplateUnlockables.data[this.titlesKeys[pos]];
iType = _dc.nameplateInfo.iType;
_rarity = HRarity.tRarityToLangInt(_dc.rarity);
_titleid = this.titlesKeys[pos];
//iType = TJAPlayer3.SaveFileInstances[iPlayer].data.NamePlateTitles[this.titlesKeys[pos]].iType;
} else if (pos == 0)
iType = 0;
if (iType >= 0 && iType < TJAPlayer3.Skin.Config_NamePlate_Ptn_Title) {
/*
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);
}
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.DrawTitlePlate(scroll.Item1, scroll.Item2, 255, iType, tmpTex, _rarity, _titleid);
//tmpTex.t2D拡大率考慮上中央基準描画(scroll.Item1 + TJAPlayer3.Skin.Heya_Side_Menu_Font_Offset[0], scroll.Item2 + TJAPlayer3.Skin.Heya_Side_Menu_Font_Offset[1]);
}
}
@ -615,10 +626,18 @@ namespace TJAPlayer3 {
&& TJAPlayer3.SaveFileInstances[iPlayer].data.UnlockedNameplateIds.Contains(this.titlesKeys[iTitleCurrent])) {
var _dc = TJAPlayer3.Databases.DBNameplateUnlockables.data[this.titlesKeys[iTitleCurrent]];
TJAPlayer3.SaveFileInstances[iPlayer].data.TitleType = _dc.nameplateInfo.iType;
} else if (iTitleCurrent == 0)
TJAPlayer3.SaveFileInstances[iPlayer].data.TitleId = this.titlesKeys[iTitleCurrent];
TJAPlayer3.SaveFileInstances[iPlayer].data.TitleRarityInt = HRarity.tRarityToLangInt(_dc.rarity);
} else if (iTitleCurrent == 0) {
TJAPlayer3.SaveFileInstances[iPlayer].data.TitleType = 0;
else
TJAPlayer3.SaveFileInstances[iPlayer].data.TitleId = -1;
TJAPlayer3.SaveFileInstances[iPlayer].data.TitleRarityInt = 1;
} else {
TJAPlayer3.SaveFileInstances[iPlayer].data.TitleType = -1;
TJAPlayer3.SaveFileInstances[iPlayer].data.TitleId = -1;
TJAPlayer3.SaveFileInstances[iPlayer].data.TitleRarityInt = 1;
}
TJAPlayer3.NamePlate.tNamePlateRefreshTitles(iPlayer);

View File

@ -514,9 +514,9 @@ namespace TJAPlayer3 {
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拡大率考慮上中央基準描画(
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]);
@ -554,6 +554,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,
@ -561,7 +562,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,11 +1,10 @@
using System.Drawing;
using FDK;
using static TJAPlayer3.CActSelect曲リスト;
namespace TJAPlayer3 {
namespace TJAPlayer3 {
class CNamePlate {
public CLuaNamePlateScript lcNamePlate { get; private set; }
public void RefleshSkin() {
for (int player = 0; player < 5; player++) {
/*
for (int player = 0; player < 5; player++)
{
this.pfName[player]?.Dispose();
if (TJAPlayer3.SaveFileInstances[player].data.Title == "" || TJAPlayer3.SaveFileInstances[player].data.Title == null)
@ -19,25 +18,32 @@ namespace TJAPlayer3 {
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() {
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);
}
RefleshSkin();
//ctNamePlateEffect = new CCounter(0, 120, 16.6f, TJAPlayer3.Timer);
//ctAnimatedNamePlateTitle = new CCounter(0, 10000, 60.0f, TJAPlayer3.Timer);
}
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) {
/*
public void tNamePlateDisplayNamePlateBase(int x, int y, int item)
{
int namePlateBaseX = TJAPlayer3.Tx.NamePlateBase.szTextureSize.Width;
int namePlateBaseY = TJAPlayer3.Tx.NamePlateBase.szTextureSize.Height / 12;
@ -45,33 +51,48 @@ namespace TJAPlayer3 {
}
public void tNamePlateDisplayNamePlate_Extension(int x, int y, int item) {
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)] + "面";
string name;
string title;
string dan;
if (!TJAPlayer3.ConfigIni.bAIBattleMode || actualPlayer == 0) {
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));
*/
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);
}
@ -82,242 +103,15 @@ namespace TJAPlayer3 {
int basePlayer = player;
player = TJAPlayer3.GetActualPlayer(player);
bool isAI = TJAPlayer3.ConfigIni.bAIBattleMode && basePlayer == 1;
if (bIsPrevAI[basePlayer] != isAI) {
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));
}
}
bIsPrevAI[basePlayer] = isAI;
lcNamePlate.Draw(x, y, Opacity, basePlayer, player);
}
// 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) {
/*
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];
private bool[] bIsPrevAI = new bool[5];
}
}