1
0
mirror of synced 2024-11-30 18:24:32 +01:00

いろいろ改善14 (#513)

* 任意のGenreBarに対応

* バグ修正

* アイコンを修正

* クラッシュを修正

* 非同期スクリーンショットに対応

* コミット漏れ

* テクスチャの非同期読み込みに対応
This commit is contained in:
Takkkom 2023-10-27 20:28:58 +09:00 committed by GitHub
parent 56c7a4bb5f
commit a9027d18b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 344 additions and 184 deletions

View File

@ -164,6 +164,8 @@ namespace SampleFramework
} }
} }
public static int MainThreadID { get; private set; }
private GraphicsAPI GetGraphicsAPI() private GraphicsAPI GetGraphicsAPI()
{ {
switch (GraphicsDeviceType_) switch (GraphicsDeviceType_)
@ -182,6 +184,11 @@ namespace SampleFramework
return GraphicsDevice.GetScreenPixels(); return GraphicsDevice.GetScreenPixels();
} }
public void GetScreenShotAsync(Action<SKBitmap> action)
{
GraphicsDevice.GetScreenPixelsASync(action);
}
public static long TimeMs; public static long TimeMs;
public static Matrix4X4<float> Camera; public static Matrix4X4<float> Camera;
@ -206,6 +213,7 @@ namespace SampleFramework
/// </summary> /// </summary>
protected Game() protected Game()
{ {
MainThreadID = Thread.CurrentThread.ManagedThreadId;
Configuration(); Configuration();
WindowOptions options = GraphicsDeviceType_ == GraphicsDeviceType.Vulkan ? WindowOptions.DefaultVulkan : WindowOptions.Default; WindowOptions options = GraphicsDeviceType_ == GraphicsDeviceType.Vulkan ? WindowOptions.DefaultVulkan : WindowOptions.Default;

View File

@ -331,6 +331,10 @@ namespace SampleFramework
return null; return null;
} }
public unsafe void GetScreenPixelsASync(Action<SKBitmap> action)
{
}
public void Dispose() public void Dispose()
{ {

View File

@ -728,6 +728,10 @@ namespace SampleFramework
{ {
return null; return null;
} }
public unsafe void GetScreenPixelsASync(Action<SKBitmap> action)
{
}
public void Dispose() public void Dispose()
{ {

View File

@ -97,6 +97,10 @@ namespace SampleFramework
{ {
return null; return null;
} }
public unsafe void GetScreenPixelsASync(Action<SKBitmap> action)
{
}
public void Dispose() public void Dispose()
{ {

View File

@ -34,5 +34,7 @@ namespace SampleFramework
void DrawPolygon(IPolygon polygon, IShader shader, ITexture texture, BlendType blendType); void DrawPolygon(IPolygon polygon, IShader shader, ITexture texture, BlendType blendType);
unsafe SKBitmap GetScreenPixels(); unsafe SKBitmap GetScreenPixels();
unsafe void GetScreenPixelsASync(Action<SKBitmap> action);
} }
} }

View File

@ -15,6 +15,8 @@ namespace SampleFramework
private int ViewportHeight; private int ViewportHeight;
internal static List<Action> AsyncActions = new();
public OpenGLDevice(IWindow window) public OpenGLDevice(IWindow window)
{ {
Gl = window.CreateOpenGL(); Gl = window.CreateOpenGL();
@ -40,6 +42,11 @@ namespace SampleFramework
public void ClearBuffer() public void ClearBuffer()
{ {
if (AsyncActions.Count > 0)
{
AsyncActions[0]?.Invoke();
AsyncActions.Remove(AsyncActions[0]);
}
Gl.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); Gl.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
} }
@ -140,6 +147,36 @@ namespace SampleFramework
} }
} }
public unsafe void GetScreenPixelsASync(Action<SKBitmap> action)
{
uint[] pixels = new uint[(uint)ViewportWidth * (uint)ViewportHeight];
Gl.ReadBuffer(GLEnum.Front);
fixed(uint* pix = pixels)
{
Gl.ReadPixels(0, 0, (uint)ViewportWidth, (uint)ViewportHeight, GLEnum.Bgra, GLEnum.UnsignedByte, pix);
}
Task.Run(() =>{
fixed(uint* pixels2 = new uint[(uint)ViewportWidth * (uint)ViewportHeight])
{
for(int x = 0; x < ViewportWidth; x++)
{
for(int y = 1; y < ViewportHeight; y++)
{
int pos = x + ((y - 1) * ViewportWidth);
int pos2 = x + ((ViewportHeight - y) * ViewportWidth);
var p = pixels[pos2];
pixels2[pos] = p;
}
}
using SKBitmap sKBitmap = new(ViewportWidth, ViewportHeight - 1);
sKBitmap.SetPixels((IntPtr)pixels2);
action(sKBitmap);
}
});
}
public void Dispose() public void Dispose()
{ {
} }

View File

@ -10,21 +10,37 @@ namespace SampleFramework
public unsafe OpenGLTexture(void* data, int width, int height, RgbaType rgbaType) public unsafe OpenGLTexture(void* data, int width, int height, RgbaType rgbaType)
{ {
TextureHandle = OpenGLDevice.Gl.GenTexture(); void load()
OpenGLDevice.Gl.BindTexture(TextureTarget.Texture2D, TextureHandle);
switch(rgbaType)
{ {
case RgbaType.Rgba: TextureHandle = OpenGLDevice.Gl.GenTexture();
OpenGLDevice.Gl.TexImage2D(GLEnum.Texture2D, 0, (int)InternalFormat.Rgba8, (uint)width, (uint)height, 0, GLEnum.Rgba, GLEnum.UnsignedByte, data); OpenGLDevice.Gl.BindTexture(TextureTarget.Texture2D, TextureHandle);
break;
case RgbaType.Bgra: switch(rgbaType)
OpenGLDevice.Gl.TexImage2D(GLEnum.Texture2D, 0, (int)InternalFormat.Rgba8, (uint)width, (uint)height, 0, GLEnum.Bgra, GLEnum.UnsignedByte, data); {
break; case RgbaType.Rgba:
OpenGLDevice.Gl.TexImage2D(GLEnum.Texture2D, 0, (int)InternalFormat.Rgba8, (uint)width, (uint)height, 0, GLEnum.Rgba, GLEnum.UnsignedByte, data);
break;
case RgbaType.Bgra:
OpenGLDevice.Gl.TexImage2D(GLEnum.Texture2D, 0, (int)InternalFormat.Rgba8, (uint)width, (uint)height, 0, GLEnum.Bgra, GLEnum.UnsignedByte, data);
break;
}
OpenGLDevice.Gl.TexParameterI(GLEnum.Texture2D, GLEnum.TextureMinFilter, (int)TextureMinFilter.Nearest);
OpenGLDevice.Gl.TexParameterI(GLEnum.Texture2D, GLEnum.TextureMagFilter, (int)TextureMagFilter.Nearest);
}
if (Game.MainThreadID != Thread.CurrentThread.ManagedThreadId)
{
OpenGLDevice.AsyncActions.Add(load);
while(OpenGLDevice.AsyncActions.Contains(load))
{
}
}
else
{
load();
} }
OpenGLDevice.Gl.TexParameterI(GLEnum.Texture2D, GLEnum.TextureMinFilter, (int)TextureMinFilter.Nearest);
OpenGLDevice.Gl.TexParameterI(GLEnum.Texture2D, GLEnum.TextureMagFilter, (int)TextureMagFilter.Nearest);
} }
public void Dispose() public void Dispose()

View File

@ -57,6 +57,10 @@ namespace SampleFramework
{ {
return null; return null;
} }
public unsafe void GetScreenPixelsASync(Action<SKBitmap> action)
{
}
public void Dispose() public void Dispose()
{ {

View File

@ -31,5 +31,6 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ApplicationIcon>OpenTaiko.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -8895,10 +8895,7 @@ namespace TJAPlayer3
public Color SongSelect_BackColor_Classic = ColorTranslator.FromHtml("#875600"); public Color SongSelect_BackColor_Classic = ColorTranslator.FromHtml("#875600");
public Color SongSelect_BackColor_GameMusic = ColorTranslator.FromHtml("#412080"); public Color SongSelect_BackColor_GameMusic = ColorTranslator.FromHtml("#412080");
public Color SongSelect_BackColor_Namco = ColorTranslator.FromHtml("#980E00"); public Color SongSelect_BackColor_Namco = ColorTranslator.FromHtml("#980E00");
public int SongSelect_Bar_Genre_Count,
SongSelect_Genre_Background_Count,
SongSelect_Box_Chara_Count,
SongSelect_Difficulty_Background_Count;
public string[] SongSelect_CorrectionX_Chara = { "ここにX座標を補正したい文字をカンマで区切って記入" }; public string[] SongSelect_CorrectionX_Chara = { "ここにX座標を補正したい文字をカンマで区切って記入" };
public string[] SongSelect_CorrectionY_Chara = { "ここにY座標を補正したい文字をカンマで区切って記入" }; public string[] SongSelect_CorrectionY_Chara = { "ここにY座標を補正したい文字をカンマで区切って記入" };
public int SongSelect_CorrectionX_Chara_Value = 0; public int SongSelect_CorrectionX_Chara_Value = 0;

View File

@ -576,24 +576,34 @@ namespace TJAPlayer3
/// <param name="strFilename">保存するファイル名(フルパス)</param> /// <param name="strFilename">保存するファイル名(フルパス)</param>
public bool SaveResultScreen( string strFullPath ) public bool SaveResultScreen( string strFullPath )
{ {
string strSavePath = Path.GetDirectoryName( strFullPath ); bool success = true;
if ( !Directory.Exists( strSavePath ) )
void save(SKBitmap sKBitmap)
{ {
try string strSavePath = Path.GetDirectoryName( strFullPath );
if ( !Directory.Exists( strSavePath ) )
{ {
Directory.CreateDirectory( strSavePath ); try
{
Directory.CreateDirectory( strSavePath );
}
catch
{
Trace.TraceError(ToString());
Trace.TraceError( "例外が発生しましたが処理を継続します。 (0bfe6bff-2a56-4df4-9333-2df26d9b765b)" );
success = false;
}
} }
catch if (!File.Exists(strFullPath))
{ {
Trace.TraceError(ToString()); using FileStream stream = File.OpenWrite(strFullPath);
Trace.TraceError( "例外が発生しましたが処理を継続します。 (0bfe6bff-2a56-4df4-9333-2df26d9b765b)" ); sKBitmap.Encode(stream, SKEncodedImageFormat.Png, 80);
return false;
} }
} }
using SKBitmap sKBitmap = GetScreenShot(); GetScreenShotAsync(save);
using FileStream stream = File.OpenWrite(strFullPath);
return sKBitmap.Encode(stream, SKEncodedImageFormat.Png, 80); return success;
} }
#endregion #endregion
@ -2358,7 +2368,7 @@ for (int i = 0; i < 3; i++) {
{ {
return tテクスチャの生成( fileName, false ); return tテクスチャの生成( fileName, false );
} }
public static CTexture tテクスチャの生成( string fileName, bool b黒を透過する ) public static CTexture tテクスチャの生成( string fileName, bool b黒を透過する)
{ {
if ( app == null ) if ( app == null )
{ {

View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using FDK;
namespace TJAPlayer3
{
class HGenreBar
{
public static CTexture tGetGenreBar(string value, Dictionary<string, CTexture> textures)
{
if (textures.TryGetValue($"{value}", out CTexture tex))
{
return tex;
}
else
{
if (textures.TryGetValue("0", out CTexture tex2))
{
return tex2;
}
else
{
return null;
}
}
}
}
}

View File

@ -24,11 +24,11 @@ namespace TJAPlayer3
public bool IsChangedBoxColor; public bool IsChangedBoxColor;
public Color BgColor; public Color BgColor;
public bool IsChangedBgColor; public bool IsChangedBgColor;
public int BoxType; public string BoxType;
public int BgType; public string BgType;
public bool IsChangedBoxType; public bool IsChangedBoxType;
public bool IsChangedBgType; public bool IsChangedBgType;
public int BoxChara; public string BoxChara;
public bool IsChangedBoxChara; public bool IsChangedBoxChara;
public string DefaultPreimage; public string DefaultPreimage;
public string ScenePreset; public string ScenePreset;
@ -47,9 +47,9 @@ namespace TJAPlayer3
ForeColor = Color.White; ForeColor = Color.White;
BackColor = Color.Black; BackColor = Color.Black;
BoxColor = Color.White; BoxColor = Color.White;
BoxType = 0; BoxType = "0";
BgType = 0; BgType = "0";
BoxChara = 0; BoxChara = "0";
BgColor = Color.White; BgColor = Color.White;
DefaultPreimage = null; DefaultPreimage = null;
ScenePreset = ""; ScenePreset = "";
@ -132,17 +132,17 @@ namespace TJAPlayer3
} }
else if (key == "#BGTYPE") else if (key == "#BGTYPE")
{ {
this.BgType = int.Parse(value.Trim(ignoreChars)); this.BgType = value.Trim(ignoreChars);
IsChangedBgType = true; IsChangedBgType = true;
} }
else if (key == "#BOXTYPE") else if (key == "#BOXTYPE")
{ {
this.BoxType = int.Parse(value.Trim(ignoreChars)); this.BoxType = value.Trim(ignoreChars);
IsChangedBoxType = true; IsChangedBoxType = true;
} }
else if (key == "#BOXCHARA") else if (key == "#BOXCHARA")
{ {
this.BoxChara = int.Parse(value.Trim(ignoreChars)); this.BoxChara = value.Trim(ignoreChars);
IsChangedBoxChara = true; IsChangedBoxChara = true;
} }
else if (key == "#SCENEPRESET") else if (key == "#SCENEPRESET")

View File

@ -352,6 +352,47 @@ namespace TJAPlayer3
listードリスト.Add( value ); listードリスト.Add( value );
CSongDict.tAddSongNode(value.uniqueId, value); CSongDict.tAddSongNode(value.uniqueId, value);
value.r親ード = node親; value.r親ード = node親;
if (value.r親ード != null)
{
value.strScenePreset = value.r親ード.strScenePreset;
if (value.r親ード.IsChangedForeColor)
{
value.ForeColor = value.r親ード.ForeColor;
value.IsChangedForeColor = true;
}
if (value.r親ード.IsChangedBackColor)
{
value.BackColor = value.r親ード.BackColor;
value.IsChangedBackColor = true;
}
if (value.r親ード.isChangedBoxColor)
{
value.BoxColor = value.r親ード.BoxColor;
value.isChangedBoxColor = true;
}
if (value.r親ード.isChangedBgColor)
{
value.BgColor = value.r親ード.BgColor;
value.isChangedBgColor = true;
}
if (value.r親ード.isChangedBgType)
{
value.BgType = value.r親ード.BgType;
value.isChangedBgType = true;
}
if (value.r親ード.isChangedBoxType)
{
value.BoxType = value.r親ード.BoxType;
value.isChangedBoxType = true;
}
if (value.r親ード.isChangedBoxChara)
{
value.BoxChara = value.r親ード.BoxChara;
value.isChangedBoxChara = true;
}
}
this.n検索された曲ード数++; this.n検索された曲ード数++;
} }
else else

View File

@ -44,9 +44,9 @@ namespace TJAPlayer3
public bool isChangedBgColor; public bool isChangedBgColor;
public bool isChangedBgType; public bool isChangedBgType;
public bool isChangedBoxType; public bool isChangedBoxType;
public int BoxType; public string BoxType;
public int BgType; public string BgType;
public int BoxChara; public string BoxChara;
public bool isChangedBoxChara; public bool isChangedBoxChara;
public bool IsChangedForeColor; public bool IsChangedForeColor;

View File

@ -30,6 +30,9 @@ namespace TJAPlayer3
Trace.Indent(); Trace.Indent();
try try
{ {
Background = new ScriptBG(CSkin.Path($"{TextureLoader.BASE}{TextureLoader.STARTUP}Script.lua"));
Background.Init();
this.list進行文字列 = new List<string>(); this.list進行文字列 = new List<string>();
base.eフェーズID = CStage.Eフェーズ._通常状態; base.eフェーズID = CStage.Eフェーズ._通常状態;
base.Activate(); base.Activate();
@ -46,6 +49,8 @@ namespace TJAPlayer3
Trace.Indent(); Trace.Indent();
try try
{ {
TJAPlayer3.t安全にDisposeする(ref Background);
this.list進行文字列 = null; this.list進行文字列 = null;
if ( es != null ) if ( es != null )
{ {
@ -66,12 +71,10 @@ namespace TJAPlayer3
} }
public override void CreateManagedResource() public override void CreateManagedResource()
{ {
this.tx背景 = TJAPlayer3.tテクスチャの生成( CSkin.Path( @$"Graphics{Path.DirectorySeparatorChar}1_Title{Path.DirectorySeparatorChar}Background.png" ), false );
base.CreateManagedResource(); base.CreateManagedResource();
} }
public override void ReleaseManagedResource() public override void ReleaseManagedResource()
{ {
TJAPlayer3.tテクスチャの解放( ref this.tx背景 );
base.ReleaseManagedResource(); base.ReleaseManagedResource();
} }
public override int Draw() public override int Draw()
@ -98,8 +101,8 @@ namespace TJAPlayer3
// CSongs管理 s管理 = CDTXMania.Songs管理; // CSongs管理 s管理 = CDTXMania.Songs管理;
//if( this.tx背景 != null ) Background.Update();
// this.tx背景.t2D描画( CDTXMania.app.Device, 0, 0 ); Background.Draw();
#region [ this.str現在進行中 ] #region [ this.str現在進行中 ]
//----------------- //-----------------
@ -113,10 +116,6 @@ namespace TJAPlayer3
this.str現在進行中 = "SONG LIST..."; this.str現在進行中 = "SONG LIST...";
break; break;
/*case CStage.Eフェーズ.1_SongsDBからスコアキャッシュを構築:
this.str現在進行中 = "SONG DATABASE...";
break;*/
case CStage.Eフェーズ.2_: case CStage.Eフェーズ.2_:
this.str現在進行中 = string.Format( "{0} ... {1}", "Enumerating songs", es.Songs管理.n検索されたスコア数 ); this.str現在進行中 = string.Format( "{0} ... {1}", "Enumerating songs", es.Songs管理.n検索されたスコア数 );
break; break;
@ -133,16 +132,20 @@ namespace TJAPlayer3
this.str現在進行中 = string.Format( "{0} ... ", "Building songlists" ); this.str現在進行中 = string.Format( "{0} ... ", "Building songlists" );
break; break;
/*case CStage.Eフェーズ.6_SongsDBに出力する:
this.str現在進行中 = string.Format( "{0} ... ", "Saving songs.db" );
break;*/
case CStage.Eフェーズ._テクスチャの読み込み: case CStage.Eフェーズ._テクスチャの読み込み:
this.list進行文字列.Add("LOADING TEXTURES..."); if (!bIsLoadingTextures)
TJAPlayer3.Tx.LoadTexture(); {
this.list進行文字列.Add("LOADING TEXTURES...OK"); Task.Run(() =>
this.str現在進行中 = "Setup done."; {
this.eフェーズID = Eフェーズ.7_; this.list進行文字列.Add("LOADING TEXTURES...");
TJAPlayer3.Tx.LoadTexture();
this.list進行文字列.Add("LOADING TEXTURES...OK");
this.str現在進行中 = "Setup done.";
this.eフェーズID = Eフェーズ.7_;
TJAPlayer3.Skin.bgm起動画面.t停止する();
});
}
bIsLoadingTextures = true;
break; break;
} }
//----------------- //-----------------
@ -152,17 +155,14 @@ namespace TJAPlayer3
{ {
#region [ this.list進行文字列this. ] #region [ this.list進行文字列this. ]
//----------------- //-----------------
lock (this.list進行文字列) int x = 320;
int y = 20;
for(int i = 0; i < this.list進行文字列.Count; i++)
{ {
int x = 320; TJAPlayer3.act文字コンソール.tPrint((int)(x * TJAPlayer3.Skin.Resolution[0] / 1280.0), (int)(y * TJAPlayer3.Skin.Resolution[1] / 720.0), C文字コンソール.Eフォント種別., this.list進行文字列[i]);
int y = 20; y += 24;
foreach (string str in this.list進行文字列)
{
TJAPlayer3.act文字コンソール.tPrint(x, y, C文字コンソール.Eフォント種別., str);
y += 24;
}
TJAPlayer3.act文字コンソール.tPrint(x, y, C文字コンソール.Eフォント種別., this.str現在進行中);
} }
TJAPlayer3.act文字コンソール.tPrint(x, y, C文字コンソール.Eフォント種別., this.str現在進行中);
//----------------- //-----------------
#endregion #endregion
} }
@ -191,8 +191,9 @@ namespace TJAPlayer3
#region [ private ] #region [ private ]
//----------------- //-----------------
private string str現在進行中 = ""; private string str現在進行中 = "";
private CTexture tx背景; private ScriptBG Background;
private CEnumSongs es; private CEnumSongs es;
private bool bIsLoadingTextures;
#if false #if false
private void t曲リストの構築() private void t曲リストの構築()

View File

@ -18,6 +18,7 @@ namespace TJAPlayer3
public static string CHARACTERS = @$"Characters{Path.DirectorySeparatorChar}"; public static string CHARACTERS = @$"Characters{Path.DirectorySeparatorChar}";
// Stage // Stage
public static string STARTUP = @$"0_Startup{Path.DirectorySeparatorChar}";
public static string TITLE = @$"1_Title{Path.DirectorySeparatorChar}"; public static string TITLE = @$"1_Title{Path.DirectorySeparatorChar}";
public static string CONFIG = @$"2_Config{Path.DirectorySeparatorChar}"; public static string CONFIG = @$"2_Config{Path.DirectorySeparatorChar}";
public static string SONGSELECT = @$"3_SongSelect{Path.DirectorySeparatorChar}"; public static string SONGSELECT = @$"3_SongSelect{Path.DirectorySeparatorChar}";
@ -73,7 +74,6 @@ namespace TJAPlayer3
public Dictionary<string, CTexture> trackedTextures = new Dictionary<string, CTexture>(); public Dictionary<string, CTexture> trackedTextures = new Dictionary<string, CTexture>();
public TextureLoader() public TextureLoader()
{ {
// コンストラクタ // コンストラクタ
@ -81,21 +81,21 @@ namespace TJAPlayer3
internal CTexture TxC(string FileName) internal CTexture TxC(string FileName)
{ {
var tex = TJAPlayer3.tテクスチャの生成(CSkin.Path(BASE + FileName)); var tex = TJAPlayer3.tテクスチャの生成(CSkin.Path(BASE + FileName), false);
listTexture.Add(tex); listTexture.Add(tex);
return tex; return tex;
} }
internal CTexture TxCGlobal(string FileName) internal CTexture TxCGlobal(string FileName)
{ {
var tex = TJAPlayer3.tテクスチャの生成(TJAPlayer3.strEXEのあるフォルダ + GLOBAL + FileName); var tex = TJAPlayer3.tテクスチャの生成(TJAPlayer3.strEXEのあるフォルダ + GLOBAL + FileName, false);
listTexture.Add(tex); listTexture.Add(tex);
return tex; return tex;
} }
internal CTexture TxCAbsolute(string FileName) internal CTexture TxCAbsolute(string FileName)
{ {
var tex = TJAPlayer3.tテクスチャの生成(FileName); var tex = TJAPlayer3.tテクスチャの生成(FileName, false);
listTexture.Add(tex); listTexture.Add(tex);
return tex; return tex;
} }
@ -108,7 +108,7 @@ namespace TJAPlayer3
} }
internal CTexture TxCGen(string FileName) internal CTexture TxCGen(string FileName)
{ {
return TJAPlayer3.tテクスチャの生成(CSkin.Path(BASE + GAME + GENRE + FileName + ".png")); return TJAPlayer3.tテクスチャの生成(CSkin.Path(BASE + GAME + GENRE + FileName + ".png"), false);
} }
internal CTexture TxCSong(string path) internal CTexture TxCSong(string path)
@ -135,7 +135,7 @@ namespace TJAPlayer3
internal CTexture TxCUntrackedSong(string path) internal CTexture TxCUntrackedSong(string path)
{ {
return TJAPlayer3.tテクスチャの生成(path); return TJAPlayer3.tテクスチャの生成(path, false);
} }
public void LoadTexture() public void LoadTexture()
@ -296,38 +296,44 @@ namespace TJAPlayer3
SongSelect_ScoreWindow_Text = TxC(SONGSELECT + @$"ScoreWindow_Text.png"); SongSelect_ScoreWindow_Text = TxC(SONGSELECT + @$"ScoreWindow_Text.png");
TJAPlayer3.Skin.SongSelect_Bar_Genre_Count = TJAPlayer3.t連番画像の枚数を数える(CSkin.Path(BASE + SONGSELECT + @$"Bar_Genre{Path.DirectorySeparatorChar}"), "Bar_Genre_");
if (TJAPlayer3.Skin.SongSelect_Bar_Genre_Count != 0)
{ {
SongSelect_Bar_Genre = new CTexture[TJAPlayer3.Skin.SongSelect_Bar_Genre_Count]; string[] genre_files = Directory.GetFiles(CSkin.Path(BASE + SONGSELECT + @$"Bar_Genre{Path.DirectorySeparatorChar}"), "Bar_Genre_*.png");
SongSelect_Bar_Genre_Overlap = new CTexture[TJAPlayer3.Skin.SongSelect_Bar_Genre_Count]; SongSelect_Bar_Genre = new ();
for (int i = 0; i < SongSelect_Bar_Genre.Length; i++) for (int i = 0; i < genre_files.Length; i++)
{ {
SongSelect_Bar_Genre[i] = TxC(SONGSELECT + @$"Bar_Genre{Path.DirectorySeparatorChar}Bar_Genre_" + i.ToString() + ".png"); string name = Path.GetFileNameWithoutExtension(genre_files[i]).Split('_')[2];
SongSelect_Bar_Genre_Overlap[i] = TxC(SONGSELECT + @$"Bar_Genre{Path.DirectorySeparatorChar}Bar_Genre_Overlap_" + i.ToString() + ".png"); if (name != "Overlap") SongSelect_Bar_Genre.Add(name, TxC(SONGSELECT + @$"Bar_Genre{Path.DirectorySeparatorChar}Bar_Genre_" + name + ".png"));
}
}
{
string[] genre_files = Directory.GetFiles(CSkin.Path(BASE + SONGSELECT + @$"Bar_Genre{Path.DirectorySeparatorChar}"), "Bar_Genre_Overlap_*.png");
SongSelect_Bar_Genre_Overlap = new ();
for (int i = 0; i < genre_files.Length; i++)
{
string name = Path.GetFileNameWithoutExtension(genre_files[i]).Split('_')[3];
SongSelect_Bar_Genre_Overlap.Add(name, TxC(SONGSELECT + @$"Bar_Genre{Path.DirectorySeparatorChar}Bar_Genre_Overlap_" + name + ".png"));
} }
} }
TJAPlayer3.Skin.SongSelect_Genre_Background_Count = TJAPlayer3.t連番画像の枚数を数える(CSkin.Path(BASE + SONGSELECT + @$"Genre_Background{Path.DirectorySeparatorChar}"), "GenreBackground_");
if (TJAPlayer3.Skin.SongSelect_Genre_Background_Count != 0)
{ {
SongSelect_GenreBack = new CTexture[TJAPlayer3.Skin.SongSelect_Genre_Background_Count]; string[] genre_files = Directory.GetFiles(CSkin.Path(BASE + SONGSELECT + @$"Genre_Background{Path.DirectorySeparatorChar}"), "GenreBackground_*.png");
for (int i = 0; i < SongSelect_GenreBack.Length; i++) SongSelect_GenreBack = new ();
for (int i = 0; i < genre_files.Length; i++)
{ {
SongSelect_GenreBack[i] = TxC(SONGSELECT + @$"Genre_Background{Path.DirectorySeparatorChar}GenreBackground_" + i.ToString() + ".png"); string name = Path.GetFileNameWithoutExtension(genre_files[i]).Split('_')[1];
SongSelect_GenreBack.Add(name, TxC(SONGSELECT + @$"Genre_Background{Path.DirectorySeparatorChar}GenreBackground_" + name + ".png"));
} }
} }
TJAPlayer3.Skin.SongSelect_Box_Chara_Count = TJAPlayer3.t連番画像の枚数を数える(CSkin.Path(BASE + SONGSELECT + @$"Box_Chara{Path.DirectorySeparatorChar}"), "Box_Chara_");
if (TJAPlayer3.Skin.SongSelect_Box_Chara_Count != 0)
{ {
SongSelect_Box_Chara = new CTexture[TJAPlayer3.Skin.SongSelect_Box_Chara_Count]; string[] genre_files = Directory.GetFiles(CSkin.Path(BASE + SONGSELECT + @$"Box_Chara{Path.DirectorySeparatorChar}"), "Box_Chara_*.png");
for (int i = 0; i < SongSelect_Box_Chara.Length; i++) SongSelect_Box_Chara = new ();
for (int i = 0; i < genre_files.Length; i++)
{ {
SongSelect_Box_Chara[i] = TxC(SONGSELECT + @$"Box_Chara{Path.DirectorySeparatorChar}Box_Chara_" + i.ToString() + ".png"); string name = Path.GetFileNameWithoutExtension(genre_files[i]).Split('_')[2];
SongSelect_Box_Chara.Add(name, TxC(SONGSELECT + @$"Box_Chara{Path.DirectorySeparatorChar}Box_Chara_" + name + ".png"));
} }
} }
@ -359,14 +365,13 @@ namespace TJAPlayer3
Difficulty_Select_Bar[3] = TxC(SONGSELECT + @$"Difficulty_Select{Path.DirectorySeparatorChar}Difficulty_Select_Bar4.png"); Difficulty_Select_Bar[3] = TxC(SONGSELECT + @$"Difficulty_Select{Path.DirectorySeparatorChar}Difficulty_Select_Bar4.png");
Difficulty_Select_Bar[4] = TxC(SONGSELECT + @$"Difficulty_Select{Path.DirectorySeparatorChar}Difficulty_Select_Bar5.png"); Difficulty_Select_Bar[4] = TxC(SONGSELECT + @$"Difficulty_Select{Path.DirectorySeparatorChar}Difficulty_Select_Bar5.png");
TJAPlayer3.Skin.SongSelect_Difficulty_Background_Count = TJAPlayer3.t連番画像の枚数を数える(CSkin.Path(BASE + SONGSELECT + @$"Difficulty_Select{Path.DirectorySeparatorChar}Difficulty_Back{Path.DirectorySeparatorChar}"), "Difficulty_Back_");
if (TJAPlayer3.Skin.SongSelect_Difficulty_Background_Count != 0)
{ {
Difficulty_Back = new CTexture[TJAPlayer3.Skin.SongSelect_Difficulty_Background_Count]; string[] genre_files = Directory.GetFiles(CSkin.Path(BASE + SONGSELECT + @$"Difficulty_Select{Path.DirectorySeparatorChar}Difficulty_Back{Path.DirectorySeparatorChar}"), "Difficulty_Back_*.png");
for (int i = 0; i < Difficulty_Back.Length; i++) Difficulty_Back = new ();
for (int i = 0; i < genre_files.Length; i++)
{ {
Difficulty_Back[i] = TxC(SONGSELECT + @$"Difficulty_Select{Path.DirectorySeparatorChar}Difficulty_Back{Path.DirectorySeparatorChar}Difficulty_Back_" + i.ToString() + ".png"); string name = Path.GetFileNameWithoutExtension(genre_files[i]).Split('_')[2];
Difficulty_Back.Add(name, TxC(SONGSELECT + @$"Difficulty_Select{Path.DirectorySeparatorChar}Difficulty_Back{Path.DirectorySeparatorChar}Difficulty_Back_" + name + ".png"));
} }
} }
#endregion #endregion
@ -1189,6 +1194,8 @@ namespace TJAPlayer3
Characters_Heya_Render = new CTexture[TJAPlayer3.Skin.Characters_Ptn]; Characters_Heya_Render = new CTexture[TJAPlayer3.Skin.Characters_Ptn];
Characters_Result_Clear_1P = new CTexture[TJAPlayer3.Skin.Characters_Ptn]; Characters_Result_Clear_1P = new CTexture[TJAPlayer3.Skin.Characters_Ptn];
Characters_Result_Failed_1P = new CTexture[TJAPlayer3.Skin.Characters_Ptn]; Characters_Result_Failed_1P = new CTexture[TJAPlayer3.Skin.Characters_Ptn];
Characters_Result_Clear_2P = new CTexture[TJAPlayer3.Skin.Characters_Ptn];
Characters_Result_Failed_2P = new CTexture[TJAPlayer3.Skin.Characters_Ptn];
Characters = new CCharacter[TJAPlayer3.Skin.Characters_Ptn]; Characters = new CCharacter[TJAPlayer3.Skin.Characters_Ptn];
Characters_Normal = new CTexture[TJAPlayer3.Skin.Characters_Ptn][]; Characters_Normal = new CTexture[TJAPlayer3.Skin.Characters_Ptn][];
@ -1340,6 +1347,8 @@ namespace TJAPlayer3
Characters_Heya_Render[i] = TxCGlobal(CHARACTERS + TJAPlayer3.Skin.Characters_DirName[i] + @$"{Path.DirectorySeparatorChar}Render.png"); Characters_Heya_Render[i] = TxCGlobal(CHARACTERS + TJAPlayer3.Skin.Characters_DirName[i] + @$"{Path.DirectorySeparatorChar}Render.png");
Characters_Result_Clear_1P[i] = TxCGlobal(CHARACTERS + TJAPlayer3.Skin.Characters_DirName[i] + @$"{Path.DirectorySeparatorChar}Result_Clear_1P.png"); Characters_Result_Clear_1P[i] = TxCGlobal(CHARACTERS + TJAPlayer3.Skin.Characters_DirName[i] + @$"{Path.DirectorySeparatorChar}Result_Clear_1P.png");
Characters_Result_Failed_1P[i] = TxCGlobal(CHARACTERS + TJAPlayer3.Skin.Characters_DirName[i] + @$"{Path.DirectorySeparatorChar}Result_Failed_1P.png"); Characters_Result_Failed_1P[i] = TxCGlobal(CHARACTERS + TJAPlayer3.Skin.Characters_DirName[i] + @$"{Path.DirectorySeparatorChar}Result_Failed_1P.png");
Characters_Result_Clear_2P[i] = TxCGlobal(CHARACTERS + TJAPlayer3.Skin.Characters_DirName[i] + @$"{Path.DirectorySeparatorChar}Result_Clear_2P.png");
Characters_Result_Failed_2P[i] = TxCGlobal(CHARACTERS + TJAPlayer3.Skin.Characters_DirName[i] + @$"{Path.DirectorySeparatorChar}Result_Failed_2P.png");
TJAPlayer3.Skin.Characters_Resolution[i] = new int[] { 1280, 720 }; TJAPlayer3.Skin.Characters_Resolution[i] = new int[] { 1280, 720 };
TJAPlayer3.Skin.Characters_Heya_Render_Offset[i] = new int[] { 0, 0 }; TJAPlayer3.Skin.Characters_Heya_Render_Offset[i] = new int[] { 0, 0 };
@ -2382,10 +2391,11 @@ namespace TJAPlayer3
SongSelect_Search_Window, SongSelect_Search_Window,
SongSelect_ScoreWindow_Text; SongSelect_ScoreWindow_Text;
public CTexture[] SongSelect_GenreBack, public Dictionary<string, CTexture> SongSelect_GenreBack,
SongSelect_Bar_Genre, SongSelect_Bar_Genre,
SongSelect_Bar_Genre_Overlap, SongSelect_Bar_Genre_Overlap,
SongSelect_Box_Chara, SongSelect_Box_Chara;
public CTexture[]
SongSelect_ScoreWindow = new CTexture[(int)Difficulty.Total], SongSelect_ScoreWindow = new CTexture[(int)Difficulty.Total],
SongSelect_Frame_Score = new CTexture[3], SongSelect_Frame_Score = new CTexture[3],
SongSelect_NamePlate = new CTexture[1], SongSelect_NamePlate = new CTexture[1],
@ -2404,7 +2414,7 @@ namespace TJAPlayer3
public CTexture Difficulty_Option_Select; public CTexture Difficulty_Option_Select;
public CTexture[] Difficulty_Select_Bar = new CTexture[5]; public CTexture[] Difficulty_Select_Bar = new CTexture[5];
public CTexture[] Difficulty_Back; public Dictionary<string, CTexture> Difficulty_Back;
#endregion #endregion
public CTexture NewHeya_Close; public CTexture NewHeya_Close;
@ -2821,7 +2831,9 @@ Result_Mountain = new CTexture[4]*/;
public CTexture[] Characters_Heya_Preview, public CTexture[] Characters_Heya_Preview,
Characters_Heya_Render, Characters_Heya_Render,
Characters_Result_Clear_1P, Characters_Result_Clear_1P,
Characters_Result_Failed_1P; Characters_Result_Failed_1P,
Characters_Result_Clear_2P,
Characters_Result_Failed_2P;
public CCharacter[] Characters; public CCharacter[] Characters;
#endregion #endregion

View File

@ -184,7 +184,12 @@ namespace TJAPlayer3
TJAPlayer3.Skin.soundEntry.t再生する(); TJAPlayer3.Skin.soundEntry.t再生する();
} }
else else
return (int)E戻り値.EXIT; {
TJAPlayer3.Skin.sound決定音.t再生する();
n現在の選択行モード選択 = (int)E戻り値.EXIT + 1;
this.actFO.tフェードアウト開始(0, 500);
base.eフェーズID = CStage.Eフェーズ._フェードアウト;
}
} }

View File

@ -1414,16 +1414,15 @@ namespace TJAPlayer3
//----------------- //-----------------
// int boxType = nStrジャンルtoNum(stバー情報[nパネル番号].strジャンル); // int boxType = nStrジャンルtoNum(stバー情報[nパネル番号].strジャンル);
int boxType = stバー情報[nパネル番号].BoxType; string boxType = stバー情報[nパネル番号].BoxType;
var bar_genre = HGenreBar.tGetGenreBar(boxType, TJAPlayer3.Tx.SongSelect_Bar_Genre);
var bar_genre_overlap = HGenreBar.tGetGenreBar(boxType, TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap);
if (!stバー情報[nパネル番号].BoxTypeChanged) bar_genre.color4 = CConversion.ColorToColor4(stバー情報[nパネル番号].BoxColor);
boxType = nStrジャンルtoNum(stバー情報[nパネル番号].strジャンル);
TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType].color4 = CConversion.ColorToColor4(stバー情報[nパネル番号].BoxColor); bar_genre.vc拡大縮小倍率.X = 1.0f;
if (bar_genre_overlap != null)
TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType].vc拡大縮小倍率.X = 1.0f; bar_genre_overlap.vc拡大縮小倍率.X = 1.0f;
if (TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap[boxType] != null)
TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap[boxType].vc拡大縮小倍率.X = 1.0f;
TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlay.vc拡大縮小倍率.X = 1.0f; TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlay.vc拡大縮小倍率.X = 1.0f;
TJAPlayer3.Tx.SongSelect_Bar_Genre_Back.vc拡大縮小倍率.X = 1.0f; TJAPlayer3.Tx.SongSelect_Bar_Genre_Back.vc拡大縮小倍率.X = 1.0f;
@ -1547,13 +1546,11 @@ namespace TJAPlayer3
#region [ Bar ] #region [ Bar ]
//int boxType = nStrジャンルtoNum(r現在選択中の曲.strジャンル); //int boxType = nStrジャンルtoNum(r現在選択中の曲.strジャンル);
int boxType = r現在選択中の曲.BoxType; var bar_genre = HGenreBar.tGetGenreBar(r現在選択中の曲.BoxType, TJAPlayer3.Tx.SongSelect_Bar_Genre);
var bar_genre_overlap = HGenreBar.tGetGenreBar(r現在選択中の曲.BoxType, TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap);
if (!r現在選択中の曲.isChangedBoxType) DrawBarCenter(bar_genre, TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, true, false, false);
boxType = nStrジャンルtoNum(r現在選択中の曲.strジャンル); DrawBarCenter(bar_genre_overlap, TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, false, true, true);
DrawBarCenter(TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType], TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, true, false, false);
DrawBarCenter(TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap[boxType], TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, false, true, true);
#endregion #endregion
@ -1652,15 +1649,13 @@ namespace TJAPlayer3
#region [ Box ] #region [ Box ]
//int boxType = nStrジャンルtoNum(r現在選択中の曲.strジャンル); //int boxType = nStrジャンルtoNum(r現在選択中の曲.strジャンル);
int boxType = r現在選択中の曲.BoxType; var bar_genre = HGenreBar.tGetGenreBar(r現在選択中の曲.BoxType, TJAPlayer3.Tx.SongSelect_Bar_Genre);
var bar_genre_overlap = HGenreBar.tGetGenreBar(r現在選択中の曲.BoxType, TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap);
if (!r現在選択中の曲.isChangedBoxType)
boxType = nStrジャンルtoNum(r現在選択中の曲.strジャンル);
//DrawBarCenter(TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType], TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, true, true, false); //DrawBarCenter(TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType], TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, true, true, false);
DrawBarCenter(TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType], TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, true, false, false); DrawBarCenter(bar_genre, TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, true, false, false);
DrawBarCenter(TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap[boxType], TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, false, true, false); DrawBarCenter(bar_genre_overlap, TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, false, true, false);
#endregion #endregion
@ -1957,32 +1952,28 @@ namespace TJAPlayer3
// Chara here // Chara here
int boxType = r現在選択中の曲.BoxChara; var box_chara = HGenreBar.tGetGenreBar(r現在選択中の曲.BoxChara, TJAPlayer3.Tx.SongSelect_Box_Chara);
if (!r現在選択中の曲.isChangedBoxChara)
boxType = this.nStrジャンルtoNumBox(r現在選択中の曲.strジャンル);
// If BoxChara < 0, don't display any character // If BoxChara < 0, don't display any character
if (boxType >= 0 && boxType < TJAPlayer3.Skin.SongSelect_Box_Chara_Count)
{ {
if (!ctBoxOpen.IsEnded) if (!ctBoxOpen.IsEnded)
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].Opacity = (int)(ctBoxOpen.CurrentValue >= 1200 && ctBoxOpen.CurrentValue <= 1620 ? 255 - (ctBoxOpen.CurrentValue - 1200) * 2.55f : box_chara.Opacity = (int)(ctBoxOpen.CurrentValue >= 1200 && ctBoxOpen.CurrentValue <= 1620 ? 255 - (ctBoxOpen.CurrentValue - 1200) * 2.55f :
ctBoxOpen.CurrentValue >= 2000 ? (ctBoxOpen.CurrentValue - 2000) * 2.55f : ctBoxOpen.CurrentValue <= 1200 ? 255 : 0); ctBoxOpen.CurrentValue >= 2000 ? (ctBoxOpen.CurrentValue - 2000) * 2.55f : ctBoxOpen.CurrentValue <= 1200 ? 255 : 0);
else else
{ {
if (!TJAPlayer3.stage選曲.act難易度選択画面.bIsDifficltSelect) if (!TJAPlayer3.stage選曲.act難易度選択画面.bIsDifficltSelect)
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].Opacity = (int)(BarAnimeCount * 255.0f); box_chara.Opacity = (int)(BarAnimeCount * 255.0f);
else if (ctDifficultyIn.CurrentValue >= 1000) else if (ctDifficultyIn.CurrentValue >= 1000)
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].Opacity = (int)255.0f - (ctDifficultyIn.CurrentValue - 1000); box_chara.Opacity = (int)255.0f - (ctDifficultyIn.CurrentValue - 1000);
} }
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType]?.t2D中心基準描画(TJAPlayer3.Skin.SongSelect_Box_Chara_X[0] - (BarAnimeCount * TJAPlayer3.Skin.SongSelect_Box_Chara_Move), TJAPlayer3.Skin.SongSelect_Box_Chara_Y[0], box_chara?.t2D中心基準描画(TJAPlayer3.Skin.SongSelect_Box_Chara_X[0] - (BarAnimeCount * TJAPlayer3.Skin.SongSelect_Box_Chara_Move), TJAPlayer3.Skin.SongSelect_Box_Chara_Y[0],
new Rectangle(0, 0, TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].szテクスチャサイズ.Width / 2, new Rectangle(0, 0, box_chara.szテクスチャサイズ.Width / 2,
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].szテクスチャサイズ.Height)); box_chara.szテクスチャサイズ.Height));
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType]?.t2D中心基準描画(TJAPlayer3.Skin.SongSelect_Box_Chara_X[1] + (BarAnimeCount * TJAPlayer3.Skin.SongSelect_Box_Chara_Move), TJAPlayer3.Skin.SongSelect_Box_Chara_Y[1], box_chara?.t2D中心基準描画(TJAPlayer3.Skin.SongSelect_Box_Chara_X[1] + (BarAnimeCount * TJAPlayer3.Skin.SongSelect_Box_Chara_Move), TJAPlayer3.Skin.SongSelect_Box_Chara_Y[1],
new Rectangle(TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].szテクスチャサイズ.Width / 2, 0, new Rectangle(box_chara.szテクスチャサイズ.Width / 2, 0,
TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].szテクスチャサイズ.Width / 2, TJAPlayer3.Tx.SongSelect_Box_Chara[boxType].szテクスチャサイズ.Height)); box_chara.szテクスチャサイズ.Width / 2, box_chara.szテクスチャサイズ.Height));
} }
} }
break; break;
@ -2423,9 +2414,9 @@ namespace TJAPlayer3
public Color BoxColor; public Color BoxColor;
public Color BgColor; public Color BgColor;
public int BoxType; public string BoxType;
public int BgType; public string BgType;
public int BoxChara; public string BoxChara;
public bool BoxTypeChanged; public bool BoxTypeChanged;
public bool BgTypeChanged; public bool BgTypeChanged;
@ -2868,7 +2859,7 @@ namespace TJAPlayer3
Eバー種別 eバー種別, Eバー種別 eバー種別,
int[][] , int[][] ,
int[][] , int[][] ,
int boxType, string boxType,
int _songType = 0, int _songType = 0,
CSongUniqueID csu = null, CSongUniqueID csu = null,
C曲リストード reference = null C曲リストード reference = null
@ -2886,12 +2877,15 @@ namespace TJAPlayer3
TJAPlayer3.Tx.SongSelect_Crown.Opacity = opct; TJAPlayer3.Tx.SongSelect_Crown.Opacity = opct;
TJAPlayer3.Tx.SongSelect_ScoreRank.Opacity = opct; TJAPlayer3.Tx.SongSelect_ScoreRank.Opacity = opct;
for (int i = 0; i < TJAPlayer3.Skin.SongSelect_Bar_Genre_Count; i++)
foreach(var tex in TJAPlayer3.Tx.SongSelect_Bar_Genre)
{ {
TJAPlayer3.Tx.SongSelect_Bar_Genre[i].Opacity = opct; tex.Value.Opacity = opct;
if (TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap[i] != null) }
TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap[i].Opacity = opct; foreach(var tex in TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap)
} {
tex.Value.Opacity = opct;
}
TJAPlayer3.Tx.SongSelect_Bar_Genre_Back.Opacity = opct; TJAPlayer3.Tx.SongSelect_Bar_Genre_Back.Opacity = opct;
TJAPlayer3.Tx.SongSelect_Bar_Genre_Random.Opacity = opct; TJAPlayer3.Tx.SongSelect_Bar_Genre_Random.Opacity = opct;
@ -2924,8 +2918,8 @@ namespace TJAPlayer3
} }
else if (eバー種別 != Eバー種別.BackBox) else if (eバー種別 != Eバー種別.BackBox)
{ {
TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType]?.t2D描画(x, y); HGenreBar.tGetGenreBar(boxType, TJAPlayer3.Tx.SongSelect_Bar_Genre)?.t2D描画(x, y);
TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap[boxType]?.t2D描画(x, y); HGenreBar.tGetGenreBar(boxType, TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap)?.t2D描画(x, y);
if (TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlay != null) if (TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlay != null)
TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlay.t2D描画(x, y); TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlay.t2D描画(x, y);

View File

@ -348,15 +348,10 @@ namespace TJAPlayer3
// int boxType = nStrジャンルtoNum(TJAPlayer3.stage選曲.r現在選択中の曲.strジャンル); // int boxType = nStrジャンルtoNum(TJAPlayer3.stage選曲.r現在選択中の曲.strジャンル);
int boxType = TJAPlayer3.stage選曲.r現在選択中の曲.BoxType; var difficulty_back = HGenreBar.tGetGenreBar(TJAPlayer3.stage選曲.r現在選択中の曲.BoxType, TJAPlayer3.Tx.Difficulty_Back);
if (!TJAPlayer3.stage選曲.r現在選択中の曲.isChangedBoxType)
{
boxType = nStrジャンルtoNum(TJAPlayer3.stage選曲.r現在選択中の曲.strジャンル);
}
TJAPlayer3.Tx.Difficulty_Back[boxType].Opacity = difficulty_back.Opacity =
(TJAPlayer3.stage選曲.act曲リスト.ctDifficultyIn.CurrentValue - 1255); (TJAPlayer3.stage選曲.act曲リスト.ctDifficultyIn.CurrentValue - 1255);
TJAPlayer3.Tx.Difficulty_Bar.Opacity = (TJAPlayer3.stage選曲.act曲リスト.ctDifficultyIn.CurrentValue - 1255); TJAPlayer3.Tx.Difficulty_Bar.Opacity = (TJAPlayer3.stage選曲.act曲リスト.ctDifficultyIn.CurrentValue - 1255);
TJAPlayer3.Tx.Difficulty_Number.Opacity = (TJAPlayer3.stage選曲.act曲リスト.ctDifficultyIn.CurrentValue - 1255); TJAPlayer3.Tx.Difficulty_Number.Opacity = (TJAPlayer3.stage選曲.act曲リスト.ctDifficultyIn.CurrentValue - 1255);
@ -366,9 +361,9 @@ namespace TJAPlayer3
TJAPlayer3.Tx.SongSelect_ScoreRank.Opacity = (TJAPlayer3.stage選曲.act曲リスト.ctDifficultyIn.CurrentValue - 1255); TJAPlayer3.Tx.SongSelect_ScoreRank.Opacity = (TJAPlayer3.stage選曲.act曲リスト.ctDifficultyIn.CurrentValue - 1255);
TJAPlayer3.Tx.Difficulty_Star.Opacity = (TJAPlayer3.stage選曲.act曲リスト.ctDifficultyIn.CurrentValue - 1255); TJAPlayer3.Tx.Difficulty_Star.Opacity = (TJAPlayer3.stage選曲.act曲リスト.ctDifficultyIn.CurrentValue - 1255);
TJAPlayer3.Tx.Difficulty_Back[boxType].color4 = CConversion.ColorToColor4(TJAPlayer3.stage選曲.r現在選択中の曲.BoxColor); difficulty_back.color4 = CConversion.ColorToColor4(TJAPlayer3.stage選曲.r現在選択中の曲.BoxColor);
TJAPlayer3.Tx.Difficulty_Back[boxType].t2D中心基準描画(TJAPlayer3.Skin.SongSelect_Difficulty_Back[0], TJAPlayer3.Skin.SongSelect_Difficulty_Back[1]); difficulty_back.t2D中心基準描画(TJAPlayer3.Skin.SongSelect_Difficulty_Back[0], TJAPlayer3.Skin.SongSelect_Difficulty_Back[1]);
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++) for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{ {

View File

@ -472,21 +472,12 @@ namespace TJAPlayer3
if (this.r現在選択中の曲 != null) if (this.r現在選択中の曲 != null)
{ {
// if (this.nStrジャンルtoNum(this.r現在選択中の曲.strジャンル) != 0 || r現在選択中の曲.eード種別 == C曲リストード.Eード種別.BOX || r現在選択中の曲.eード種別 == C曲リストード.Eード種別.SCORE) nGenreBack = this.NowBg;
// { nOldGenreBack = this.OldBg;
if (this.NowUseGenre)
nGenreBack = this.nStrジャンルtoNum(this.NowGenre);
else
nGenreBack = this.NowBg;
if (this.OldUseGenre)
nOldGenreBack = this.nStrジャンルtoNum(this.OldGenre);
else
nOldGenreBack = this.OldBg;
// }
if (!TJAPlayer3.ConfigIni.bAIBattleMode) if (!TJAPlayer3.ConfigIni.bAIBattleMode)
{ {
if (TJAPlayer3.Tx.SongSelect_GenreBack[nGenreBack] != null) if (txGenreBack != null)
{ {
float scale = TJAPlayer3.Skin.Resolution[1] / (float)txGenreBack.szテクスチャサイズ.Height; float scale = TJAPlayer3.Skin.Resolution[1] / (float)txGenreBack.szテクスチャサイズ.Height;
for (int i = 0; i < (TJAPlayer3.Skin.Resolution[0] / (txGenreBack.szテクスチャサイズ.Width * scale)) + 2; i++) for (int i = 0; i < (TJAPlayer3.Skin.Resolution[0] / (txGenreBack.szテクスチャサイズ.Width * scale)) + 2; i++)
@ -1378,8 +1369,8 @@ namespace TJAPlayer3
public CCounter ctBackgroundFade; public CCounter ctBackgroundFade;
public string NowGenre; public string NowGenre;
public string OldGenre; public string OldGenre;
public int NowBg; public string NowBg;
public int OldBg; public string OldBg;
public Color NowBgColor = Color.White; public Color NowBgColor = Color.White;
public Color OldBgColor = Color.White; public Color OldBgColor = Color.White;
public bool NowUseGenre; public bool NowUseGenre;
@ -1419,8 +1410,8 @@ namespace TJAPlayer3
public PuchiChara PuchiChara; public PuchiChara PuchiChara;
private int nGenreBack; private string nGenreBack;
private int nOldGenreBack; private string nOldGenreBack;
public bool bBGM再生済み; public bool bBGM再生済み;
public bool bBGMIn再生した; public bool bBGMIn再生した;
private STキー反復用カウンタ ctキー反復用; private STキー反復用カウンタ ctキー反復用;
@ -1466,7 +1457,7 @@ namespace TJAPlayer3
{ {
if (txCustomSelectBG == null) if (txCustomSelectBG == null)
{ {
return TJAPlayer3.Tx.SongSelect_GenreBack[nGenreBack]; return HGenreBar.tGetGenreBar(nGenreBack, TJAPlayer3.Tx.SongSelect_GenreBack);
} }
else else
{ {
@ -1480,7 +1471,7 @@ namespace TJAPlayer3
{ {
if (txCustomPrevSelectBG == null) if (txCustomPrevSelectBG == null)
{ {
return TJAPlayer3.Tx.SongSelect_GenreBack[nOldGenreBack]; return HGenreBar.tGetGenreBar(nOldGenreBack, TJAPlayer3.Tx.SongSelect_GenreBack);
} }
else else
{ {

View File

@ -149,7 +149,7 @@ namespace TJAPlayer3
if (TJAPlayer3.stage選曲.n確定された曲の難易度[0] == (int)Difficulty.Tower) if (TJAPlayer3.stage選曲.n確定された曲の難易度[0] == (int)Difficulty.Tower)
{ {
Tower_DropoutScript = new EndAnimeScript($@"{origindir}Tower_Dropout{Path.DirectorySeparatorChar}cript.lua"); Tower_DropoutScript = new EndAnimeScript($@"{origindir}Tower_Dropout{Path.DirectorySeparatorChar}Script.lua");
Tower_DropoutScript.Init(); Tower_DropoutScript.Init();
Tower_TopReached_PassScript = new EndAnimeScript($@"{origindir}Tower_TopReached_Pass{Path.DirectorySeparatorChar}Script.lua"); Tower_TopReached_PassScript = new EndAnimeScript($@"{origindir}Tower_TopReached_Pass{Path.DirectorySeparatorChar}Script.lua");

View File

@ -834,17 +834,18 @@ namespace TJAPlayer3
{ {
CResultCharacter.tMenuDisplayCharacter(p, chara_x, chara_y, CResultCharacter.ECharacterResult.CLEAR, pos); CResultCharacter.tMenuDisplayCharacter(p, chara_x, chara_y, CResultCharacter.ECharacterResult.CLEAR, pos);
if (TJAPlayer3.Skin.Characters_UseResult1P[_charaId] && TJAPlayer3.Skin.Result_Use1PUI && TJAPlayer3.Tx.Characters_Result_Clear_1P[_charaId] != null) var tex = pos == 0 ? TJAPlayer3.Tx.Characters_Result_Clear_1P[_charaId] : TJAPlayer3.Tx.Characters_Result_Clear_2P[_charaId];
if (TJAPlayer3.Skin.Characters_UseResult1P[_charaId] && TJAPlayer3.Skin.Result_Use1PUI && tex != null)
{ {
TJAPlayer3.Tx.Characters_Result_Clear_1P[_charaId].vc拡大縮小倍率.X = renderRatioX; tex.vc拡大縮小倍率.X = renderRatioX;
TJAPlayer3.Tx.Characters_Result_Clear_1P[_charaId].vc拡大縮小倍率.Y = renderRatioY; tex.vc拡大縮小倍率.Y = renderRatioY;
if (is2PSide) if (is2PSide)
{ {
TJAPlayer3.Tx.Characters_Result_Clear_1P[_charaId].t2D左右反転描画(p1chara_x, p1chara_y); tex.t2D左右反転描画(p1chara_x, p1chara_y);
} }
else else
{ {
TJAPlayer3.Tx.Characters_Result_Clear_1P[_charaId].t2D描画(p1chara_x, p1chara_y); tex.t2D描画(p1chara_x, p1chara_y);
} }
} }
} }