1
0
mirror of synced 2024-11-24 15:40:22 +01:00

Coins modal text and SFXs + fix Dan and Tower result screen BGMs not being looped

This commit is contained in:
0aubsq 2022-03-07 16:05:35 +01:00
parent 4529305add
commit 26e700c288
8 changed files with 179 additions and 13 deletions

View File

@ -365,6 +365,8 @@ namespace TJAPlayer3
public Cシステムサウンド soundHeyaBGM = null;
public Cシステムサウンド[] soundModal = null;
public Cシステムサウンド soundCrownIn = null;
public Cシステムサウンド soundRankIn = null;
public Cシステムサウンド soundDonClear = null;
@ -714,9 +716,10 @@ namespace TJAPlayer3
this.bgmリザルトイン音 = new Cシステムサウンド(@"Sounds\BGM\Result_In.ogg", false, false, true, ESoundGroup.SongPlayback);
this.bgmリザルト音 = new Cシステムサウンド(@"Sounds\BGM\Result.ogg", true, false, true, ESoundGroup.SongPlayback);
this.bgmDanResult = new Cシステムサウンド(@"Sounds\Dan\Dan_Result.ogg", false, false, true, ESoundGroup.SongPlayback);
this.bgmDanResult = new Cシステムサウンド(@"Sounds\Dan\Dan_Result.ogg", true, false, false, ESoundGroup.SongPlayback);
this.bgmTowerResult = new Cシステムサウンド(@"Sounds\Tower\Tower_Result.ogg", true, false, false, ESoundGroup.SongPlayback);
this.bgmTowerResult = new Cシステムサウンド(@"Sounds\Tower\Tower_Result.ogg", false, false, true, ESoundGroup.SongPlayback);
this.soundTowerMiss = new Cシステムサウンド(@"Sounds\Tower\Miss.wav", false, false, true, ESoundGroup.SoundEffect);
this.soundCrownIn = new Cシステムサウンド(@"Sounds\ResultScreen\CrownIn.ogg", false, false, false, ESoundGroup.SoundEffect);
@ -743,6 +746,14 @@ namespace TJAPlayer3
this.soundDanSongSelect = new Cシステムサウンド(@"Sounds\Dan\DanSongSelect.wav", false, false, false, ESoundGroup.SoundEffect);
this.soundHeyaBGM = new Cシステムサウンド(@"Sounds\Heya\BGM.ogg", true, false, false, ESoundGroup.SongPlayback);
soundModal = new Cシステムサウンド[6];
for (int i = 0; i < soundModal.Length - 1; i++)
{
soundModal[i] = new Cシステムサウンド(@"Sounds\Modals\" + i.ToString() + ".ogg", false, false, false, ESoundGroup.SoundEffect);
}
soundModal[soundModal.Length - 1] = new Cシステムサウンド(@"Sounds\Modals\Coin.ogg", false, false, false, ESoundGroup.SoundEffect);
ReloadSkin();
tReadSkinConfig();
}

View File

@ -5,6 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using FDK;
using System.Drawing;
using static TJAPlayer3.CActSelect曲リスト;
namespace TJAPlayer3
{
@ -45,6 +46,8 @@ namespace TJAPlayer3
: 640,
720);
tGenerateTextures();
_isSet = true;
}
@ -53,25 +56,75 @@ namespace TJAPlayer3
if (_isSet == true)
{
_box?.t2D描画(TJAPlayer3.app.Device, 640 * player, 0, _boxRect);
Point[] Pos = new Point[]
{
(modalFormat == EModalFormat.Full) ? new Point(640, 140) : new Point(320 + 640 * player, 290), // title
(modalFormat == EModalFormat.Full) ? new Point(640, tTextCentered() ? 445 : 327) : new Point(320 + 640 * player, tTextCentered() ? 442 : 383), // content
};
_ModalTitle?.t2D中心基準描画(TJAPlayer3.app.Device, Pos[0].X, Pos[0].Y);
_ModalText?.t2D中心基準描画(TJAPlayer3.app.Device, Pos[1].X, Pos[1].Y);
// Extra texture for Puchichara, Character and Titles next
}
}
public enum EModalType
public void tPlayModalSfx()
{
Coin,
Puchichara,
Character,
Title,
Text,
Confirm,
if (modalType == EModalType.Coin)
TJAPlayer3.Skin.soundModal[TJAPlayer3.Skin.soundModal.Length - 1].t再生する();
else
TJAPlayer3.Skin.soundModal[Math.Max(0, Math.Min(TJAPlayer3.Skin.soundModal.Length - 2, rarity))].t再生する();
}
public static void tInitModalFonts()
{
if (_pfModalContentHalf != null
&& _pfModalTitleHalf != null
&& _pfModalContentFull != null
&& _pfModalTitleFull != null)
return;
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
{
_pfModalContentHalf = new CPrivateFastFont(new FontFamily(TJAPlayer3.ConfigIni.FontName), 28);
_pfModalTitleHalf = new CPrivateFastFont(new FontFamily(TJAPlayer3.ConfigIni.FontName), 28);
_pfModalContentFull = new CPrivateFastFont(new FontFamily(TJAPlayer3.ConfigIni.FontName), 56);
_pfModalTitleFull = new CPrivateFastFont(new FontFamily(TJAPlayer3.ConfigIni.FontName), 56);
}
else
{
_pfModalContentHalf = new CPrivateFastFont(new FontFamily("MS UI Gothic"), 28);
_pfModalTitleHalf = new CPrivateFastFont(new FontFamily("MS UI Gothic"), 28);
_pfModalContentFull = new CPrivateFastFont(new FontFamily("MS UI Gothic"), 56);
_pfModalTitleFull = new CPrivateFastFont(new FontFamily("MS UI Gothic"), 56);
}
}
#region [Enum definitions]
public enum EModalType
{
Coin = 0,
Puchichara = 1,
Character = 2,
Title = 3,
Text = 4,
Confirm = 5,
}
// Full : 1P standard modal, Half : Splitted screen modal
public enum EModalFormat
{
Full,
Half,
}
#endregion
#region [Public variables]
// Coin number for coin; database/unlockable asset for puchichara, character and title; no effect on text, confirm
public int reference;
@ -82,9 +135,68 @@ namespace TJAPlayer3
// For modalFormat = Half only
public int player;
#endregion
#region [private]
// 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)
return true;
return false;
}
// Generate the modal title and content text textures
private void tGenerateTextures()
{
TitleTextureKey _title = new TitleTextureKey(
CLangManager.LangInstance.GetString(300 + (int)modalType),
(modalFormat == EModalFormat.Full)
? _pfModalTitleFull
: _pfModalTitleHalf,
Color.White,
Color.Black,
700);
string content = "";
if (modalType == EModalType.Coin)
{
content = String.Format("+{0} {1} ({2}: {3})",
reference,
CLangManager.LangInstance.GetString(306),
CLangManager.LangInstance.GetString(307),
TJAPlayer3.NamePlateConfig.data.Medals[player]
);
}
TitleTextureKey _content = new TitleTextureKey(
content,
(modalFormat == EModalFormat.Full)
? _pfModalContentFull
: _pfModalContentHalf,
Color.White,
Color.Black,
700);
_ModalText = TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(_content);
_ModalTitle = TJAPlayer3.stage選曲.act曲リスト.ResolveTitleTexture(_title);
}
private CTexture _box;
private Rectangle _boxRect;
private bool _isSet;
private static CPrivateFastFont _pfModalTitleHalf;
private static CPrivateFastFont _pfModalContentHalf;
private static CPrivateFastFont _pfModalTitleFull;
private static CPrivateFastFont _pfModalContentFull;
private CTexture _ModalTitle;
private CTexture _ModalText;
#endregion
}
}

View File

@ -2082,6 +2082,9 @@ for (int i = 0; i < 3; i++) {
this.Window.EnableSystemMenu = TJAPlayer3.ConfigIni.bIsEnabledSystemMenu; // #28200 2011.5.1 yyagi
// 2012.8.22 Config.iniが無いときに初期値が適用されるよう、この設定行をifブロック外に移動
// Init Modal fonts once config.ini parsing is done
Modal.tInitModalFonts();
//---------------------
#endregion
#region [ ]

View File

@ -246,6 +246,15 @@ namespace TJAPlayer3
[202] = "Play recently played songs !",
[203] = "Random song",
[300] = "Coins got !",
[301] = "Character got !",
[302] = "Puchichara got !",
[303] = "Title got !",
[304] = "Notice",
[305] = "Confirm",
[306] = "Coins",
[307] = "Total",
[1000] = "Reached floor",
[1001] = "F",
[1002] = "P",

View File

@ -237,6 +237,15 @@ namespace TJAPlayer3
[202] = "Rejouez les sons joués précedement !",
[203] = "Surprend moi !",
[300] = "Jetons obtenus !",
[301] = "Personnage obtenu !",
[302] = "Petit personnage obtenu !",
[303] = "Titre obtenu !",
[304] = "Notification",
[305] = "Confirmation",
[306] = "Jetons",
[307] = "Total",
[1000] = "Étage atteint",
[1001] = "",
[1002] = "P",
@ -260,9 +269,9 @@ namespace TJAPlayer3
[90000] = "[ERREUR] Condition invalide",
[90001] = "L'article n'est disponible que dans le Magasin.",
[90002] = "Prix en pièces : ",
[90002] = "Prix en jetons : ",
[90003] = "Article acheté !",
[90004] = "Nombre de pièces insuffisant !",
[90004] = "Nombre de jetons insuffisant !",
[90005] = "La condition suivante : ",
[900] = "Reprendre",

View File

@ -301,6 +301,15 @@ namespace TJAPlayer3
[202] = "最近あそんだ曲を集めたよ!",
[203] = "おまかせ",
[300] = "コイン取得!",
[301] = "キャラクター取得!",
[302] = "プチキャラ取得!",
[303] = "タイトル取得!",
[304] = "注目",
[305] = "確認",
[306] = "コイン",
[307] = "累計",
[1000] = "到達階数",
[1001] = "階",
[1002] = "点",

View File

@ -1473,6 +1473,7 @@ namespace TJAPlayer3
)
{
displayedModals[0] = mqModals.tPopModal(0);
displayedModals[0]?.tPlayModalSfx();
}
else if (TJAPlayer3.ConfigIni.nPlayerCount == 1 || mqModals.tIsQueueEmpty(1))
{
@ -1507,6 +1508,7 @@ namespace TJAPlayer3
TJAPlayer3.Skin.sound決定音.t再生する();
displayedModals[1] = mqModals.tPopModal(1);
displayedModals[1]?.tPlayModalSfx();
}
}

View File

@ -193,6 +193,17 @@
202 : Ensou recently played songs description
203 : Ensou randomly select song
# Modal specific text (0030X)
300 : Coins got !
301 : Character got !
302 : Puchichara got !
303 : Title got !
304 : Notice
305 : Confirm
306 : Coins
307 : Total (coins)
# Tower text (0100X)
1000 : Reached floor (Tower)
@ -240,8 +251,8 @@
9000 : Off
9001 : On
9002 : None
9003 : きまぐれ
9004 : でたらめ
9003 : Kimagure (きまぐれ)
9004 : Detarame (でたらめ)
9006 : Special Training Mode
9007 : Null
9008 : Speed