using System.Text;\r
using System.Diagnostics;\r
using System.Drawing;\r
-using SlimDX;\r
+using SharpDX;\r
using FDK;\r
\r
namespace DTXMania\r
}\r
public void t選択曲が変更された()\r
{\r
- Cスコア cスコア = CDTXMania.stage選曲.r現在選択中のスコア;\r
- if( ( cスコア != null ) && !CDTXMania.stage選曲.bスクロール中 )\r
+ Cスコア cスコア = CDTXMania.Instance.stage選曲.r現在選択中のスコア;\r
+ if ((cスコア != null) && !CDTXMania.Instance.stage選曲.bスクロール中)\r
{\r
try\r
{\r
- Bitmap image = new Bitmap( 400, 130 );\r
- Graphics graphics = Graphics.FromImage( image );\r
+ Bitmap image = new Bitmap((int)(400 * Scale.X), (int)(130 * Scale.Y));\r
+ Graphics graphics = Graphics.FromImage(image);\r
graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;\r
- for ( int i = 0; i < 5; i++ )\r
+ for (int i = 0; i < 5; i++)\r
{\r
- if( ( cスコア.譜面情報.演奏履歴[ i ] != null ) && ( cスコア.譜面情報.演奏履歴[ i ].Length > 0 ) )\r
+ if ((cスコア.譜面情報.演奏履歴[i] != null) && (cスコア.譜面情報.演奏履歴[i].Length > 0))\r
{\r
- graphics.DrawString( cスコア.譜面情報.演奏履歴[ i ], this.ft表示用フォント, Brushes.Yellow, (float) 0f, (float) ( i * 24f ) );\r
+ graphics.DrawString(cスコア.譜面情報.演奏履歴[i], this.ft表示用フォント, Brushes.Yellow, (float)0f, (float)(i * 24f * Scale.Y));\r
}\r
}\r
graphics.Dispose();\r
- if( this.tx文字列パネル != null )\r
+ if (this.tx文字列パネル != null)\r
{\r
this.tx文字列パネル.Dispose();\r
}\r
- this.tx文字列パネル = new CTexture( CDTXMania.app.Device, image, CDTXMania.TextureFormat );\r
- this.tx文字列パネル.vc拡大縮小倍率 = new Vector3( 0.5f, 0.5f, 1f );\r
+ this.tx文字列パネル = new CTexture(CDTXMania.Instance.Device, image, CDTXMania.Instance.TextureFormat);\r
+ this.tx文字列パネル.vc拡大縮小倍率 = new Vector3(0.5f, 0.5f, 1f);\r
image.Dispose();\r
}\r
- catch( CTextureCreateFailedException )\r
+ catch (CTextureCreateFailedException)\r
{\r
- Trace.TraceError( "演奏履歴文字列テクスチャの作成に失敗しました。" );\r
+ Trace.TraceError("演奏履歴文字列テクスチャの作成に失敗しました。");\r
this.tx文字列パネル = null;\r
}\r
}\r
\r
public override void On活性化()\r
{\r
- this.n本体X = 0x195;\r
- this.n本体Y = 0x174;\r
- this.ft表示用フォント = new Font( "Arial", 26f, FontStyle.Bold, GraphicsUnit.Pixel );\r
+ this.n本体X = (int)(0x195 * Scale.X);\r
+ this.n本体Y = (int)(0x174 * Scale.Y);\r
+ this.ft表示用フォント = new Font("Arial", 26f * Scale.Y, FontStyle.Bold, GraphicsUnit.Pixel);\r
base.On活性化();\r
}\r
public override void On非活性化()\r
{\r
- if( this.ft表示用フォント != null )\r
+ if (this.ft表示用フォント != null)\r
{\r
this.ft表示用フォント.Dispose();\r
this.ft表示用フォント = null;\r
}\r
public override void OnManagedリソースの作成()\r
{\r
- if( !base.b活性化してない )\r
+ if (!base.b活性化してない)\r
{\r
- this.txパネル本体 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\ScreenSelect play history panel.png" ), true );\r
+ this.txパネル本体 = TextureFactory.tテクスチャの生成(CSkin.Path(@"Graphics\ScreenSelect play history panel.png"), true);\r
this.t選択曲が変更された();\r
base.OnManagedリソースの作成();\r
}\r
}\r
public override void OnManagedリソースの解放()\r
{\r
- if( !base.b活性化してない )\r
+ if (!base.b活性化してない)\r
{\r
- CDTXMania.tテクスチャの解放( ref this.txパネル本体 );\r
- CDTXMania.tテクスチャの解放( ref this.tx文字列パネル );\r
+ TextureFactory.tテクスチャの解放(ref this.txパネル本体);\r
+ TextureFactory.tテクスチャの解放(ref this.tx文字列パネル);\r
base.OnManagedリソースの解放();\r
}\r
}\r
public override int On進行描画()\r
{\r
- if( !base.b活性化してない )\r
+ if (!base.b活性化してない)\r
{\r
- if( base.b初めての進行描画 )\r
+ if (base.b初めての進行描画)\r
{\r
- this.ct登場アニメ用 = new CCounter( 0, 100, 5, CDTXMania.Timer );\r
+ this.ct登場アニメ用 = new CCounter(0, 100, 5, CDTXMania.Instance.Timer);\r
base.b初めての進行描画 = false;\r
}\r
this.ct登場アニメ用.t進行();\r
- if( this.ct登場アニメ用.b終了値に達した || ( this.txパネル本体 == null ) )\r
+ if (this.ct登場アニメ用.b終了値に達した || (this.txパネル本体 == null))\r
{\r
- this.n本体X = 0x195;\r
- this.n本体Y = 0x174;\r
+ this.n本体X = (int)(0x195 * Scale.X);\r
+ this.n本体Y = (int)(0x174 * Scale.Y);\r
}\r
else\r
{\r
- double num = ( (double) this.ct登場アニメ用.n現在の値 ) / 100.0;\r
- double num2 = Math.Cos( ( 1.5 + ( 0.5 * num ) ) * Math.PI );\r
- this.n本体X = 0x195;\r
- this.n本体Y = 0x174 + ( (int) ( this.txパネル本体.sz画像サイズ.Height * ( 1.0 - ( num2 * num2 ) ) ) );\r
+ double num = ((double)this.ct登場アニメ用.n現在の値) / 100.0;\r
+ double num2 = Math.Cos((1.5 + (0.5 * num)) * Math.PI);\r
+ this.n本体X = (int)(0x195 * Scale.X);\r
+ this.n本体Y = (int)(0x174 * Scale.Y) + ((int)(this.txパネル本体.sz画像サイズ.Height * (1.0 - (num2 * num2))));\r
}\r
- if( this.txパネル本体 != null )\r
+ if (this.txパネル本体 != null)\r
{\r
- this.txパネル本体.t2D描画( CDTXMania.app.Device, this.n本体X, this.n本体Y );\r
+ this.txパネル本体.t2D描画(CDTXMania.Instance.Device, this.n本体X, this.n本体Y);\r
}\r
- if( this.tx文字列パネル != null )\r
+ if (this.tx文字列パネル != null)\r
{\r
- this.tx文字列パネル.t2D描画( CDTXMania.app.Device, this.n本体X + 12, this.n本体Y + 0x13 );\r
+ this.tx文字列パネル.t2D描画(CDTXMania.Instance.Device, this.n本体X + (int)(12 * Scale.X), this.n本体Y + (int)(0x13 * Scale.Y));\r
}\r
}\r
return 0;\r
}\r
- \r
+\r
\r
// その他\r
\r