lua modal for song unlocks
This commit is contained in:
parent
fdc237eed5
commit
22cafcd82e
48
OpenTaiko/System/Open-World Memories/Modules/Modal/README.md
Normal file
48
OpenTaiko/System/Open-World Memories/Modules/Modal/README.md
Normal file
@ -0,0 +1,48 @@
|
||||
# Modal Lua Customization Guide
|
||||
|
||||
## Methods
|
||||
|
||||
- (bool) isAnimationFinished()
|
||||
|
||||
Returns if the currently playing modal animation is finished, when returning "true" enter is pressable again to move to the next modal orreturn to the song select screen
|
||||
|
||||
- (void) registerNewModal(int player, int rarity, int modal_type, object modal_info, object modal_visual_ref)
|
||||
|
||||
Method called every time a new modal is registered including its related information
|
||||
|
||||
Includes the following arguments:
|
||||
```
|
||||
- (int) player: The player related to the modal (between 1 and 5)
|
||||
- (int) rarity: The rarity of the unlocked asset (between 0 (Poor) and 6 (Mythical)), unused for Coins
|
||||
- (int) modal_type: The type of unlocked asset (0: Coins, 1: Character, 2: Puchichara, 3: Title, 4: Song)
|
||||
|
||||
- (object) modal_info: Asset related information, modal_type dependent:
|
||||
> Coins -> (long) modal_info: The coin value of the play
|
||||
> Character
|
||||
> Puchichara
|
||||
> Title -> (NameplateUnlockable) modal_info: The unlocked nameplate information data (never nil)
|
||||
> Song -> (SongNode?) modal_info: The unlocked song information data (can be nil)
|
||||
|
||||
- (object) modal_visual_ref: Asset related visuals (or extra info), modal_type dependent:
|
||||
> Coins -> (long) modal_visual_ref: The total count of coins after the play
|
||||
> Character
|
||||
> Puchichara
|
||||
> Title -> (LuaNamePlateScript) modal_visual_ref: A reference to the Nameplate Lua script (never nil except if broken skin)
|
||||
> Song -> (CTexture?) modal_visual_ref: The song preimage, with the size value set to the same value as in the song select menu (can be nil)
|
||||
```
|
||||
|
||||
- (void) loadAssets()
|
||||
|
||||
Method where all resource allocation should be included, called at each skin reload and at launch
|
||||
|
||||
- (void) update()
|
||||
|
||||
The regular update loop, for example to increment time counters, plays before draw()
|
||||
|
||||
- (void) draw()
|
||||
|
||||
For displayables, played at each result screen Draw() iteration
|
||||
|
||||
## Types
|
||||
|
||||
TBD
|
@ -73,13 +73,15 @@ function registerNewModal(player, rarity, modal_type, modal_asset_informations,
|
||||
elseif modal_type == 3 then
|
||||
-- Title
|
||||
-- > modal_asset_informations: NameplateUnlockable
|
||||
-- > modal_asset_visual_references: CLuaNamePlateScript's DrawTitlePlate callback
|
||||
-- > modal_asset_visual_references: CLuaNamePlateScript
|
||||
_modal_header = getLocalizedString("MODAL_TITLE_NAMEPLATE")
|
||||
_modal_body = modal_asset_informations.Value.nameplateInfo.cld:GetString("")
|
||||
ttk_modal_body = createTitleTextureKey(_modal_body, font_modal_plate, 99999, Color.FromArgb(0,0,0,1), Color.FromArgb(0,0,0,0))
|
||||
|
||||
elseif modal_type == 4 then
|
||||
-- Song
|
||||
-- > modal_asset_informations: CSongListNode
|
||||
-- > modal_asset_visual_references: CTexture (Preimage)
|
||||
_modal_header = getLocalizedString("MODAL_TITLE_SONG")
|
||||
|
||||
end
|
||||
@ -159,6 +161,10 @@ function draw()
|
||||
if modal_current_type == 3 then
|
||||
tx_title = getTextTex(ttk_modal_body, false, false)
|
||||
modal_current_visual:DrawTitlePlate(960, 490, 255, modal_current_info.Value.nameplateInfo.iType, tx_title, modal_current_rarity, modal_current_info.Key)
|
||||
elseif modal_current_type == 4 then
|
||||
if modal_current_visual ~= nil then
|
||||
modal_current_visual:t2D_DisplayImage_AnchorCenter(960,490)
|
||||
end
|
||||
else
|
||||
tx_body = getTextTex(ttk_modal_body, false, false)
|
||||
tx_body:t2D_DisplayImage_AnchorCenter(960,490)
|
||||
|
@ -1173,7 +1173,6 @@ namespace TJAPlayer3 {
|
||||
public bool bDanTowerHide;
|
||||
|
||||
public bool bTight;
|
||||
public bool bストイックモード;
|
||||
public bool bIncludeSubfoldersOnRandomSelect;
|
||||
public bool bOutputLogs;
|
||||
public bool bDisplayDebugInfo;
|
||||
@ -2176,10 +2175,6 @@ namespace TJAPlayer3 {
|
||||
sw.WriteLine($"; Blank time before music source to play. (ms)");
|
||||
sw.WriteLine("{0}={1}", nameof(MusicPreTimeMs), MusicPreTimeMs);
|
||||
sw.WriteLine();
|
||||
sw.WriteLine("; ストイックモード(0:OFF, 1:ON)");
|
||||
sw.WriteLine("; Stoic mode. (0:OFF, 1:ON)");
|
||||
sw.WriteLine("StoicMode={0}", this.bストイックモード ? 1 : 0);
|
||||
sw.WriteLine();
|
||||
sw.WriteLine("; バッファ入力モード(0:OFF, 1:ON)");
|
||||
sw.WriteLine("; Using Buffered input (0:OFF, 1:ON)");
|
||||
sw.WriteLine("BufferedInput={0}", this.bBufferedInputs ? 1 : 0);
|
||||
@ -2911,10 +2906,7 @@ namespace TJAPlayer3 {
|
||||
this.KeyboardSoundLevelIncrement = CConversion.n値を文字列から取得して範囲内に丸めて返す(str4, MinimumKeyboardSoundLevelIncrement, MaximumKeyboardSoundLevelIncrement, this.KeyboardSoundLevelIncrement);
|
||||
} else if (str3.Equals(nameof(MusicPreTimeMs))) {
|
||||
MusicPreTimeMs = int.Parse(str4);
|
||||
} else if (str3.Equals("StoicMode")) {
|
||||
this.bストイックモード = CConversion.bONorOFF(str4[0]);
|
||||
} else if (str3.Equals("AutoResultCapture")) // #25399 2011.6.9 yyagi
|
||||
{
|
||||
} else if (str3.Equals("AutoResultCapture")) {
|
||||
this.bIsAutoResultCapture = CConversion.bONorOFF(str4[0]);
|
||||
} else if (str3.Equals(nameof(SendDiscordPlayingInformation))) {
|
||||
SendDiscordPlayingInformation = CConversion.bONorOFF(str4[0]);
|
||||
|
@ -1,6 +1,6 @@
|
||||
namespace TJAPlayer3 {
|
||||
internal class Modal {
|
||||
public Modal(EModalType mt, int ra, params object[] re) {
|
||||
public Modal(EModalType mt, int ra, params object?[] re) {
|
||||
modalType = mt;
|
||||
rarity = ra;
|
||||
reference = re;
|
||||
@ -34,7 +34,7 @@
|
||||
#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;
|
||||
|
@ -68,10 +68,11 @@ namespace TJAPlayer3 {
|
||||
|
||||
foreach (KeyValuePair<string, SongUnlockable> item in data) {
|
||||
string _npvKey = item.Key;
|
||||
string? _songName = CSongDict.tGetNodeFromID(_npvKey)?.ldTitle.GetString("");
|
||||
string _songSubtitle = CSongDict.tGetNodeFromID(_npvKey)?.ldSubtitle.GetString("") ?? "";
|
||||
//string? _songName = CSongDict.tGetNodeFromID(_npvKey)?.ldTitle.GetString("");
|
||||
//string _songSubtitle = CSongDict.tGetNodeFromID(_npvKey)?.ldSubtitle.GetString("") ?? "";
|
||||
CSongListNode? _node = CSongDict.tGetNodeFromID(_npvKey);
|
||||
|
||||
if (!_sf.Contains(_npvKey) && _songName != null) {
|
||||
if (!_sf.Contains(_npvKey)) { // && _songName != null) {
|
||||
var _fulfilled = item.Value.unlockConditions.tConditionMetWrapper(player, DBUnlockables.CUnlockConditions.EScreen.Internal).Item1;
|
||||
|
||||
if (_fulfilled) {
|
||||
@ -84,8 +85,8 @@ namespace TJAPlayer3 {
|
||||
new Modal(
|
||||
Modal.EModalType.Song,
|
||||
HRarity.tRarityToModalInt(item.Value.rarity),
|
||||
_songName,
|
||||
_songSubtitle
|
||||
_node,
|
||||
TJAPlayer3.stageSongSelect.actPreimageパネル.tGenerateAndGetPreimage(_node?.arスコア[0] ?? null)
|
||||
),
|
||||
_player);
|
||||
|
||||
|
@ -23,10 +23,11 @@ namespace TJAPlayer3 {
|
||||
}
|
||||
|
||||
// Informations of the newly added modal are initialized here
|
||||
public void RegisterNewModal(int player, int rarity, Modal.EModalType modalType, params object[] args) {
|
||||
public void RegisterNewModal(int player, int rarity, Modal.EModalType modalType, params object?[] args) {
|
||||
if (!Available) return;
|
||||
|
||||
object[] newParams = new object[] { player, rarity, (int)modalType }.Concat(args).ToArray();
|
||||
object[] newParams = new object[] { player, rarity, (int)modalType };
|
||||
if (args != null) newParams = newParams.Concat((object[])args).ToArray();
|
||||
RunLuaCode(lfRegisterModal, newParams);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,4 @@
|
||||
using System.Diagnostics;
|
||||
using FDK;
|
||||
using Silk.NET.Maths;
|
||||
using Rectangle = System.Drawing.Rectangle;
|
||||
using FDK;
|
||||
|
||||
namespace TJAPlayer3 {
|
||||
internal class CActSelectPreimageパネル : CActivity {
|
||||
@ -10,299 +7,158 @@ namespace TJAPlayer3 {
|
||||
public CActSelectPreimageパネル() {
|
||||
base.IsDeActivated = true;
|
||||
}
|
||||
public void t選択曲が変更された() {
|
||||
this.ct遅延表示 = new CCounter(-TJAPlayer3.ConfigIni.n曲が選択されてからプレビュー画像が表示開始されるまでのウェイトms, 100, 1, TJAPlayer3.Timer);
|
||||
this.b新しいプレビューファイルを読み込んだ = false;
|
||||
public void tSelectedSongChanged() {
|
||||
this.ctDelayedDisplay = new CCounter(-TJAPlayer3.ConfigIni.n曲が選択されてからプレビュー画像が表示開始されるまでのウェイトms, 100, 1, TJAPlayer3.Timer);
|
||||
this.bNewPreimageLoaded = false;
|
||||
}
|
||||
|
||||
// CActivity 実装
|
||||
|
||||
public override void Activate() {
|
||||
this.n本体X = 8;
|
||||
this.n本体Y = 0x39;
|
||||
this.r表示するプレビュー画像 = this.txプレビュー画像がないときの画像;
|
||||
this.str現在のファイル名 = "";
|
||||
this.b新しいプレビューファイルを読み込んだ = false;
|
||||
this.txプレビュー画像 = null;
|
||||
this.n前回描画したフレーム番号 = -1;
|
||||
this.b動画フレームを作成した = false;
|
||||
this.pAVIBmp = IntPtr.Zero;
|
||||
this.tプレビュー画像_動画の変更();
|
||||
this.rCurrentlyDisplayedPreimage = this.txDefaultPreimage;
|
||||
this.strCurrentFilename = "";
|
||||
this.bNewPreimageLoaded = false;
|
||||
this.txPreimage = null;
|
||||
this.tUpdatePreimage(TJAPlayer3.stageSongSelect.r現在選択中のスコア);
|
||||
base.Activate();
|
||||
}
|
||||
public override void DeActivate() {
|
||||
TJAPlayer3.tテクスチャの解放(ref this.txプレビュー画像);
|
||||
this.ct登場アニメ用 = null;
|
||||
this.ct遅延表示 = null;
|
||||
TJAPlayer3.tテクスチャの解放(ref this.txPreimage);
|
||||
this.ctApparitionAnimation = null;
|
||||
this.ctDelayedDisplay = null;
|
||||
base.DeActivate();
|
||||
}
|
||||
public override void CreateManagedResource() {
|
||||
this.txパネル本体 = TJAPlayer3.tテクスチャの生成(CSkin.Path(@$"Graphics{Path.DirectorySeparatorChar}5_preimage panel.png"), false);
|
||||
this.txセンサ = TJAPlayer3.tテクスチャの生成(CSkin.Path(@$"Graphics{Path.DirectorySeparatorChar}5_sensor.png"), false);
|
||||
//this.txセンサ光 = CDTXMania.tテクスチャの生成( CSkin.Path( @$"Graphics{Path.DirectorySeparatorChar}5_sensor light.png" ), false );
|
||||
this.txプレビュー画像がないときの画像 = TJAPlayer3.tテクスチャの生成(CSkin.Path(@$"Graphics{Path.DirectorySeparatorChar}3_SongSelect{Path.DirectorySeparatorChar}PreImageDefault.png"), false);
|
||||
this.txDefaultPreimage = TJAPlayer3.tテクスチャの生成(CSkin.Path(@$"Graphics{Path.DirectorySeparatorChar}3_SongSelect{Path.DirectorySeparatorChar}PreImageDefault.png"), false);
|
||||
base.CreateManagedResource();
|
||||
}
|
||||
public override void ReleaseManagedResource() {
|
||||
TJAPlayer3.tテクスチャの解放(ref this.txパネル本体);
|
||||
TJAPlayer3.tテクスチャの解放(ref this.txセンサ);
|
||||
TJAPlayer3.tテクスチャの解放(ref this.txセンサ光);
|
||||
TJAPlayer3.tテクスチャの解放(ref this.txプレビュー画像がないときの画像);
|
||||
|
||||
TJAPlayer3.tテクスチャの解放(ref this.txDefaultPreimage);
|
||||
base.ReleaseManagedResource();
|
||||
}
|
||||
public override int Draw() {
|
||||
if (!base.IsDeActivated) {
|
||||
if (base.IsFirstDraw) {
|
||||
this.ct登場アニメ用 = new CCounter(0, 100, 5, TJAPlayer3.Timer);
|
||||
this.ctセンサ光 = new CCounter(0, 100, 30, TJAPlayer3.Timer);
|
||||
this.ctセンサ光.CurrentValue = 70;
|
||||
this.ctApparitionAnimation = new CCounter(0, 100, 5, TJAPlayer3.Timer);
|
||||
base.IsFirstDraw = false;
|
||||
}
|
||||
this.ct登場アニメ用.Tick();
|
||||
this.ctセンサ光.TickLoop();
|
||||
if ((!TJAPlayer3.stageSongSelect.bCurrentlyScrolling && (this.ct遅延表示 != null)) && this.ct遅延表示.IsTicked) {
|
||||
this.ct遅延表示.Tick();
|
||||
if ((this.ct遅延表示.CurrentValue >= 0) && this.b新しいプレビューファイルをまだ読み込んでいない) {
|
||||
this.tプレビュー画像_動画の変更();
|
||||
this.ctApparitionAnimation.Tick();
|
||||
if ((!TJAPlayer3.stageSongSelect.bCurrentlyScrolling && (this.ctDelayedDisplay != null)) && this.ctDelayedDisplay.IsTicked) {
|
||||
this.ctDelayedDisplay.Tick();
|
||||
if ((this.ctDelayedDisplay.CurrentValue >= 0) && this.bNewPreimageStillLoading) {
|
||||
this.tUpdatePreimage(TJAPlayer3.stageSongSelect.r現在選択中のスコア);
|
||||
TJAPlayer3.Timer.Update();
|
||||
this.ct遅延表示.NowTime = TJAPlayer3.Timer.NowTime;
|
||||
this.b新しいプレビューファイルを読み込んだ = true;
|
||||
} else if (this.ct遅延表示.IsEnded && this.ct遅延表示.IsTicked) {
|
||||
this.ct遅延表示.Stop();
|
||||
this.ctDelayedDisplay.NowTime = TJAPlayer3.Timer.NowTime;
|
||||
this.bNewPreimageLoaded = true;
|
||||
} else if (this.ctDelayedDisplay.IsEnded && this.ctDelayedDisplay.IsTicked) {
|
||||
this.ctDelayedDisplay.Stop();
|
||||
}
|
||||
}
|
||||
this.t描画処理_パネル本体();
|
||||
this.t描画処理_プレビュー画像();
|
||||
this.tDisplayPreimage();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public CTexture? tGenerateAndGetPreimage(Cスコア? cScoreInst) {
|
||||
this.tUpdatePreimage(cScoreInst);
|
||||
return tGetPreimageTextureResized();
|
||||
}
|
||||
|
||||
public CTexture? tGetPreimageTextureResized() {
|
||||
|
||||
|
||||
if (this.rCurrentlyDisplayedPreimage != null) {
|
||||
|
||||
int width = TJAPlayer3.Skin.SongSelect_Preimage_Size[0];
|
||||
int height = TJAPlayer3.Skin.SongSelect_Preimage_Size[1];
|
||||
|
||||
float xRatio = width / (float)this.rCurrentlyDisplayedPreimage.sz画像サイズ.Width;
|
||||
float yRatio = height / (float)this.rCurrentlyDisplayedPreimage.sz画像サイズ.Height;
|
||||
|
||||
this.rCurrentlyDisplayedPreimage.Opacity = 255;
|
||||
this.rCurrentlyDisplayedPreimage.vcScaleRatio.X = xRatio;
|
||||
this.rCurrentlyDisplayedPreimage.vcScaleRatio.Y = xRatio;
|
||||
|
||||
}
|
||||
return rCurrentlyDisplayedPreimage;
|
||||
}
|
||||
|
||||
// その他
|
||||
|
||||
#region [ private ]
|
||||
//-----------------
|
||||
private bool b動画フレームを作成した;
|
||||
private CCounter ctセンサ光;
|
||||
private CCounter ct遅延表示;
|
||||
private CCounter ct登場アニメ用;
|
||||
private int n前回描画したフレーム番号;
|
||||
private int n本体X;
|
||||
private int n本体Y;
|
||||
private IntPtr pAVIBmp;
|
||||
private readonly Rectangle rcセンサ光 = new Rectangle(0, 0xc0, 0x40, 0x40);
|
||||
private readonly Rectangle rcセンサ本体下半分 = new Rectangle(0x40, 0, 0x40, 0x80);
|
||||
private readonly Rectangle rcセンサ本体上半分 = new Rectangle(0, 0, 0x40, 0x80);
|
||||
private CTexture r表示するプレビュー画像;
|
||||
private string str現在のファイル名;
|
||||
private CTexture txセンサ;
|
||||
private CTexture txセンサ光;
|
||||
private CTexture txパネル本体;
|
||||
private CTexture txプレビュー画像;
|
||||
private CTexture txプレビュー画像がないときの画像;
|
||||
private bool b新しいプレビューファイルを読み込んだ;
|
||||
private bool b新しいプレビューファイルをまだ読み込んでいない {
|
||||
private CCounter ctDelayedDisplay;
|
||||
private CCounter ctApparitionAnimation;
|
||||
private CTexture rCurrentlyDisplayedPreimage;
|
||||
private string strCurrentFilename;
|
||||
private CTexture txPreimage;
|
||||
private CTexture txDefaultPreimage;
|
||||
private bool bNewPreimageLoaded;
|
||||
private bool bNewPreimageStillLoading {
|
||||
get {
|
||||
return !this.b新しいプレビューファイルを読み込んだ;
|
||||
return !this.bNewPreimageLoaded;
|
||||
}
|
||||
set {
|
||||
this.b新しいプレビューファイルを読み込んだ = !value;
|
||||
this.bNewPreimageLoaded = !value;
|
||||
}
|
||||
}
|
||||
|
||||
private void tプレビュー画像_動画の変更() {
|
||||
this.pAVIBmp = IntPtr.Zero;
|
||||
if (!TJAPlayer3.ConfigIni.bストイックモード) {
|
||||
if (this.tプレビュー画像の指定があれば構築する()) {
|
||||
return;
|
||||
}
|
||||
private void tUpdatePreimage(Cスコア? cScoreInst) {
|
||||
if (cScoreInst != null && this.tBuildPreimageAssets(cScoreInst)) {
|
||||
return;
|
||||
}
|
||||
this.r表示するプレビュー画像 = this.txプレビュー画像がないときの画像;
|
||||
this.str現在のファイル名 = "";
|
||||
}
|
||||
private bool tプレビュー画像の指定があれば構築する() {
|
||||
Cスコア cスコア = TJAPlayer3.stageSongSelect.r現在選択中のスコア;
|
||||
if ((cスコア == null) || string.IsNullOrEmpty(cスコア.譜面情報.Preimage)) return false;
|
||||
|
||||
string str = ((!Path.IsPathRooted(cスコア.譜面情報.Preimage)) ? cスコア.ファイル情報.フォルダの絶対パス : "") + cスコア.譜面情報.Preimage;
|
||||
if (!str.Equals(this.str現在のファイル名)) {
|
||||
TJAPlayer3.tテクスチャの解放(ref this.txプレビュー画像);
|
||||
this.str現在のファイル名 = str;
|
||||
if (!File.Exists(this.str現在のファイル名)) {
|
||||
Trace.TraceWarning("ファイルが存在しません。({0})", new object[] { this.str現在のファイル名 });
|
||||
// If no preimage or preimage not found
|
||||
this.rCurrentlyDisplayedPreimage = this.txDefaultPreimage;
|
||||
this.strCurrentFilename = "";
|
||||
}
|
||||
private bool tBuildPreimageAssets(Cスコア cScoreInst) {
|
||||
if ((cScoreInst == null) || string.IsNullOrEmpty(cScoreInst.譜面情報.Preimage)) return false;
|
||||
|
||||
string str = ((!Path.IsPathRooted(cScoreInst.譜面情報.Preimage)) ? cScoreInst.ファイル情報.フォルダの絶対パス : "") + cScoreInst.譜面情報.Preimage;
|
||||
if (!str.Equals(this.strCurrentFilename)) {
|
||||
TJAPlayer3.tテクスチャの解放(ref this.txPreimage);
|
||||
this.strCurrentFilename = str;
|
||||
if (!File.Exists(this.strCurrentFilename)) {
|
||||
LogNotification.PopWarning("Preimage not found ({0})".SafeFormat(this.strCurrentFilename));
|
||||
return false;
|
||||
}
|
||||
this.txプレビュー画像 = TJAPlayer3.tテクスチャの生成(this.str現在のファイル名, false);
|
||||
if (this.txプレビュー画像 != null) {
|
||||
this.r表示するプレビュー画像 = this.txプレビュー画像;
|
||||
this.txPreimage = TJAPlayer3.tテクスチャの生成(this.strCurrentFilename, false);
|
||||
if (this.txPreimage != null) {
|
||||
this.rCurrentlyDisplayedPreimage = this.txPreimage;
|
||||
} else {
|
||||
this.r表示するプレビュー画像 = this.txプレビュー画像がないときの画像;
|
||||
this.rCurrentlyDisplayedPreimage = this.txDefaultPreimage;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
/// <summary>
|
||||
/// 一時的に使用禁止。
|
||||
/// </summary>
|
||||
private void t描画処理_ジャンル文字列() {
|
||||
CSongListNode c曲リストノード = TJAPlayer3.stageSongSelect.rNowSelectedSong;
|
||||
Cスコア cスコア = TJAPlayer3.stageSongSelect.r現在選択中のスコア;
|
||||
if ((c曲リストノード != null) && (cスコア != null)) {
|
||||
string str = "";
|
||||
switch (c曲リストノード.eノード種別) {
|
||||
case CSongListNode.ENodeType.SCORE:
|
||||
if ((c曲リストノード.strジャンル == null) || (c曲リストノード.strジャンル.Length <= 0)) {
|
||||
if ((cスコア.譜面情報.ジャンル != null) && (cスコア.譜面情報.ジャンル.Length > 0)) {
|
||||
str = cスコア.譜面情報.ジャンル;
|
||||
}
|
||||
#if false // #32644 2013.12.21 yyagi "Unknown"なジャンル表示を削除。DTX/BMSなどの種別表示もしない。
|
||||
else
|
||||
{
|
||||
switch( cスコア.譜面情報.曲種別 )
|
||||
{
|
||||
case CDTX.E種別.DTX:
|
||||
str = "DTX";
|
||||
break;
|
||||
|
||||
case CDTX.E種別.GDA:
|
||||
str = "GDA";
|
||||
break;
|
||||
private void tDisplayPreimage() {
|
||||
if (!TJAPlayer3.stageSongSelect.bCurrentlyScrolling && (((this.ctDelayedDisplay != null) && (this.ctDelayedDisplay.CurrentValue > 0)) && !this.bNewPreimageStillLoading)) {
|
||||
|
||||
case CDTX.E種別.G2D:
|
||||
str = "G2D";
|
||||
break;
|
||||
|
||||
case CDTX.E種別.BMS:
|
||||
str = "BMS";
|
||||
break;
|
||||
|
||||
case CDTX.E種別.BME:
|
||||
str = "BME";
|
||||
break;
|
||||
}
|
||||
str = "Unknown";
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
str = c曲リストノード.strジャンル;
|
||||
break;
|
||||
|
||||
case CSongListNode.ENodeType.SCORE_MIDI:
|
||||
str = "MIDI";
|
||||
break;
|
||||
|
||||
case CSongListNode.ENodeType.BOX:
|
||||
str = "MusicBox";
|
||||
break;
|
||||
|
||||
case CSongListNode.ENodeType.BACKBOX:
|
||||
str = "BackBox";
|
||||
break;
|
||||
|
||||
case CSongListNode.ENodeType.RANDOM:
|
||||
str = "Random";
|
||||
break;
|
||||
|
||||
default:
|
||||
str = "Unknown";
|
||||
break;
|
||||
}
|
||||
TJAPlayer3.actTextConsole.tPrint(this.n本体X + 0x12, this.n本体Y - 1, CTextConsole.EFontType.CyanSlim, str);
|
||||
}
|
||||
}
|
||||
private void t描画処理_センサ光() {
|
||||
int num = (int)this.ctセンサ光.CurrentValue;
|
||||
if (num < 12) {
|
||||
int x = this.n本体X + 0xcc;
|
||||
int y = this.n本体Y + 0x7b;
|
||||
if (this.txセンサ光 != null) {
|
||||
this.txセンサ光.vcScaleRatio = new Vector3D<float>(1f, 1f, 1f);
|
||||
this.txセンサ光.Opacity = 0xff;
|
||||
this.txセンサ光.t2D描画(x, y, new Rectangle((num % 4) * 0x40, (num / 4) * 0x40, 0x40, 0x40));
|
||||
}
|
||||
} else if (num < 0x18) {
|
||||
int num4 = num - 11;
|
||||
double num5 = ((double)num4) / 11.0;
|
||||
double num6 = 1.0 + (num5 * 0.5);
|
||||
int num7 = (int)(64.0 * num6);
|
||||
int num8 = (int)(64.0 * num6);
|
||||
int num9 = ((this.n本体X + 0xcc) + 0x20) - (num7 / 2);
|
||||
int num10 = ((this.n本体Y + 0x7b) + 0x20) - (num8 / 2);
|
||||
if (this.txセンサ光 != null) {
|
||||
this.txセンサ光.vcScaleRatio = new Vector3D<float>((float)num6, (float)num6, 1f);
|
||||
this.txセンサ光.Opacity = (int)(255.0 * (1.0 - num5));
|
||||
this.txセンサ光.t2D描画(num9, num10, this.rcセンサ光);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void t描画処理_センサ本体() {
|
||||
int x = this.n本体X + 0xcd;
|
||||
int y = this.n本体Y - 4;
|
||||
if (this.txセンサ != null) {
|
||||
this.txセンサ.t2D描画(x, y, this.rcセンサ本体上半分);
|
||||
y += 0x80;
|
||||
this.txセンサ.t2D描画(x, y, this.rcセンサ本体下半分);
|
||||
}
|
||||
}
|
||||
private void t描画処理_パネル本体() {
|
||||
if (this.ct登場アニメ用.IsEnded || (this.txパネル本体 != null)) {
|
||||
this.n本体X = 16;
|
||||
this.n本体Y = 86;
|
||||
} else {
|
||||
double num = ((double)this.ct登場アニメ用.CurrentValue) / 100.0;
|
||||
double num2 = Math.Cos((1.5 + (0.5 * num)) * Math.PI);
|
||||
this.n本体X = 8;
|
||||
if (this.txパネル本体 != null)
|
||||
this.n本体Y = 0x39 - ((int)(this.txパネル本体.sz画像サイズ.Height * (1.0 - (num2 * num2))));
|
||||
else
|
||||
this.n本体Y = 8;
|
||||
}
|
||||
if (this.txパネル本体 != null) {
|
||||
this.txパネル本体.t2D描画(this.n本体X, this.n本体Y);
|
||||
}
|
||||
}
|
||||
private unsafe void t描画処理_プレビュー画像() {
|
||||
if (!TJAPlayer3.stageSongSelect.bCurrentlyScrolling && (((this.ct遅延表示 != null) && (this.ct遅延表示.CurrentValue > 0)) && !this.b新しいプレビューファイルをまだ読み込んでいない)) {
|
||||
int x = this.n本体X + 0x12;
|
||||
int y = this.n本体Y + 0x10;
|
||||
float num3 = ((float)this.ct遅延表示.CurrentValue) / 100f;
|
||||
float num3 = ((float)this.ctDelayedDisplay.CurrentValue) / 100f;
|
||||
float num4 = 0.9f + (0.1f * num3);
|
||||
if (this.r表示するプレビュー画像 != null) {
|
||||
/*
|
||||
int width = this.r表示するプレビュー画像.sz画像サイズ.Width;
|
||||
int height = this.r表示するプレビュー画像.sz画像サイズ.Height;
|
||||
if( width > 400 )
|
||||
{
|
||||
width = 400;
|
||||
}
|
||||
if( height > 400 )
|
||||
{
|
||||
height = 400;
|
||||
}
|
||||
*/
|
||||
|
||||
// Placeholder
|
||||
if (this.rCurrentlyDisplayedPreimage != null) {
|
||||
|
||||
int width = TJAPlayer3.Skin.SongSelect_Preimage_Size[0];
|
||||
int height = TJAPlayer3.Skin.SongSelect_Preimage_Size[1];
|
||||
|
||||
float xRatio = width / (float)this.r表示するプレビュー画像.sz画像サイズ.Width;
|
||||
float yRatio = height / (float)this.r表示するプレビュー画像.sz画像サイズ.Height;
|
||||
float xRatio = width / (float)this.rCurrentlyDisplayedPreimage.sz画像サイズ.Width;
|
||||
float yRatio = height / (float)this.rCurrentlyDisplayedPreimage.sz画像サイズ.Height;
|
||||
|
||||
x += (400 - ((int)(width * num4))) / 2;
|
||||
y += (400 - ((int)(height * num4))) / 2;
|
||||
this.rCurrentlyDisplayedPreimage.Opacity = (int)(255f * num3);
|
||||
this.rCurrentlyDisplayedPreimage.vcScaleRatio.X = num4 * xRatio;
|
||||
this.rCurrentlyDisplayedPreimage.vcScaleRatio.Y = num4 * xRatio;
|
||||
|
||||
this.r表示するプレビュー画像.Opacity = (int)(255f * num3);
|
||||
this.r表示するプレビュー画像.vcScaleRatio.X = num4 * xRatio;
|
||||
this.r表示するプレビュー画像.vcScaleRatio.Y = num4 * xRatio;
|
||||
|
||||
// this.r表示するプレビュー画像.t2D描画( x + 22, y + 12, new Rectangle( 0, 0, width, height ) );
|
||||
|
||||
// Temporary addition
|
||||
this.r表示するプレビュー画像.t2D拡大率考慮中央基準描画(TJAPlayer3.Skin.SongSelect_Preimage[0], TJAPlayer3.Skin.SongSelect_Preimage[1]);
|
||||
this.rCurrentlyDisplayedPreimage.t2D拡大率考慮中央基準描画(TJAPlayer3.Skin.SongSelect_Preimage[0], TJAPlayer3.Skin.SongSelect_Preimage[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-----------------
|
||||
#endregion
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ namespace TJAPlayer3 {
|
||||
this.ctOldBGScroll = new CCounter(0, (int)(txOldGenreBack.szTextureSize.Width * oldScale), 30, TJAPlayer3.Timer);
|
||||
this.ctOldBGScroll.CurrentValue = Math.Min(scroll, (int)(txOldGenreBack.szTextureSize.Width * oldScale));
|
||||
|
||||
this.actPreimageパネル.t選択曲が変更された();
|
||||
this.actPreimageパネル.tSelectedSongChanged();
|
||||
this.actPresound.t選択曲が変更された();
|
||||
this.act演奏履歴パネル.t選択曲が変更された();
|
||||
this.actステータスパネル.t選択曲が変更された();
|
||||
@ -1226,7 +1226,7 @@ namespace TJAPlayer3 {
|
||||
//private CActFIFOBlack actFOtoNowLoading;
|
||||
public CActFIFOStart actFOtoNowLoading;
|
||||
private CActSelectInformation actInformation;
|
||||
private CActSelectPreimageパネル actPreimageパネル;
|
||||
public CActSelectPreimageパネル actPreimageパネル;
|
||||
public CActSelectPresound actPresound;
|
||||
private CActオプションパネル actオプションパネル;
|
||||
private CActSelectステータスパネル actステータスパネル;
|
||||
|
@ -2842,7 +2842,7 @@ namespace TJAPlayer3 {
|
||||
|
||||
protected abstract void t進行描画_AVI();
|
||||
protected void t進行描画_AVI(int x, int y) {
|
||||
if (((base.ePhaseID != CStage.EPhase.Game_STAGE_FAILED) && (base.ePhaseID != CStage.EPhase.Game_STAGE_FAILED_FadeOut)) && (!TJAPlayer3.ConfigIni.bストイックモード && TJAPlayer3.ConfigIni.bEnableAVI)) {
|
||||
if (((base.ePhaseID != CStage.EPhase.Game_STAGE_FAILED) && (base.ePhaseID != CStage.EPhase.Game_STAGE_FAILED_FadeOut)) && TJAPlayer3.ConfigIni.bEnableAVI) {
|
||||
this.actAVI.t進行描画(x, y);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user