1
0
mirror of synced 2025-01-31 03:53:44 +01:00

Song unlockables first shot

This commit is contained in:
0auBSQ 2024-06-25 05:05:53 +09:00
parent 561170c6d3
commit c2af24f737
37 changed files with 565 additions and 387 deletions

View File

@ -1 +0,0 @@
{}

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,6 @@
{
"allpurple":true,
"autoroll":0,
"showadlib":false,
"splitlane":false
}

View File

@ -0,0 +1,5 @@
{
"name" : "Template",
"rarity": "Uncommon",
"author": "[Author]",
}

View File

@ -0,0 +1,17 @@
{
"condition": "sg",
"type": "me",
"values": [
5,
2,
5,
2,
5,
2
],
"references": [
"OpenTaiko Chapter I",
"OpenTaiko Chapter II",
"OpenTaiko Chapter III"
],
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -0,0 +1,6 @@
{
"allpurple":false,
"autoroll":0,
"showadlib":false,
"splitlane":false
}

View File

@ -0,0 +1,5 @@
{
"name" : "Bol",
"rarity": "Rare",
"author": "DashyDesu"
}

View File

@ -0,0 +1,11 @@
{
"condition": "sc",
"type": "me",
"values": [
20,
2
],
"references": [
"bol",
],
}

Binary file not shown.

View File

@ -1,5 +1,5 @@
{
"name" : "Dashy",
"rarity": "Rare",
"rarity": "Uncommon",
"author": "Dashy",
}

View File

@ -1,7 +1,11 @@
{
"condition": "ch",
"condition": "sg",
"type": "me",
"values": [
888,
3,
2
],
"references": [
"Dashy's Secrets",
],
}

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 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: 17 KiB

View File

@ -14,8 +14,8 @@
13 - Platinum
14 - Kohaku (Character plate)
15 - Dashy (Character plate)
16 - OpTk Blue
17 - OpTk Red
16 - Blue
17 - Red
18 - Sky Purple
19 - AI
20 - Cyan
@ -25,4 +25,7 @@
24 - Saturated green
25 - OpTk Chapter I
26 - OpTk Chapter II
27 - OpTk Chapter III
27 - OpTk Chapter III
28 - OpTk Light
29 - OpTk Dark
30 - NEP0

View File

@ -2296,6 +2296,15 @@ namespace TJAPlayer3
SongSelect_Box_Opening_Interval = float.Parse(strParam);
break;
}
case "SongSelect_Unlock_Conditions_Text":
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 2; i++)
{
SongSelect_Unlock_Conditions_Text[i] = int.Parse(strSplit[i]);
}
break;
}
case "SongSelect_Difficulty_Select_Title":
{
string[] strSplit = strParam.Split(',');
@ -9851,6 +9860,8 @@ namespace TJAPlayer3
public int[] SongSelect_Level_Y = new int[] { 400, 400, 400, 400 };
public int[] SongSelect_Level_Move = new int[] { 0, -17 };
public int[] SongSelect_Unlock_Conditions_Text = new int[] { 72, 128 };
public int[] SongSelect_Level_Number_Interval = new int[] { 11, 0 };
public float SongSelect_Box_Opening_Interval = 1f;

View File

@ -11,7 +11,7 @@ namespace TJAPlayer3
{
internal class Modal
{
public Modal(EModalType mt, int ra, object re)
public Modal(EModalType mt, int ra, params object[] re)
{
modalType = mt;
rarity = ra;
@ -176,13 +176,11 @@ namespace TJAPlayer3
public enum EModalType
{
Coin = 0,
Puchichara = 1,
Character = 2,
Character = 1,
Puchichara = 2,
Title = 3,
Text = 4,
Confirm = 5,
Song = 6,
Total = 7,
Song = 4,
Total = 5,
}
// Full : 1P standard modal, Half : Splitted screen modal
@ -199,7 +197,7 @@ namespace TJAPlayer3
#region [Public variables]
// Coin number for coin; database/unlockable asset for puchichara, character and title; no effect on text, confirm
public object reference;
public object[] reference;
public int rarity;
public EModalType modalType;
@ -215,7 +213,7 @@ namespace TJAPlayer3
// Check if the text is vertically centered or slightly up (to let enough space for the unlocked unit texture)
private bool tTextCentered()
{
if (modalType == EModalType.Coin || modalType == EModalType.Text)
if (modalType == EModalType.Coin)
return true;
return false;
}
@ -237,7 +235,7 @@ namespace TJAPlayer3
if (modalType == EModalType.Coin)
{
content = String.Format("+{0} {1} ({2}: {3})",
(int)reference,
(int)reference[0],
CLangManager.LangInstance.GetString(306),
CLangManager.LangInstance.GetString(307),
TJAPlayer3.SaveFileInstances[player].data.Medals
@ -245,19 +243,19 @@ namespace TJAPlayer3
}
else if (modalType == EModalType.Title)
{
content = (string)reference;
content = (string)reference[0];
}
else if (modalType == EModalType.Character)
{
content = (string)reference;
content = (string)reference[0];
}
else if (modalType == EModalType.Puchichara)
{
content = (string)reference;
content = (string)reference[0];
}
else if (modalType == EModalType.Song)
{
content = (string)reference;
content = (string)reference[0];
}
TitleTextureKey _content = new TitleTextureKey(

View File

@ -38,6 +38,7 @@ namespace TJAPlayer3
{
data.UnlockedCharacters = DBSaves.FetchStringUnlockedAsset(data.SaveId, "unlocked_characters");
data.UnlockedPuchicharas = DBSaves.FetchStringUnlockedAsset(data.SaveId, "unlocked_puchicharas");
data.UnlockedSongs = DBSaves.FetchStringUnlockedAsset(data.SaveId, "unlocked_songs");
data.UnlockedNameplateIds = DBSaves.FetchUnlockedNameplateIds(data.SaveId);
data.DanTitles = DBSaves.FetchUnlockedDanTitles(data.SaveId);
}
@ -259,6 +260,9 @@ namespace TJAPlayer3
[JsonProperty("unlockedPuchicharas")]
public List<string> UnlockedPuchicharas = new List<string>();
[JsonIgnore]
public List<string> UnlockedSongs = new List<string>();
[JsonIgnore]
public List<int> UnlockedNameplateIds = new List<int>();

View File

@ -1,5 +1,8 @@
using System.Collections.Generic;
using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Newtonsoft.Json;
using static TJAPlayer3.DBNameplateUnlockables;
using static TJAPlayer3.DBSongUnlockables;
namespace TJAPlayer3
@ -19,8 +22,42 @@ namespace TJAPlayer3
public DBSongUnlockables()
{
_fn = @$"{TJAPlayer3.strEXEのあるフォルダ}Databases{Path.DirectorySeparatorChar}SongUnlockables.json";
base.tDBInitSavable();
//_fn = @$"{TJAPlayer3.strEXEのあるフォルダ}Databases{Path.DirectorySeparatorChar}SongUnlockables.json";
//base.tDBInitSavable();
_fn = @$"{TJAPlayer3.strEXEのあるフォルダ}Databases{Path.DirectorySeparatorChar}SongUnlockables.db3";
using (var connection = new SqliteConnection(@$"Data Source={_fn}"))
{
connection.Open();
// Get nameplates
var command = connection.CreateCommand();
command.CommandText =
@$"
SELECT *
FROM songs;
";
var reader = command.ExecuteReader();
while (reader.Read())
{
SongUnlockable su = new SongUnlockable();
su.hiddenIndex = (EHiddenIndex)(Int64)reader["HiddenIndex"];
su.rarity = (string)reader["Rarity"];
su.unlockConditions = new DBUnlockables.CUnlockConditions();
su.unlockConditions.Condition = (string)reader["UnlockCondition"];
su.unlockConditions.Values = JsonConvert.DeserializeObject<int[]>((string)reader["UnlockValues"]) ?? new int[] { 0 };
su.unlockConditions.Type = (string)reader["UnlockType"];
su.unlockConditions.Reference = JsonConvert.DeserializeObject<string[]>((string)reader["UnlockReferences"]) ?? new string[] { "" };
data[((string)reader["SongUniqueId"])] = su;
}
reader.Close();
}
}
public class SongUnlockable
{
@ -37,35 +74,63 @@ namespace TJAPlayer3
public void tGetUnlockedItems(int _player, ModalQueue mq)
{
int player = TJAPlayer3.GetActualPlayer(_player);
var _sf = TJAPlayer3.SaveFileInstances[player].data.NamePlateTitles; // Placeholder
var _sf = TJAPlayer3.SaveFileInstances[player].data.UnlockedSongs;
bool _edited = false;
foreach (KeyValuePair<string, SongUnlockable> item in data)
{
var _npvKey = item.Key;
if (!_sf.ContainsKey(_npvKey))
string _npvKey = item.Key;
string? _songName = CSongDict.tGetNodeFromID(_npvKey)?.strタイトル;
string _songSubtitle = CSongDict.tGetNodeFromID(_npvKey)?.strサブタイトル ?? "";
if (!_sf.Contains(_npvKey) && _songName != null)
{
var _fulfilled = item.Value.unlockConditions.tConditionMetWrapper(player, DBUnlockables.CUnlockConditions.EScreen.Internal).Item1;
if (_fulfilled)
{
/*
_sf.Add(_npvKey, item.Value.nameplateInfo);
//_sf.Add(_npvKey, item.Value.nameplateInfo);
_sf.Add(_npvKey);
_edited = true;
mq.tAddModal(
new Modal(
Modal.EModalType.Title,
HRarity.tRarityToModalInt(item.Value.rarity),
item.Value.nameplateInfo.cld.GetString(item.Key)
),
Modal.EModalType.Song,
HRarity.tRarityToModalInt(item.Value.rarity),
_songName,
_songSubtitle
),
_player);
*/
}
DBSaves.RegisterStringUnlockedAsset(TJAPlayer3.SaveFileInstances[player].data.SaveId, "unlocked_songs", _npvKey);
}
}
}
if (_edited)
TJAPlayer3.SaveFileInstances[player].tApplyHeyaChanges();
}
public bool tIsSongLocked(CSongListNode? song)
{
if (song == null) return false;
return !TJAPlayer3.SaveFileInstances[TJAPlayer3.SaveFile].data.UnlockedSongs.Contains(song.tGetUniqueId())
&& data.ContainsKey(song.tGetUniqueId());
}
public EHiddenIndex tGetSongHiddenIndex(CSongListNode? song)
{
if (song == null || !tIsSongLocked(song)) return EHiddenIndex.DISPLAYED;
return data[song.tGetUniqueId()].hiddenIndex;
}
public SongUnlockable? tGetUnlockableByUniqueId(CSongListNode? song)
{
if (song == null) return null;
if (!data.ContainsKey(song.tGetUniqueId())) return null;
return data[song.tGetUniqueId()];
}
}
}

View File

@ -355,17 +355,59 @@ namespace TJAPlayer3
case "sg":
{
List<string> _rows = new List<string>();
var _challengeCount = this.Values.Length / this.RequiredArgCount;
var _count = 0;
for (int i = 0; i < _challengeCount; i++)
{
int _base = i * this.RequiredArgCount;
string _genreName = this.Reference[i];
int _songCount = this.Values[_base];
var _aimedStatus = this.Values[_base + 1];
int _satifsiedCount = 0;
if (_aimedStatus == (int)EClearStatus.NONE) _satifsiedCount = ChartStats.SongGenrePlays.TryGetValue(_genreName, out var value) ? value : 0;
else if (_aimedStatus <= (int)EClearStatus.CLEAR) _satifsiedCount = ChartStats.SongGenreClears.TryGetValue(_genreName, out var value) ? value : 0;
else if (_aimedStatus == (int)EClearStatus.FC) _satifsiedCount = ChartStats.SongGenreFCs.TryGetValue(_genreName, out var value) ? value : 0;
else _satifsiedCount = ChartStats.SongGenrePerfects.TryGetValue(_genreName, out var value) ? value : 0;
if (_satifsiedCount >= _songCount) _count++;
var statusString = CLangManager.LangInstance.GetString(91010 + _aimedStatus);
_rows.Add(CLangManager.LangInstance.GetString(90014).SafeFormat(statusString, _songCount, _genreName, _satifsiedCount));
}
_rows.Insert(0, CLangManager.LangInstance.GetString(90012).SafeFormat(_count, _challengeCount));
return String.Join("\n", _rows);
}
case "sc":
{
List<string> _rows = new List<string>();
var _challengeCount = this.Values.Length / this.RequiredArgCount;
var _count = 0;
for (int i = 0; i < _challengeCount; i++)
{
int _base = i * this.RequiredArgCount;
string _charterName = this.Reference[i];
int _songCount = this.Values[_base];
var _aimedStatus = this.Values[_base + 1];
int _satifsiedCount = 0;
if (_aimedStatus == (int)EClearStatus.NONE) _satifsiedCount = ChartStats.CharterPlays.TryGetValue(_charterName, out var value) ? value : 0;
else if (_aimedStatus <= (int)EClearStatus.CLEAR) _satifsiedCount = ChartStats.CharterClears.TryGetValue(_charterName, out var value) ? value : 0;
else if (_aimedStatus == (int)EClearStatus.FC) _satifsiedCount = ChartStats.CharterFCs.TryGetValue(_charterName, out var value) ? value : 0;
else _satifsiedCount = ChartStats.CharterPerfects.TryGetValue(_charterName, out var value) ? value : 0;
if (_satifsiedCount >= _songCount) _count++;
var statusString = CLangManager.LangInstance.GetString(91010 + _aimedStatus);
_rows.Add(CLangManager.LangInstance.GetString(90015).SafeFormat(statusString, _songCount, _charterName, _satifsiedCount));
}
_rows.Insert(0, CLangManager.LangInstance.GetString(90012).SafeFormat(_count, _challengeCount));
return String.Join("\n", _rows);
}

View File

@ -422,8 +422,7 @@ namespace TJAPlayer3
[301] = "Character got !",
[302] = "Puchichara got !",
[303] = "Title got !",
[304] = "Notice",
[305] = "Confirm",
[304] = "Song got !",
[306] = "Coins",
[307] = "Total",

View File

@ -492,8 +492,7 @@ namespace TJAPlayer3
[301] = "キャラクター取得!",
[302] = "プチキャラ取得!",
[303] = "タイトル取得!",
[304] = "注目",
[305] = "確認",
[304] = "楽曲取得!",
[306] = "コイン",
[307] = "累計",
@ -564,7 +563,7 @@ namespace TJAPlayer3
[90009] = "{0}回プレイ ({1}/{0})", // tp
[90010] = "{2}で{1}譜面を{0} ({3}/{1})", // dp
[90011] = "{2}★の{1}譜面を{0} ({3}/{1})", // lp
[90012] = "以下の条件をクリアしましょう!: ({0}/{1})", // sp, sg, sc
[90012] = "以下の条件をクリアしましょう!: ({0}/{1})", // sp, sg, sc
[90013] = "※{1}{2}を{0}", // sp
[90014] = "※{2}ジャンルの{1}譜面を{0} ({3}/{1})", // sg
[90015] = "※{2}さんの{1}譜面を{0} ({3}/{1})", // sc

View File

@ -265,6 +265,7 @@ namespace TJAPlayer3
SongSelect_Frame_Random = TxC(SONGSELECT + @$"Frame_Random.png");
SongSelect_Bar_Genre_Back = TxC(SONGSELECT + @$"Bar_Genre_Back.png");
SongSelect_Bar_Genre_Locked = TxC(SONGSELECT + @$"Bar_Genre_Locked.png");
SongSelect_Bar_Genre_Locked_Top = TxC(SONGSELECT + @$"Bar_Genre_Locked_Top.png");
SongSelect_Bar_Genre_Random = TxC(SONGSELECT + @$"Bar_Genre_Random.png");
SongSelect_Bar_Genre_RecentryPlaySong = TxC(SONGSELECT + @$"Bar_Genre_RecentryPlaySong.png");
SongSelect_Bar_Select = TxC(SONGSELECT + @$"Bar_Select.png");
@ -286,6 +287,7 @@ namespace TJAPlayer3
SongSelect_ScoreRank = TxC(SONGSELECT + @$"ScoreRank.png");
SongSelect_BoardNumber = TxC(SONGSELECT + @$"BoardNumber.png");
SongSelect_Difficulty_Cymbol = TxC(SONGSELECT + "Difficulty_Cymbol.png");
SongSelect_Unlock_Conditions = TxC(SONGSELECT + "Unlock_Conditions.png");
SongSelect_Favorite = TxC(SONGSELECT + @$"Favorite.png");
SongSelect_High_Score = TxC(SONGSELECT + @$"High_Score.png");
@ -2621,6 +2623,7 @@ namespace TJAPlayer3
SongSelect_Bar_Center,
SongSelect_Bar_Genre_Back,
SongSelect_Bar_Genre_Locked,
SongSelect_Bar_Genre_Locked_Top,
SongSelect_Bar_Genre_Random,
SongSelect_Bar_Genre_RecentryPlaySong,
SongSelect_Level_Number,
@ -2642,6 +2645,7 @@ namespace TJAPlayer3
SongSelect_Song_Number,
SongSelect_BoardNumber,
SongSelect_Difficulty_Cymbol,
SongSelect_Unlock_Conditions,
SongSelect_Tower_Side,
SongSelect_Favorite,

View File

@ -30,7 +30,7 @@ namespace TJAPlayer3
if( ( cスコア != null ) && ( ( !( cスコア.. + cスコア..strBGMファイル名 ).Equals( this.str現在のファイル名 ) || ( this.sound == null ) ) || !this.sound.IsPlaying ) )
{
this.tStopSound();
this.tBGMフェードイン開始();
this.tBGMフェードイン開始();
this.long再生位置 = -1;
if( ( cスコア..strBGMファイル名 != null ) && ( cスコア..strBGMファイル名.Length > 0 ) )
{
@ -163,7 +163,12 @@ namespace TJAPlayer3
private void tプレビューサウンドの作成()
{
Cスコア cスコア = TJAPlayer3.stageSongSelect.r現在選択中のスコア;
if( ( cスコア != null ) && !string.IsNullOrEmpty( cスコア..strBGMファイル名 ) && TJAPlayer3.stageSongSelect.ePhaseID != CStage.EPhase.SongSelect_FadeOutToNowLoading )
var HiddenIndex = TJAPlayer3.Databases.DBSongUnlockables.tGetSongHiddenIndex(TJAPlayer3.stageSongSelect.rNowSelectedSong);
if ( ( cスコア != null )
&& !string.IsNullOrEmpty( cスコア..strBGMファイル名 )
&& TJAPlayer3.stageSongSelect.ePhaseID != CStage.EPhase.SongSelect_FadeOutToNowLoading
&& HiddenIndex != DBSongUnlockables.EHiddenIndex.GRAYED
)
{
string strPreviewFilename = cスコア.. + cスコア..Presound;
try

View File

@ -17,6 +17,8 @@ using Point = System.Drawing.Point;
using Color = System.Drawing.Color;
using RectangleF = System.Drawing.RectangleF;
using SkiaSharp;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using System.Runtime.ExceptionServices;
namespace TJAPlayer3
{
@ -91,7 +93,9 @@ namespace TJAPlayer3
}
}
public void ResetSongIndex()
public TitleTextureKey ttkNowUnlockConditionText = null;
public void ResetSongIndex()
{
nSelectSongIndex = 0;
this.rCurrentlySelectedSong = TJAPlayer3.Songs管理.list曲ルート[nSelectSongIndex];
@ -1142,7 +1146,7 @@ namespace TJAPlayer3
// 描画。
if (this.rCurrentlySelectedSong == null)
{
#region [ Songs not found.]
#region [Songs not found / Enumerating song screens]
//-----------------
if (bIsEnumeratingSongs)
{
@ -1483,10 +1487,19 @@ namespace TJAPlayer3
else if (n見た目の行番号 != barCenterNum)
ResolveTitleTexture(this.stバー情報[nパネル番号].ttkタイトル, TJAPlayer3.Skin.SongSelect_VerticalText).t2D拡大率考慮中央基準描画(
xAnime - Box_X + GetTitleOffsetX(this.stバー情報[nパネル番号].eバー種別), y - Box_Y + GetTitleOffsetY(this.stバー情報[nパネル番号].eバー種別));
#endregion
#endregion
//-----------------
}
var IsSongLocked = TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(stバー情報[nパネル番号].reference);
var HiddenIndex = TJAPlayer3.Databases.DBSongUnlockables.tGetSongHiddenIndex(stバー情報[nパネル番号].reference);
if (HiddenIndex == DBSongUnlockables.EHiddenIndex.GRAYED)
{
TJAPlayer3.Tx.SongSelect_Bar_Genre_Locked_Top?.t2D描画(xAnime - (int)Box_X, y - ((int)Box_Y));
}
//-----------------
}
#endregion
@ -1547,119 +1560,139 @@ namespace TJAPlayer3
if (rCurrentlySelectedSong.eード種別 == CSongListNode.ENodeType.SCORE)
{
#region [ Score ]
#region [ Score ]
#region [ Bar ]
var IsSongLocked = TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(rCurrentlySelectedSong);
var HiddenIndex = TJAPlayer3.Databases.DBSongUnlockables.tGetSongHiddenIndex(rCurrentlySelectedSong);
//int boxType = nStrジャンルtoNum(r現在選択中の曲.strジャンル);
var bar_genre = HGenreBar.tGetGenreBar(rCurrentlySelectedSong.BoxType, TJAPlayer3.Tx.SongSelect_Bar_Genre);
var bar_genre_overlap = HGenreBar.tGetGenreBar(rCurrentlySelectedSong.BoxType, TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap);
#region [ Bar ]
DrawBarCenter(bar_genre, TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, true, false, false);
DrawBarCenter(bar_genre_overlap, TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, false, true, true);
if (HiddenIndex == DBSongUnlockables.EHiddenIndex.GRAYED)
{
DrawBarCenter(TJAPlayer3.Tx.SongSelect_Bar_Genre_Locked, TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, false, false, false);
}
else
{
var bar_genre = HGenreBar.tGetGenreBar(rCurrentlySelectedSong.BoxType, TJAPlayer3.Tx.SongSelect_Bar_Genre);
var bar_genre_overlap = HGenreBar.tGetGenreBar(rCurrentlySelectedSong.BoxType, TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap);
DrawBarCenter(bar_genre, TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, true, false, false);
DrawBarCenter(bar_genre_overlap, TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, false, true, true);
#region [ Crown and ScoreRank ]
// Mark
if (this.rCurrentlySelectedSong.arスコア[(int)Difficulty.Dan] != null)
{
//int[] clear = this.r現在選択中の曲.arスコア[(int)Difficulty.Dan].譜面情報.nクリア;
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
if (i >= 2) continue;
int ap = TJAPlayer3.GetActualPlayer(i);
var TableEntry = TJAPlayer3.SaveFileInstances[ap].data.tGetSongSelectTableEntry(rCurrentlySelectedSong.tGetUniqueId());
int[] clear = TableEntry.ClearStatuses;
int currentRank = Math.Min(clear[(int)Difficulty.Dan], 8) - 3;
int x = TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum] + TJAPlayer3.Skin.SongSelect_DanStatus_Offset_X[i];
int y = TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum] + TJAPlayer3.Skin.SongSelect_DanStatus_Offset_Y[i];
displayDanStatus((int)(x - centerMoveX / 1.1f), (int)(y - centerMove / 1.1f), currentRank, 0.2f);
}
}
else if (this.rCurrentlySelectedSong.arスコア[(int)Difficulty.Tower] != null)
{
//int[] clear = this.r現在選択中の曲.arスコア[(int)Difficulty.Tower].譜面情報.nクリア;
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
if (i >= 2) continue;
int ap = TJAPlayer3.GetActualPlayer(i);
var TableEntry = TJAPlayer3.SaveFileInstances[ap].data.tGetSongSelectTableEntry(rCurrentlySelectedSong.tGetUniqueId());
int[] clear = TableEntry.ClearStatuses;
int currentRank = Math.Min(clear[(int)Difficulty.Tower], 8) - 2;
int x = TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum] + TJAPlayer3.Skin.SongSelect_TowerStatus_Offset_X[i];
int y = TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum] + TJAPlayer3.Skin.SongSelect_TowerStatus_Offset_Y[i];
displayTowerStatus((int)(x - centerMoveX / 1.1f), (int)(y - centerMove / 1.1f), currentRank, 0.3f);
}
}
else if (this.rCurrentlySelectedSong.arスコア[3] != null || this.rCurrentlySelectedSong.arスコア[4] != null)
{
//var sr = this.rCurrentlySelectedSong.arスコア[n現在のアンカ難易度レベルに最も近い難易度レベルを返す(this.rCurrentlySelectedSong)];
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
if (i >= 2) continue;
int ap = TJAPlayer3.GetActualPlayer(i);
var TableEntry = TJAPlayer3.SaveFileInstances[ap].data.tGetSongSelectTableEntry(TJAPlayer3.stageSongSelect.rNowSelectedSong.tGetUniqueId());
int[] = TableEntry.ClearStatuses;
int[] = TableEntry.ScoreRanks;
int x = TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum] + TJAPlayer3.Skin.SongSelect_RegularCrowns_Offset_X[i];
int y = TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum] + TJAPlayer3.Skin.SongSelect_RegularCrowns_Offset_Y[i];
displayRegularCrowns((int)(x - centerMoveX / 1.1f), (int)(y - centerMove / 1.1f), , , 0.8f + BarAnimeCount / 620f);
}
}
#endregion
#region [Favorite status and Locked icon]
if (IsSongLocked)
{
displayVisibleLockStatus(
(int)(TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum] + TJAPlayer3.Skin.SongSelect_FavoriteStatus_Offset[0] - centerMoveX / 1.1f),
(int)(TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum] + TJAPlayer3.Skin.SongSelect_FavoriteStatus_Offset[1] - centerMove / 1.1f), 1f);
}
else
{
displayFavoriteStatus(
(int)(TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum] + TJAPlayer3.Skin.SongSelect_FavoriteStatus_Offset[0] - centerMoveX / 1.1f),
(int)(TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum] + TJAPlayer3.Skin.SongSelect_FavoriteStatus_Offset[1] - centerMove / 1.1f), this.rCurrentlySelectedSong.uniqueId, 1f + BarAnimeCount / 620f);
}
#endregion
#region [Level number big]
tPrintLevelNumberBig(
(int)(TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum] + TJAPlayer3.Skin.SongSelect_Level_Offset[0] - centerMoveX / 1.1f),
(int)(TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum] + TJAPlayer3.Skin.SongSelect_Level_Offset[1] - centerMove / 1.1f),
this.rCurrentlySelectedSong
);
#endregion
}
#endregion
#region [ Crown and ScoreRank ]
// Mark
if (this.rCurrentlySelectedSong.arスコア[(int)Difficulty.Dan] != null)
{
//int[] clear = this.r現在選択中の曲.arスコア[(int)Difficulty.Dan].譜面情報.nクリア;
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
if (i >= 2) continue;
int ap = TJAPlayer3.GetActualPlayer(i);
var TableEntry = TJAPlayer3.SaveFileInstances[ap].data.tGetSongSelectTableEntry(rCurrentlySelectedSong.tGetUniqueId());
int[] clear = TableEntry.ClearStatuses;
int currentRank = Math.Min(clear[(int)Difficulty.Dan], 8) - 3;
int x = TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum] + TJAPlayer3.Skin.SongSelect_DanStatus_Offset_X[i];
int y = TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum] + TJAPlayer3.Skin.SongSelect_DanStatus_Offset_Y[i];
displayDanStatus((int)(x - centerMoveX / 1.1f), (int)(y - centerMove / 1.1f), currentRank, 0.2f);
}
}
else if (this.rCurrentlySelectedSong.arスコア[(int)Difficulty.Tower] != null)
{
//int[] clear = this.r現在選択中の曲.arスコア[(int)Difficulty.Tower].譜面情報.nクリア;
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
if (i >= 2) continue;
int ap = TJAPlayer3.GetActualPlayer(i);
var TableEntry = TJAPlayer3.SaveFileInstances[ap].data.tGetSongSelectTableEntry(rCurrentlySelectedSong.tGetUniqueId());
int[] clear = TableEntry.ClearStatuses;
int currentRank = Math.Min(clear[(int)Difficulty.Tower], 8) - 2;
int x = TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum] + TJAPlayer3.Skin.SongSelect_TowerStatus_Offset_X[i];
int y = TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum] + TJAPlayer3.Skin.SongSelect_TowerStatus_Offset_Y[i];
displayTowerStatus((int)(x - centerMoveX / 1.1f), (int)(y - centerMove / 1.1f), currentRank, 0.3f);
}
}
else if (this.rCurrentlySelectedSong.arスコア[3] != null || this.rCurrentlySelectedSong.arスコア[4] != null)
{
//var sr = this.rCurrentlySelectedSong.arスコア[n現在のアンカ難易度レベルに最も近い難易度レベルを返す(this.rCurrentlySelectedSong)];
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
if (i >= 2) continue;
int ap = TJAPlayer3.GetActualPlayer(i);
var TableEntry = TJAPlayer3.SaveFileInstances[ap].data.tGetSongSelectTableEntry(TJAPlayer3.stageSongSelect.rNowSelectedSong.tGetUniqueId());
int[] = TableEntry.ClearStatuses;
int[] = TableEntry.ScoreRanks;
int x = TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum] + TJAPlayer3.Skin.SongSelect_RegularCrowns_Offset_X[i];
int y = TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum] + TJAPlayer3.Skin.SongSelect_RegularCrowns_Offset_Y[i];
displayRegularCrowns((int)(x - centerMoveX / 1.1f), (int)(y - centerMove / 1.1f), , , 0.8f + BarAnimeCount / 620f);
}
}
#endregion
#region [Favorite status]
displayFavoriteStatus(
(int)(TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum] + TJAPlayer3.Skin.SongSelect_FavoriteStatus_Offset[0] - centerMoveX / 1.1f),
(int)(TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum] + TJAPlayer3.Skin.SongSelect_FavoriteStatus_Offset[1] - centerMove / 1.1f), this.rCurrentlySelectedSong.uniqueId, 1f + BarAnimeCount / 620f);
#endregion
#region [Level number big]
tPrintLevelNumberBig(
(int)(TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum] + TJAPlayer3.Skin.SongSelect_Level_Offset[0] - centerMoveX / 1.1f),
(int)(TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum] + TJAPlayer3.Skin.SongSelect_Level_Offset[1] - centerMove / 1.1f),
this.rCurrentlySelectedSong
);
#endregion
#endregion
}
}
if (rCurrentlySelectedSong.eード種別 == CSongListNode.ENodeType.BOX)
{
#region [ Box ]
//int boxType = nStrジャンルtoNum(r現在選択中の曲.strジャンル);
var bar_genre = HGenreBar.tGetGenreBar(rCurrentlySelectedSong.BoxType, TJAPlayer3.Tx.SongSelect_Bar_Genre);
var bar_genre = HGenreBar.tGetGenreBar(rCurrentlySelectedSong.BoxType, TJAPlayer3.Tx.SongSelect_Bar_Genre); // Box
var bar_genre_overlap = HGenreBar.tGetGenreBar(rCurrentlySelectedSong.BoxType, TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap);
//DrawBarCenter(TJAPlayer3.Tx.SongSelect_Bar_Genre[boxType], TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, true, true, false);
@ -1693,7 +1726,12 @@ namespace TJAPlayer3
{
case CSongListNode.ENodeType.SCORE:
{
if (TJAPlayer3.Tx.SongSelect_Frame_Score != null)
var IsSongLocked = TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(rCurrentlySelectedSong);
var HiddenIndex = TJAPlayer3.Databases.DBSongUnlockables.tGetSongHiddenIndex(rCurrentlySelectedSong);
#region [Difficulty bars]
if (TJAPlayer3.Tx.SongSelect_Frame_Score != null && HiddenIndex != DBSongUnlockables.EHiddenIndex.GRAYED)
{
// 難易度がTower、Danではない
if (TJAPlayer3.stageSongSelect.n現在選択中の曲の難易度 != (int)Difficulty.Tower && TJAPlayer3.stageSongSelect.n現在選択中の曲の難易度 != (int)Difficulty.Dan)
@ -1937,12 +1975,16 @@ namespace TJAPlayer3
}
}
}
break;
#endregion
}
break;
case CSongListNode.ENodeType.BOX:
{
for (int j = 0; j < 3; j++)
#region [Box explanation]
for (int j = 0; j < 3; j++)
{
if (!ctBoxOpen.IsEnded && ctBoxOpen.CurrentValue != 0)
{
@ -1960,9 +2002,11 @@ namespace TJAPlayer3
this.txBoxText[j].t2D拡大率考慮中央基準描画(TJAPlayer3.Skin.SongSelect_BoxExplanation_X, TJAPlayer3.Skin.SongSelect_BoxExplanation_Y + j * TJAPlayer3.Skin.SongSelect_BoxExplanation_Interval);
}
// Chara here
#endregion
var box_chara = HGenreBar.tGetGenreBar(rCurrentlySelectedSong.BoxChara, TJAPlayer3.Tx.SongSelect_Box_Chara);
#region [Box chara]
var box_chara = HGenreBar.tGetGenreBar(rCurrentlySelectedSong.BoxChara, TJAPlayer3.Tx.SongSelect_Box_Chara);
// If BoxChara < 0, don't display any character
{
@ -1985,6 +2029,8 @@ namespace TJAPlayer3
new Rectangle(box_chara.szTextureSize.Width / 2, 0,
box_chara.szTextureSize.Width / 2, box_chara.szTextureSize.Height));
}
#endregion
}
break;
@ -2054,7 +2100,7 @@ namespace TJAPlayer3
// (A) スクロールが停止しているときの選択曲バーの描画。
#region [ ]
#region [ Nastiest Song Title display method I ever saw]
// Fonts here
@ -2127,9 +2173,18 @@ namespace TJAPlayer3
(rCurrentlySelectedSong.eード種別 != CSongListNode.ENodeType.BACKBOX ? (rCurrentlySelectedSong.eード種別 == CSongListNode.ENodeType.BOX ? centerMove : centerMove / 1.1f) : 0));
}
}
//-----------------
#endregion
}
//-----------------
#endregion
var IsSongLocked = TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(rCurrentlySelectedSong);
var HiddenIndex = TJAPlayer3.Databases.DBSongUnlockables.tGetSongHiddenIndex(rCurrentlySelectedSong);
if (HiddenIndex == DBSongUnlockables.EHiddenIndex.GRAYED)
{
DrawBarCenter(TJAPlayer3.Tx.SongSelect_Bar_Genre_Locked_Top, TJAPlayer3.Skin.SongSelect_Bar_X[barCenterNum], TJAPlayer3.Skin.SongSelect_Bar_Y[barCenterNum], centerMoveX, centerMove, false, false, false);
//TJAPlayer3.Tx.SongSelect_Bar_Genre_Locked_Top?.t2D描画();
}
}
}
//-----------------
@ -2761,7 +2816,21 @@ namespace TJAPlayer3
}
nSelectSongIndex = index;
rCurrentlySelectedSong = list[index];
}
var IsSongLocked = TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(rCurrentlySelectedSong);
if (IsSongLocked)
{
var SongUnlockable = TJAPlayer3.Databases.DBSongUnlockables.tGetUnlockableByUniqueId(rCurrentlySelectedSong);
if (SongUnlockable != null)
{
string _cond = "???";
if (HRarity.tRarityToModalInt(SongUnlockable.rarity)
< HRarity.tRarityToModalInt("Epic"))
_cond = SongUnlockable.unlockConditions.tConditionMessage();
this.ttkNowUnlockConditionText = new TitleTextureKey(_cond, this.pfBoxText, Color.White, Color.Black, 1000);
}
}
}
public CSongListNode rGetSideSong(int change)
{
if (rCurrentlySelectedSong == null) return null;
@ -2781,7 +2850,9 @@ namespace TJAPlayer3
index += list.Count;
}
return list[index];
var _sideNode = list[index];
return _sideNode;
}
public void tバーの初期化()
@ -2880,7 +2951,11 @@ namespace TJAPlayer3
if (x >= SampleFramework.GameWindowSize.Width || y >= SampleFramework.GameWindowSize.Height)
return;
var rc = new Rectangle(0, 48, 128, 48);
var IsSongLocked = TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(reference);
var HiddenIndex = TJAPlayer3.Databases.DBSongUnlockables.tGetSongHiddenIndex(reference);
var rc = new Rectangle(0, 48, 128, 48);
int opct = 255;
@ -2931,11 +3006,17 @@ namespace TJAPlayer3
}
else if (eバー種別 != Eバー種別.BackBox)
{
HGenreBar.tGetGenreBar(boxType, TJAPlayer3.Tx.SongSelect_Bar_Genre)?.t2D描画(x, y);
HGenreBar.tGetGenreBar(boxType, TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap)?.t2D描画(x, y);
if (TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlay != null)
TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlay.t2D描画(x, y);
if (HiddenIndex == DBSongUnlockables.EHiddenIndex.GRAYED)
{
TJAPlayer3.Tx.SongSelect_Bar_Genre_Locked?.t2D描画(x, y);
return;
}
else
{
HGenreBar.tGetGenreBar(boxType, TJAPlayer3.Tx.SongSelect_Bar_Genre)?.t2D描画(x, y);
HGenreBar.tGetGenreBar(boxType, TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlap)?.t2D描画(x, y);
TJAPlayer3.Tx.SongSelect_Bar_Genre_Overlay?.t2D描画(x, y);
}
}
else
{
@ -2978,12 +3059,20 @@ namespace TJAPlayer3
}
}
displayFavoriteStatus(x + TJAPlayer3.Skin.SongSelect_FavoriteStatus_Offset[0], y + TJAPlayer3.Skin.SongSelect_FavoriteStatus_Offset[1], csu, 1f);
if (IsSongLocked)
{
displayVisibleLockStatus(x + TJAPlayer3.Skin.SongSelect_FavoriteStatus_Offset[0], y + TJAPlayer3.Skin.SongSelect_FavoriteStatus_Offset[1], 1f);
}
else
{
displayFavoriteStatus(x + TJAPlayer3.Skin.SongSelect_FavoriteStatus_Offset[0], y + TJAPlayer3.Skin.SongSelect_FavoriteStatus_Offset[1], csu, 1f);
}
tPrintLevelNumberBig(
x + TJAPlayer3.Skin.SongSelect_Level_Offset[0],
y + TJAPlayer3.Skin.SongSelect_Level_Offset[1],
reference
);
x + TJAPlayer3.Skin.SongSelect_Level_Offset[0],
y + TJAPlayer3.Skin.SongSelect_Level_Offset[1],
reference
);
}
}
@ -3104,6 +3193,16 @@ namespace TJAPlayer3
}
}
public void displayVisibleLockStatus(int x, int y, float _resize)
{
if (TJAPlayer3.Tx.SongSelect_Lock != null)
{
TJAPlayer3.Tx.SongSelect_Lock.vcScaleRatio.X = _resize;
TJAPlayer3.Tx.SongSelect_Lock.vcScaleRatio.Y = _resize;
TJAPlayer3.Tx.SongSelect_Lock.t2D拡大率考慮中央基準描画(x, y);
}
}
public int nStrジャンルtoNum(string strジャンル)
{
return this.nStrジャンルtoNumBox(strジャンル);

View File

@ -7,6 +7,7 @@ using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using DiscordRPC;
using static System.Runtime.InteropServices.JavaScript.JSType;
namespace TJAPlayer3
{
@ -472,6 +473,9 @@ namespace TJAPlayer3
if (this.rNowSelectedSong != null)
{
#region [Background]
nGenreBack = this.NowBg;
nOldGenreBack = this.OldBg;
@ -509,18 +513,36 @@ namespace TJAPlayer3
}
}
#endregion
#region [Song Panel]
if (this.rNowSelectedSong.eード種別 == CSongListNode.ENodeType.BOX)
{
TJAPlayer3.Tx.SongSelect_Song_Panel[0]?.t2D描画(0, 0);
// To do: Add unlocked songs / all songs count
}
else if (this.rNowSelectedSong.eード種別 == CSongListNode.ENodeType.SCORE)
{
if (TJAPlayer3.stageSongSelect.n現在選択中の曲の難易度 == (int)Difficulty.Dan)
TJAPlayer3.Tx.SongSelect_Song_Panel[2]?.t2D描画(0, 0);
else if (TJAPlayer3.stageSongSelect.n現在選択中の曲の難易度 == (int)Difficulty.Tower)
TJAPlayer3.Tx.SongSelect_Song_Panel[3]?.t2D描画(0, 0);
var IsSongLocked = TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(this.rNowSelectedSong);
var HiddenIndex = TJAPlayer3.Databases.DBSongUnlockables.tGetSongHiddenIndex(this.rNowSelectedSong);
if (HiddenIndex == DBSongUnlockables.EHiddenIndex.GRAYED)
{
TJAPlayer3.Tx.SongSelect_Song_Panel[4]?.t2D描画(0, 0);
}
else
TJAPlayer3.Tx.SongSelect_Song_Panel[1]?.t2D描画(0, 0);
{
if (TJAPlayer3.stageSongSelect.n現在選択中の曲の難易度 == (int)Difficulty.Dan)
TJAPlayer3.Tx.SongSelect_Song_Panel[2]?.t2D描画(0, 0);
else if (TJAPlayer3.stageSongSelect.n現在選択中の曲の難易度 == (int)Difficulty.Tower)
TJAPlayer3.Tx.SongSelect_Song_Panel[3]?.t2D描画(0, 0);
else
TJAPlayer3.Tx.SongSelect_Song_Panel[1]?.t2D描画(0, 0);
}
}
#endregion
}
this.actSongList.Draw();
@ -537,6 +559,7 @@ namespace TJAPlayer3
tTimerDraw(100 - ctTimer.CurrentValue);
#region [Song Info]
if (this.rNowSelectedSong != null)
{
@ -545,39 +568,41 @@ namespace TJAPlayer3
}
else if (this.rNowSelectedSong.eード種別 == CSongListNode.ENodeType.SCORE)
{
actSongInfo.Draw();
var IsSongLocked = TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(this.rNowSelectedSong);
var HiddenIndex = TJAPlayer3.Databases.DBSongUnlockables.tGetSongHiddenIndex(this.rNowSelectedSong);
if (TJAPlayer3.stageSongSelect.n現在選択中の曲の難易度 == (int)Difficulty.Dan)
if (HiddenIndex != DBSongUnlockables.EHiddenIndex.GRAYED)
{
actDanInfo.Draw();
}
else if (TJAPlayer3.stageSongSelect.n現在選択中の曲の難易度 == (int)Difficulty.Tower)
{
actTowerInfo.Draw();
}
else
{
}
actSongInfo.Draw();
if (TJAPlayer3.stageSongSelect.n現在選択中の曲の難易度 == (int)Difficulty.Dan)
{
actDanInfo.Draw();
}
else if (TJAPlayer3.stageSongSelect.n現在選択中の曲の難易度 == (int)Difficulty.Tower)
{
actTowerInfo.Draw();
}
else
{
}
}
}
}
#endregion
tSongNumberDraw(TJAPlayer3.Skin.SongSelect_SongNumber_X[0], TJAPlayer3.Skin.SongSelect_SongNumber_Y[0], NowSong);
tSongNumberDraw(TJAPlayer3.Skin.SongSelect_SongNumber_X[1], TJAPlayer3.Skin.SongSelect_SongNumber_Y[1], MaxSong);
this.actInformation.Draw();
#region[ ]
#region[Modicons]
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
ModIcons.tDisplayModsMenu(TJAPlayer3.Skin.SongSelect_ModIcons_X[i], TJAPlayer3.Skin.SongSelect_ModIcons_Y[i], i);
}
if (TJAPlayer3.ConfigIni.bTokkunMode)
TJAPlayer3.actTextConsole.tPrint(0, 0, CTextConsole.EFontType.White, "GAME: TRAINING MODE");
if (TJAPlayer3.ConfigIni.eGameMode == EGame.)
@ -589,10 +614,32 @@ namespace TJAPlayer3
#endregion
#region [Preimage, upper lock layer and unlock conditions]
if (this.rNowSelectedSong != null
&& this.rNowSelectedSong.eード種別 == CSongListNode.ENodeType.SCORE
&& (this.actDifficultySelectionScreen.bIsDifficltSelect == false || this.actSongList.ctDifficultyIn.CurrentValue < 1000))
this.actPreimageパネル.Draw();
&& this.rNowSelectedSong.eード種別 == CSongListNode.ENodeType.SCORE)
{
var IsSongLocked = TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(this.rNowSelectedSong);
var HiddenIndex = TJAPlayer3.Databases.DBSongUnlockables.tGetSongHiddenIndex(this.rNowSelectedSong);
if (this.actDifficultySelectionScreen.bIsDifficltSelect == false || this.actSongList.ctDifficultyIn.CurrentValue < 1000)
this.actPreimageパネル.Draw();
if (HiddenIndex == DBSongUnlockables.EHiddenIndex.GRAYED)
TJAPlayer3.Tx.SongSelect_Song_Panel[5]?.t2D描画(0, 0);
if (IsSongLocked)
{
TJAPlayer3.Tx.SongSelect_Unlock_Conditions?.t2D描画(0, 0);
if (actSongList.ttkNowUnlockConditionText != null)
{
actSongList.ResolveTitleTexture(actSongList.ttkNowUnlockConditionText)?.t2D描画(TJAPlayer3.Skin.SongSelect_Unlock_Conditions_Text[0], TJAPlayer3.Skin.SongSelect_Unlock_Conditions_Text[1]);
}
}
}
#endregion
this.actPresound.Draw();
@ -929,32 +976,11 @@ namespace TJAPlayer3
#region [ F5 ]
if (TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.F5))
{
// Deprecated, to delete
TJAPlayer3.Skin.soundChangeSFX.tPlay();
CUtility.ToggleBoolian(ref TJAPlayer3.ConfigIni.bSuperHard);
}
#endregion
#region [ F6 SCROLL ]
if (TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.F6))
{
/*
TJAPlayer3.Skin.sound変更音.t再生する();
TJAPlayer3.ConfigIni.bスクロールモードを上書き = true;
switch ((int)TJAPlayer3.ConfigIni.eScrollMode)
{
case 0:
TJAPlayer3.ConfigIni.eScrollMode = EScrollMode.BMSCROLL;
break;
case 1:
TJAPlayer3.ConfigIni.eScrollMode = EScrollMode.HBSCROLL;
break;
case 2:
TJAPlayer3.ConfigIni.eScrollMode = EScrollMode.Normal;
TJAPlayer3.ConfigIni.bスクロールモードを上書き = false;
break;
}
*/
}
#endregion
#region [ F7 TokkunMode ]
if (TJAPlayer3.ConfigIni.KeyAssign.KeyIsPressed(TJAPlayer3.ConfigIni.KeyAssign.System.ToggleTrainingMode))
{
@ -965,18 +991,6 @@ namespace TJAPlayer3
}
}
#endregion
#region [ F8 ]
if (TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.F8))
{
/*
if (TJAPlayer3.Skin.sound曲決定音.b読み込み成功)
TJAPlayer3.Skin.sound曲決定音.t再生する();
else
TJAPlayer3.Skin.sound決定音.t再生する();
this.t曲をランダム選択する();
*/
}
#endregion
#region [ F9 ]
if (TJAPlayer3.ConfigIni.KeyAssign.KeyIsPressed(TJAPlayer3.ConfigIni.KeyAssign.System.NewHeya))
{
@ -1002,36 +1016,44 @@ namespace TJAPlayer3
{
case CSongListNode.ENodeType.SCORE:
{
// Maybe auxilliary don select here too ?
var IsSongLocked = TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(this.rNowSelectedSong);
if (this.n現在選択中の曲の難易度 >= (int)Difficulty.Tower)
if (IsSongLocked)
{
if (TJAPlayer3.ConfigIni.nPlayerCount == 1 && !TJAPlayer3.ConfigIni.bTokkunMode)
{
// Init tower variables
if (this.n現在選択中の曲の難易度 == (int)Difficulty.Tower)
CFloorManagement.reinitialize(this.rNowSelectedSong.arスコア[(int)Difficulty.Tower]..nLife);
TJAPlayer3.Skin.soundDecideSFX.tPlay();
TJAPlayer3.Skin.voiceMenuSongDecide[TJAPlayer3.SaveFile]?.tPlay();
this.t曲を選択する();
}
else
{
TJAPlayer3.Skin.soundError.tPlay();
}
// Handle the Coins Menu unlock condition here
TJAPlayer3.Skin.soundError.tPlay();
}
else
{
// Called here
TJAPlayer3.Skin.soundDecideSFX.tPlay();
this.actDifficultySelectionScreen.bIsDifficltSelect = true;
this.actDifficultySelectionScreen.t選択画面初期化();
this.actSongList.ctBarFlash.Start(0, 2700, TJAPlayer3.Skin.SongSelect_Box_Opening_Interval, TJAPlayer3.Timer);
this.actSongList.ctDifficultyIn.Start(0, 3200, TJAPlayer3.Skin.SongSelect_Box_Opening_Interval, TJAPlayer3.Timer);
//this.ctChara_Select.t開始(0, TJAPlayer3.Tx.SongSelect_Chara_Select.Length - 1, 1000 / 45, TJAPlayer3.Timer);
CMenuCharacter.tMenuResetTimer(CMenuCharacter.ECharacterAnimation.SELECT);
if (this.n現在選択中の曲の難易度 >= (int)Difficulty.Tower)
{
if (TJAPlayer3.ConfigIni.nPlayerCount == 1 && !TJAPlayer3.ConfigIni.bTokkunMode)
{
// Init tower variables
if (this.n現在選択中の曲の難易度 == (int)Difficulty.Tower)
CFloorManagement.reinitialize(this.rNowSelectedSong.arスコア[(int)Difficulty.Tower]..nLife);
TJAPlayer3.Skin.soundDecideSFX.tPlay();
TJAPlayer3.Skin.voiceMenuSongDecide[TJAPlayer3.SaveFile]?.tPlay();
this.t曲を選択する();
}
else
{
TJAPlayer3.Skin.soundError.tPlay();
}
}
else
{
// Called here
TJAPlayer3.Skin.soundDecideSFX.tPlay();
this.actDifficultySelectionScreen.bIsDifficltSelect = true;
this.actDifficultySelectionScreen.t選択画面初期化();
this.actSongList.ctBarFlash.Start(0, 2700, TJAPlayer3.Skin.SongSelect_Box_Opening_Interval, TJAPlayer3.Timer);
this.actSongList.ctDifficultyIn.Start(0, 3200, TJAPlayer3.Skin.SongSelect_Box_Opening_Interval, TJAPlayer3.Timer);
//this.ctChara_Select.t開始(0, TJAPlayer3.Tx.SongSelect_Chara_Select.Length - 1, 1000 / 45, TJAPlayer3.Timer);
CMenuCharacter.tMenuResetTimer(CMenuCharacter.ECharacterAnimation.SELECT);
}
}
}
break;
@ -1124,7 +1146,9 @@ namespace TJAPlayer3
if (!this.bCurrentlyScrolling)
{
if (TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.LeftControl))
var IsSongLocked = TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(this.rNowSelectedSong);
if (TJAPlayer3.InputManager.Keyboard.KeyPressed((int)SlimDXKeys.Key.LeftControl) && !IsSongLocked)
{
CSongUniqueID csu = this.rNowSelectedSong.uniqueId;
@ -1720,138 +1744,6 @@ namespace TJAPlayer3
return baseDiff;
}
private void tSelectSongRandomly()
{
var usedDiffs = new int[] { -1, -1, -1, -1, -1 };
var mandatoryDiffs = new List<int>();
#region [Fetch context informations]
if (this.actSongList.latestContext == eMenuContext.Random)
{
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
var diff = this.actSongList.tMenuContextGetVar(i);
usedDiffs[i] = diff;
if (!mandatoryDiffs.Contains(diff))
mandatoryDiffs.Add(diff);
}
}
#endregion
CSongListNode song = this.actSongList.rCurrentlySelectedSong;
song.stackランダム演奏番号.Clear();
song.listランダム用ードリスト = null;
if ((song.stackランダム演奏番号.Count == 0) || (song.listランダム用ードリスト == null))
{
if (song.listランダム用ードリスト == null)
{
song.listランダム用ードリスト = this.t指定された曲が存在する場所の曲を列挙する_子リスト含む(song, ref mandatoryDiffs);
}
int count = song.listランダム用ードリスト.Count;
if (count == 0)
{
return;
}
int[] numArray = new int[count];
for (int i = 0; i < count; i++)
{
numArray[i] = i;
}
for (int j = 0; j < (count * 1.5); j++)
{
int index = TJAPlayer3.Random.Next(count);
int num5 = TJAPlayer3.Random.Next(count);
int num6 = numArray[num5];
numArray[num5] = numArray[index];
numArray[index] = num6;
}
for (int k = 0; k < count; k++)
{
song.stackランダム演奏番号.Push(numArray[k]);
}
if (TJAPlayer3.ConfigIni.bLogDTX詳細ログ出力)
{
StringBuilder builder = new StringBuilder(0x400);
builder.Append(string.Format("ランダムインデックスリストを作成しました: {0}曲: ", song.stackランダム演奏番号.Count));
for (int m = 0; m < count; m++)
{
builder.Append(string.Format("{0} ", numArray[m]));
}
Trace.TraceInformation(builder.ToString());
}
}
// Third assignment
this.rChoosenSong = song.listランダム用ードリスト[song.stackランダム演奏番号.Pop()];
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
this.nChoosenSongDifficulty[i] = tGetRandomSongDifficulty(usedDiffs[i]);
if (TJAPlayer3.ConfigIni.bAIBattleMode)
{
TJAPlayer3.Skin.voiceMenuSongDecide_AI[TJAPlayer3.GetActualPlayer(i)]?.tPlay();
}
else
{
TJAPlayer3.Skin.voiceMenuSongDecide[TJAPlayer3.GetActualPlayer(i)]?.tPlay();
}
}
/*
this.n確定された曲の難易度[0] = this.act曲リスト.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(this.r確定された曲);
TJAPlayer3.Skin.voiceMenuSongDecide[TJAPlayer3.SaveFile]?.t再生する();
if (TJAPlayer3.ConfigIni.nPlayerCount > 1)
{
this.n確定された曲の難易度[1] = this.act曲リスト.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(this.r確定された曲);
TJAPlayer3.Skin.voiceMenuSongDecide[TJAPlayer3.GetActualPlayer(1)]?.t再生する();
}
*/
this.r確定されたスコア = this.rChoosenSong.arスコア[this.actSongList.n現在のアンカ難易度レベルに最も近い難易度レベルを返す(this.rChoosenSong)];
this.str確定された曲のジャンル = this.rChoosenSong.strジャンル;
//TJAPlayer3.Skin.sound曲決定音.t再生する();
this.eフェードアウト完了時の戻り値 = E戻り値.;
this.actFOtoNowLoading.tフェードアウト開始(); // #27787 2012.3.10 yyagi 曲決定時の画面フェードアウトの省略
base.ePhaseID = CStage.EPhase.SongSelect_FadeOutToNowLoading;
#region [Log]
if (TJAPlayer3.ConfigIni.bLogDTX詳細ログ出力)
{
int[] numArray2 = song.stackランダム演奏番号.ToArray();
StringBuilder builder2 = new StringBuilder(0x400);
builder2.Append("ランダムインデックスリスト残り: ");
if (numArray2.Length > 0)
{
for (int n = 0; n < numArray2.Length; n++)
{
builder2.Append(string.Format("{0} ", numArray2[n]));
}
}
else
{
builder2.Append("(なし)");
}
Trace.TraceInformation(builder2.ToString());
}
#endregion
CSongSelectSongManager.stopSong();
}
private void tSetSongRandomly()
{
var usedDiffs = new int[] { -1, -1, -1, -1, -1 };
@ -1884,6 +1776,7 @@ namespace TJAPlayer3
song.listランダム用ードリスト = this.t指定された曲が存在する場所の曲を列挙する_子リスト含む(song, ref mandatoryDiffs);
}
int count = song.listランダム用ードリスト.Count;
if (count == 0)
{
return;
@ -1993,7 +1886,8 @@ namespace TJAPlayer3
}
}
if (requiredDiffsExist == true)
var IsSongLocked = TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(c曲リストード);
if (requiredDiffsExist == true && IsSongLocked == false)
{
list.Add(c曲リストード);
}
@ -2037,7 +1931,8 @@ namespace TJAPlayer3
}
}
if (requiredDiffsExist == true)
var IsSongLocked = TJAPlayer3.Databases.DBSongUnlockables.tIsSongLocked(c曲リストード);
if (requiredDiffsExist == true && IsSongLocked == false)
{
list.Add(c曲リストード);
}

View File

@ -669,6 +669,7 @@ namespace TJAPlayer3
// Check unlockables
{
TJAPlayer3.Databases.DBNameplateUnlockables.tGetUnlockedItems(i, mqModals);
TJAPlayer3.Databases.DBSongUnlockables.tGetUnlockedItems(i, mqModals);
foreach (var puchi in TJAPlayer3.Tx.Puchichara)
{