1
0
mirror of synced 2025-01-30 19:43:47 +01:00

プチキャラを分離 (#232)

* プチキャラを分離

* commit漏れ
This commit is contained in:
Takkkom 2022-06-03 14:03:53 +09:00 committed by GitHub
parent 9bce8942bc
commit 17d5a5079c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 48 additions and 35 deletions

View File

@ -59,14 +59,16 @@ namespace TJAPlayer3
if (Counter == null || SineCounter == null || TJAPlayer3.Tx.PuchiChara == null) return base.On進行描画();
Counter.t進行Loop();
SineCounter.t進行LoopDb();
SineCounterIdle.t進行Loop();
SineCounterIdle.t進行Loop();
int p = TJAPlayer3.GetActualPlayer(player);
/*
TJAPlayer3.act文字コンソール.tPrint(700, 500, C文字コンソール.Eフォント種別., Counter.n現在の値.ToString());
TJAPlayer3.act文字コンソール.tPrint(700, 520, C文字コンソール.Eフォント種別., SineCounter.n現在の値.ToString());
TJAPlayer3.act文字コンソール.tPrint(700, 540, C文字コンソール.Eフォント種別., SineCounterIdle.n現在の値.ToString());
*/
*/
if (inGame)
sineY = (double)SineCounter.n現在の値;
else
@ -76,32 +78,30 @@ namespace TJAPlayer3
sineY = Math.Sin(sineY * (Math.PI / 180)) * (TJAPlayer3.Skin.Game_PuchiChara_Sine * (isBalloon ? TJAPlayer3.Skin.Game_PuchiChara_Scale[1] : TJAPlayer3.Skin.Game_PuchiChara_Scale[0]));
// TJAPlayer3.act文字コンソール.tPrint(700, 580, C文字コンソール.Eフォント種別.白, sineY.ToString());
TJAPlayer3.Tx.PuchiChara.vc拡大縮小倍率 = new Vector3((isBalloon ? TJAPlayer3.Skin.Game_PuchiChara_Scale[1] : TJAPlayer3.Skin.Game_PuchiChara_Scale[0]));
TJAPlayer3.Tx.PuchiChara.Opacity = alpha;
// TJAPlayer3.act文字コンソール.tPrint(700, 580, C文字コンソール.Eフォント種別.白, sineY.ToString());
// (isGrowing ? TJAPlayer3.Skin.Game_PuchiChara[1] : 0) => Height
/* To do :
**
** - Yellow light color filter when isGrowing is true
*/
int p = TJAPlayer3.GetActualPlayer(player);
int puriChar = Math.Max(0, Math.Min(TJAPlayer3.Skin.Puchichara_Ptn - 1, TJAPlayer3.NamePlateConfig.data.PuchiChara[p]));
int puriColumn = puriChar % 5;
int puriRow = puriChar / 5;
int puriChar = Math.Max(0, Math.Min(TJAPlayer3.Skin.Puchichara_Ptn - 1, TJAPlayer3.NamePlateConfig.data.PuchiChara[p]));
int adjustedX = x - 32;
int adjustedY = y - 32;
var chara = TJAPlayer3.Tx.PuchiChara[puriChar];
TJAPlayer3.Tx.PuchiChara.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, adjustedX, adjustedY + (int)sineY, new Rectangle((Counter.n現在の値 + 2 * puriColumn) * TJAPlayer3.Skin.Game_PuchiChara[0], puriRow * TJAPlayer3.Skin.Game_PuchiChara[1], TJAPlayer3.Skin.Game_PuchiChara[0], TJAPlayer3.Skin.Game_PuchiChara[1]));
if (chara != null)
{
chara.vc拡大縮小倍率 = new Vector3((isBalloon ? TJAPlayer3.Skin.Game_PuchiChara_Scale[1] : TJAPlayer3.Skin.Game_PuchiChara_Scale[0]));
chara.Opacity = alpha;
// (isGrowing ? TJAPlayer3.Skin.Game_PuchiChara[1] : 0) => Height
/* To do :
**
** - Yellow light color filter when isGrowing is true
*/
int adjustedX = x - 32;
int adjustedY = y - 32;
chara.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, adjustedX, adjustedY + (int)sineY, new Rectangle((Counter.n現在の値 + 2) * TJAPlayer3.Skin.Game_PuchiChara[0], 0, TJAPlayer3.Skin.Game_PuchiChara[0], TJAPlayer3.Skin.Game_PuchiChara[1]));
}
// TJAPlayer3.Tx.PuchiChara.t2D中心基準描画(TJAPlayer3.app.Device, x, y + (int)sineY, new Rectangle((Counter.n現在の値 + 2 * puriColumn) * TJAPlayer3.Skin.Game_PuchiChara[0], puriRow * TJAPlayer3.Skin.Game_PuchiChara[1], TJAPlayer3.Skin.Game_PuchiChara[0], TJAPlayer3.Skin.Game_PuchiChara[1]));
return base.On進行描画();
}

View File

@ -2629,6 +2629,7 @@ namespace TJAPlayer3
#region Puchichara
public int Puchichara_Ptn;
public string[] Puchicharas_Name;
#endregion

View File

@ -692,14 +692,26 @@ namespace TJAPlayer3
DanC_Small_ExamCymbol = TxC(GAME + DANC + @"Small_ExamCymbol.png");
DanC_ExamCymbol = TxC(GAME + DANC + @"ExamCymbol.png");
DanC_MiniNumber = TxC(GAME + DANC + @"MiniNumber.png");
#endregion
#region PuchiChara
PuchiChara = TxCGlobal(PUCHICHARA + @"0.png");
var puchicharaDirs = System.IO.Directory.GetDirectories(TJAPlayer3.strEXEのあるフォルダ + GLOBAL + PUCHICHARA);
TJAPlayer3.Skin.Puchichara_Ptn = puchicharaDirs.Length;
TJAPlayer3.Skin.Puchichara_Ptn = 5 * Math.Max(1, (PuchiChara.szテクスチャサイズ.Height / 256));
PuchiChara = new CTexture[TJAPlayer3.Skin.Puchichara_Ptn];
TJAPlayer3.Skin.Puchicharas_Name = new string[TJAPlayer3.Skin.Puchichara_Ptn];
for (int i = 0; i < TJAPlayer3.Skin.Puchichara_Ptn; i++)
{
PuchiChara[i] = TxCAbsolute($@"{puchicharaDirs[i]}\Chara.png");
PuchiChara[i].vc拡大縮小倍率 = new SharpDX.Vector3(TJAPlayer3.Skin.Game_PuchiChara_Scale[0]);
TJAPlayer3.Skin.Puchicharas_Name[i] = System.IO.Path.GetFileName(puchicharaDirs[i]);
}
///TJAPlayer3.Skin.Puchichara_Ptn = 5 * Math.Max(1, (PuchiChara.szテクスチャサイズ.Height / 256));
#endregion
@ -1839,7 +1851,7 @@ namespace TJAPlayer3
public CTexture DanC_Screen;
#endregion
#region PuchiChara
public CTexture PuchiChara;
public CTexture[] PuchiChara;
#endregion
#region Training
public CTexture Tokkun_DownBG,

View File

@ -30,7 +30,7 @@ namespace TJAPlayer3
NullCheckAndRender(ref TJAPlayer3.Tx.Mob[i]);
}
NullCheckAndRender(ref TJAPlayer3.Tx.PuchiChara);
//NullCheckAndRender(ref TJAPlayer3.Tx.PuchiChara);
}

View File

@ -228,13 +228,13 @@ namespace TJAPlayer3
if (i != 0)
{
TJAPlayer3.Tx.PuchiChara?.tUpdateColor4(C変換.ColorToColor4(Color.DarkGray));
TJAPlayer3.Tx.PuchiChara[pos]?.tUpdateColor4(C変換.ColorToColor4(Color.DarkGray));
TJAPlayer3.Tx.Heya_Center_Menu_Box_Slot?.tUpdateColor4(C変換.ColorToColor4(Color.DarkGray));
TJAPlayer3.Tx.Heya_Lock?.tUpdateColor4(C変換.ColorToColor4(Color.DarkGray));
}
else
{
TJAPlayer3.Tx.PuchiChara?.tUpdateColor4(C変換.ColorToColor4(Color.White));
TJAPlayer3.Tx.PuchiChara[pos]?.tUpdateColor4(C変換.ColorToColor4(Color.White));
TJAPlayer3.Tx.Heya_Center_Menu_Box_Slot?.tUpdateColor4(C変換.ColorToColor4(Color.White));
TJAPlayer3.Tx.Heya_Lock?.tUpdateColor4(C変換.ColorToColor4(Color.White));
}
@ -244,13 +244,13 @@ namespace TJAPlayer3
int puriColumn = pos % 5;
int puriRow = pos / 5;
TJAPlayer3.Tx.PuchiChara?.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 620 + 302 * i, 320 + (int)(PuchiChara.sineY),
TJAPlayer3.Tx.PuchiChara[pos]?.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, 620 + 302 * i, 320 + (int)(PuchiChara.sineY),
new Rectangle((PuchiChara.Counter.n現在の値 + 2 * puriColumn) * TJAPlayer3.Skin.Game_PuchiChara[0],
puriRow * TJAPlayer3.Skin.Game_PuchiChara[1],
TJAPlayer3.Skin.Game_PuchiChara[0],
TJAPlayer3.Skin.Game_PuchiChara[1]));
TJAPlayer3.Tx.PuchiChara?.tUpdateColor4(C変換.ColorToColor4(Color.White));
TJAPlayer3.Tx.PuchiChara[pos]?.tUpdateColor4(C変換.ColorToColor4(Color.White));
#region [Database related values]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB