1
0
mirror of synced 2025-01-18 17:14:07 +01:00

複数の背景に対応 (#198)

* 複数の背景に対応

* フォルダがない場合のクラッシュの修正と複数のFooterの対応
This commit is contained in:
Takkkom 2022-05-24 13:45:29 +09:00 committed by GitHub
parent 7f3bd0a5b0
commit 8874bd2f29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 656 additions and 555 deletions

View File

@ -9,7 +9,7 @@ namespace TJAPlayer3
{
class TextureLoader
{
const string BASE = @"Graphics\";
public const string BASE = @"Graphics\";
const string GLOBAL = @"Global\";
// Global assets
@ -22,7 +22,7 @@ namespace TJAPlayer3
const string SONGSELECT = @"3_SongSelect\";
const string DANISELECT = @"3_DaniSelect\";
const string SONGLOADING = @"4_SongLoading\";
const string GAME = @"5_Game\";
public const string GAME = @"5_Game\";
const string RESULT = @"6_Result\";
const string EXIT = @"7_Exit\";
const string DANRESULT = @"7_DanResult\";
@ -37,10 +37,10 @@ namespace TJAPlayer3
const string DANCER = @"2_Dancer\";
const string MOB = @"3_Mob\";
const string COURSESYMBOL = @"4_CourseSymbol\";
const string BACKGROUND = @"5_Background\";
public const string BACKGROUND = @"5_Background\";
const string TAIKO = @"6_Taiko\";
const string GAUGE = @"7_Gauge\";
const string FOOTER = @"8_Footer\";
public const string FOOTER = @"8_Footer\";
const string END = @"9_End\";
const string EFFECTS = @"10_Effects\";
const string BALLOON = @"11_Balloon\";
@ -395,43 +395,6 @@ namespace TJAPlayer3
Mob[i] = TxC(GAME + MOB + i.ToString() + ".png");
}
#endregion
#region Footer
Mob_Footer = TxC(GAME + FOOTER + @"0.png");
#endregion
#region Background
Background = TxC(GAME + Background + @"0\" + @"Background.png");
Background_Up_1st = new CTexture[3];
Background_Up_1st[0] = TxC(GAME + BACKGROUND + @"0\" + @"1P_Up_1st.png");
Background_Up_1st[1] = TxC(GAME + BACKGROUND + @"0\" + @"2P_Up_1st.png");
Background_Up_1st[2] = TxC(GAME + BACKGROUND + @"0\" + @"Clear_Up_1st.png");
Background_Up_2nd = new CTexture[3];
Background_Up_2nd[0] = TxC(GAME + BACKGROUND + @"0\" + @"1P_Up_2nd.png");
Background_Up_2nd[1] = TxC(GAME + BACKGROUND + @"0\" + @"2P_Up_2nd.png");
Background_Up_2nd[2] = TxC(GAME + BACKGROUND + @"0\" + @"Clear_Up_2nd.png");
Background_Up_3rd = new CTexture[3];
Background_Up_3rd[0] = TxC(GAME + BACKGROUND + @"0\" + @"1P_Up_3rd.png");
Background_Up_3rd[1] = TxC(GAME + BACKGROUND + @"0\" + @"2P_Up_3rd.png");
Background_Up_3rd[2] = TxC(GAME + BACKGROUND + @"0\" + @"Clear_Up_3rd.png");
for(int i = 0; i < Background_Up_Dan.Length; i++)
Background_Up_Dan[i] = TxC(GAME + BACKGROUND + @"1\" + i.ToString() + @".png");
for (int i = 0; i < Background_Up_Tower.Length; i++)
Background_Up_Tower[i] = TxC(GAME + BACKGROUND + @"2\" + i.ToString() + @".png");
Background_Down = TxC(GAME + BACKGROUND + @"0\" + @"Down.png");
Background_Down_Clear = TxC(GAME + BACKGROUND + @"0\" + @"Down_Clear.png");
Background_Down_Scroll = TxC(GAME + BACKGROUND + @"0\" + @"Down_Scroll.png");
#endregion
#region Taiko
@ -1627,18 +1590,6 @@ namespace TJAPlayer3
#endregion
#region
public CTexture[] Mob;
public CTexture Mob_Footer;
#endregion
#region
public CTexture Background,
Background_Down,
Background_Down_Clear,
Background_Down_Scroll;
public CTexture[] Background_Up_1st,
Background_Up_2nd,
Background_Up_3rd,
Background_Up_Dan = new CTexture[6],
Background_Up_Tower = new CTexture[8];
#endregion
#region
public CTexture[] Taiko_Base,

View File

@ -29,25 +29,40 @@ namespace TJAPlayer3
public override void OnManagedリソースの作成()
{
var footerDir = CSkin.Path($"{TextureLoader.BASE}{TextureLoader.GAME}{TextureLoader.FOOTER}");
if (System.IO.Directory.Exists(footerDir))
{
Random random = new Random();
var upDirs = System.IO.Directory.GetFiles(footerDir);
var upPath = upDirs[random.Next(0, upDirs.Length)];
Mob_Footer = TJAPlayer3.tテクスチャの生成(upPath);
}
base.OnManagedリソースの作成();
}
public override void OnManagedリソースの解放()
{
TJAPlayer3.t安全にDisposeする(ref Mob_Footer);
base.OnManagedリソースの解放();
}
public override int On進行描画()
{
if (TJAPlayer3.Tx.Mob_Footer != null)
if (this.Mob_Footer != null)
{
TJAPlayer3.Tx.Mob_Footer.t2D描画(TJAPlayer3.app.Device, 0, 720 - TJAPlayer3.Tx.Mob_Footer.szテクスチャサイズ.Height);
this.Mob_Footer.t2D描画(TJAPlayer3.app.Device, 0, 720 - this.Mob_Footer.szテクスチャサイズ.Height);
}
return base.On進行描画();
}
#region[ private ]
//-----------------
public CTexture Mob_Footer;
//-----------------
#endregion
}

File diff suppressed because it is too large Load Diff

View File

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 154 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 227 KiB

After

Width:  |  Height:  |  Size: 227 KiB

View File

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB