#xxxxx rev388で組んだプログラムの作り直し。
@@ -9,28 +9,28 @@ | ||
9 | 9 | |
10 | 10 | namespace DTXMania |
11 | 11 | { |
12 | - internal class CActResultImage : CActivity | |
13 | - { | |
14 | - // コンストラクタ | |
12 | + internal class CActResultImage : CActivity | |
13 | + { | |
14 | + // コンストラクタ | |
15 | 15 | |
16 | - public CActResultImage() | |
17 | - { | |
18 | - base.b活性化してない = true; | |
19 | - } | |
16 | + public CActResultImage() | |
17 | + { | |
18 | + base.b活性化してない = true; | |
19 | + } | |
20 | 20 | |
21 | 21 | |
22 | - // メソッド | |
22 | + // メソッド | |
23 | 23 | |
24 | - public void tアニメを完了させる() | |
25 | - { | |
26 | - this.ct登場用.n現在の値 = this.ct登場用.n終了値; | |
27 | - } | |
24 | + public void tアニメを完了させる() | |
25 | + { | |
26 | + this.ct登場用.n現在の値 = this.ct登場用.n終了値; | |
27 | + } | |
28 | 28 | |
29 | 29 | |
30 | - // CActivity 実装 | |
30 | + // CActivity 実装 | |
31 | 31 | |
32 | - public override void On活性化() | |
33 | - { | |
32 | + public override void On活性化() | |
33 | + { | |
34 | 34 | this.n本体X = 0x1d5; |
35 | 35 | this.n本体Y = 0x11b; |
36 | 36 |
@@ -38,32 +38,32 @@ | ||
38 | 38 | this.ftSongDifficultyFont = new System.Drawing.Font("Impact", 15f, FontStyle.Regular); |
39 | 39 | this.ftSongNameFont = new System.Drawing.Font("DFG平成ゴシック体W7", 21f, FontStyle.Regular, GraphicsUnit.Pixel); |
40 | 40 | this.iDrumSpeed = Image.FromFile(CSkin.Path(@"Graphics\7_panel_icons.jpg")); |
41 | - this.txジャケットパネル = CDTXMania.tテクスチャの生成( CSkin.Path(@"Graphics\7_JacketPanel.png") ); | |
41 | + this.txジャケットパネル = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\7_JacketPanel.png")); | |
42 | 42 | base.On活性化(); |
43 | 43 | |
44 | - } | |
45 | - public override void On非活性化() | |
46 | - { | |
47 | - if( this.ct登場用 != null ) | |
48 | - { | |
49 | - this.ct登場用 = null; | |
50 | - } | |
51 | - CDTXMania.tテクスチャの解放( ref this.txジャケットパネル ); | |
52 | - base.On非活性化(); | |
53 | - } | |
54 | - public override void OnManagedリソースの作成() | |
55 | - { | |
56 | - if( !base.b活性化してない ) | |
57 | - { | |
58 | - this.txリザルト画像がないときの画像 = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\5_preimage default.png" ) ); | |
59 | - if( CDTXMania.ConfigIni.bストイックモード ) | |
60 | - { | |
61 | - this.txリザルト画像 = this.txリザルト画像がないときの画像; | |
62 | - } | |
63 | - else if( ( ( !this.tリザルト画像の指定があれば構築する() ) && ( !this.tプレビュー画像の指定があれば構築する() ) ) ) | |
64 | - { | |
65 | - this.txリザルト画像 = this.txリザルト画像がないときの画像; | |
44 | + } | |
45 | + public override void On非活性化() | |
46 | + { | |
47 | + if (this.ct登場用 != null) | |
48 | + { | |
49 | + this.ct登場用 = null; | |
50 | + } | |
51 | + CDTXMania.tテクスチャの解放(ref this.txジャケットパネル); | |
52 | + base.On非活性化(); | |
53 | + } | |
54 | + public override void OnManagedリソースの作成() | |
55 | + { | |
56 | + if (!base.b活性化してない) | |
57 | + { | |
58 | + this.txリザルト画像がないときの画像 = CDTXMania.tテクスチャの生成(CSkin.Path(@"Graphics\5_preimage default.png")); | |
59 | + if (CDTXMania.ConfigIni.bストイックモード) | |
60 | + { | |
61 | + this.txリザルト画像 = this.txリザルト画像がないときの画像; | |
66 | 62 | } |
63 | + else if (((!this.tリザルト画像の指定があれば構築する()) && (!this.tプレビュー画像の指定があれば構築する()))) | |
64 | + { | |
65 | + this.txリザルト画像 = this.txリザルト画像がないときの画像; | |
66 | + } | |
67 | 67 | |
68 | 68 | #region[ 曲名、アーティスト名テクスチャの生成 ] |
69 | 69 | if (string.IsNullOrEmpty(CDTXMania.DTX.TITLE) || (!CDTXMania.bコンパクトモード && CDTXMania.ConfigIni.b曲名表示をdefのものにする)) |
@@ -72,36 +72,15 @@ | ||
72 | 72 | this.strSongName = CDTXMania.DTX.TITLE; |
73 | 73 | |
74 | 74 | pfタイトル = new CPrivateFastFont(new FontFamily(CDTXMania.ConfigIni.str選曲リストフォント), 20, FontStyle.Regular); |
75 | - this.ftタイトル表示用フォント = new Font(CDTXMania.ConfigIni.str選曲リストフォント, 20, FontStyle.Bold, GraphicsUnit.Pixel); | |
76 | - | |
77 | - Bitmap image1 = new Bitmap(1, 1); | |
78 | - Graphics graphics1 = Graphics.FromImage(image1); | |
79 | - | |
80 | - SizeF ef = graphics1.MeasureString(this.strSongName, this.ftタイトル表示用フォント); | |
81 | - Size size = new Size((int)Math.Ceiling((double)ef.Width), (int)Math.Ceiling((double)ef.Height)); | |
82 | - Bitmap bmpSongName = new Bitmap(size.Width, size.Height); | |
83 | - | |
75 | + Bitmap bmpSongName = new Bitmap(1, 1); | |
84 | 76 | bmpSongName = pfタイトル.DrawPrivateFont(this.strSongName, CPrivateFont.DrawMode.Edge, Color.Black, Color.Black, this.clGITADORAgradationTopColor, this.clGITADORAgradationBottomColor, true); |
85 | 77 | this.txSongName = CDTXMania.tテクスチャの生成(bmpSongName, false); |
86 | - | |
87 | - graphics1.Dispose(); | |
88 | - image1.Dispose(); | |
89 | 78 | bmpSongName.Dispose(); |
90 | 79 | |
91 | 80 | pfアーティスト = new CPrivateFastFont(new FontFamily(CDTXMania.ConfigIni.str選曲リストフォント), 15, FontStyle.Regular); |
92 | - this.ftアーティスト名表示フォント = new Font(CDTXMania.ConfigIni.str選曲リストフォント, 15, FontStyle.Bold, GraphicsUnit.Pixel); | |
93 | - | |
94 | - Bitmap image2 = new Bitmap(1, 1); | |
95 | - Graphics graphics2 = Graphics.FromImage(image2); | |
96 | - SizeF ef2 = graphics2.MeasureString(CDTXMania.DTX.ARTIST, this.ftアーティスト名表示フォント); | |
97 | - Size size2 = new Size((int)Math.Ceiling((double)ef2.Width), (int)Math.Ceiling((double)ef2.Height)); | |
98 | - Bitmap bmpArtistName = new Bitmap(size2.Width, size2.Height); | |
99 | - | |
81 | + Bitmap bmpArtistName = new Bitmap(1, 1); | |
100 | 82 | bmpArtistName = pfアーティスト.DrawPrivateFont(CDTXMania.DTX.ARTIST, CPrivateFont.DrawMode.Edge, Color.Black, Color.Black, this.clGITADORAgradationTopColor, this.clGITADORAgradationBottomColor, true); |
101 | 83 | this.txArtistName = CDTXMania.tテクスチャの生成(bmpArtistName, false); |
102 | - | |
103 | - graphics2.Dispose(); | |
104 | - image2.Dispose(); | |
105 | 84 | bmpArtistName.Dispose(); |
106 | 85 | #endregion |
107 | 86 |
@@ -131,27 +110,27 @@ | ||
131 | 110 | } |
132 | 111 | } |
133 | 112 | |
134 | - if (CDTXMania.ConfigIni.bCLASSIC譜面判別を有効にする && (CDTXMania.DTX.bチップがある.LeftCymbal == false) && (CDTXMania.DTX.bチップがある.LP == false) && (CDTXMania.DTX.bチップがある.LBD == false) && (CDTXMania.DTX.bチップがある.FT == false) && (CDTXMania.DTX.bチップがある.Ride == false)) | |
135 | - { | |
136 | - graphics.DrawString(string.Format("{0:00}", num), this.ftSongDifficultyFont, new SolidBrush(Color.FromArgb(0xba, 0xba, 0xba)), (float)0f, (float)-4f); | |
113 | + if (CDTXMania.ConfigIni.bCLASSIC譜面判別を有効にする && (CDTXMania.DTX.bチップがある.LeftCymbal == false) && (CDTXMania.DTX.bチップがある.LP == false) && (CDTXMania.DTX.bチップがある.LBD == false) && (CDTXMania.DTX.bチップがある.FT == false) && (CDTXMania.DTX.bチップがある.Ride == false)) | |
114 | + { | |
115 | + graphics.DrawString(string.Format("{0:00}", num), this.ftSongDifficultyFont, new SolidBrush(Color.FromArgb(0xba, 0xba, 0xba)), (float)0f, (float)-4f); | |
116 | + } | |
117 | + else | |
118 | + { | |
119 | + graphics.DrawString(string.Format("{0:0.00}", num), this.ftSongDifficultyFont, new SolidBrush(Color.FromArgb(0xba, 0xba, 0xba)), (float)0f, (float)-4f); | |
120 | + } | |
121 | + this.txSongLevel = new CTexture(CDTXMania.app.Device, bitmap3, CDTXMania.TextureFormat, false); | |
122 | + graphics.Dispose(); | |
123 | + bitmap3.Dispose(); | |
124 | + Bitmap bitmap4 = new Bitmap(0x2a, 0x30); | |
125 | + graphics = Graphics.FromImage(bitmap4); | |
126 | + graphics.DrawImage(this.iDrumSpeed, new Rectangle(0, 0, 0x2a, 0x30), new Rectangle(0, CDTXMania.ConfigIni.n譜面スクロール速度.Drums * 0x30, 0x2a, 0x30), GraphicsUnit.Pixel); | |
127 | + this.txDrumSpeed = new CTexture(CDTXMania.app.Device, bitmap4, CDTXMania.TextureFormat, false); | |
128 | + graphics.Dispose(); | |
129 | + //graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.Default; | |
130 | + bitmap4.Dispose(); | |
131 | + base.OnManagedリソースの作成(); | |
132 | + } | |
137 | 133 | } |
138 | - else | |
139 | - { | |
140 | - graphics.DrawString(string.Format("{0:0.00}", num), this.ftSongDifficultyFont, new SolidBrush(Color.FromArgb(0xba, 0xba, 0xba)), (float)0f, (float)-4f); | |
141 | - } | |
142 | - this.txSongLevel = new CTexture(CDTXMania.app.Device, bitmap3, CDTXMania.TextureFormat, false); | |
143 | - graphics.Dispose(); | |
144 | - bitmap3.Dispose(); | |
145 | - Bitmap bitmap4 = new Bitmap(0x2a, 0x30); | |
146 | - graphics = Graphics.FromImage(bitmap4); | |
147 | - graphics.DrawImage(this.iDrumSpeed, new Rectangle(0, 0, 0x2a, 0x30), new Rectangle(0, CDTXMania.ConfigIni.n譜面スクロール速度.Drums * 0x30, 0x2a, 0x30), GraphicsUnit.Pixel); | |
148 | - this.txDrumSpeed = new CTexture(CDTXMania.app.Device, bitmap4, CDTXMania.TextureFormat, false); | |
149 | - graphics.Dispose(); | |
150 | - //graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.Default; | |
151 | - bitmap4.Dispose(); | |
152 | - base.OnManagedリソースの作成(); | |
153 | - } | |
154 | - } | |
155 | 134 | public override void OnManagedリソースの解放() |
156 | 135 | { |
157 | 136 | if (!base.b活性化してない) |
@@ -167,23 +146,23 @@ | ||
167 | 146 | base.OnManagedリソースの解放(); |
168 | 147 | } |
169 | 148 | } |
170 | - public override unsafe int On進行描画() | |
171 | - { | |
172 | - if( base.b活性化してない ) | |
173 | - { | |
174 | - return 0; | |
175 | - } | |
176 | - if( base.b初めての進行描画 ) | |
177 | - { | |
178 | - this.ct登場用 = new CCounter( 0, 100, 5, CDTXMania.Timer ); | |
179 | - base.b初めての進行描画 = false; | |
180 | - } | |
181 | - this.ct登場用.t進行(); | |
182 | - int x = this.n本体X; | |
183 | - int y = this.n本体Y; | |
184 | - this.txジャケットパネル.t2D描画( CDTXMania.app.Device, 467, 287); | |
185 | - if( this.txリザルト画像 != null ) | |
186 | - { | |
149 | + public override unsafe int On進行描画() | |
150 | + { | |
151 | + if (base.b活性化してない) | |
152 | + { | |
153 | + return 0; | |
154 | + } | |
155 | + if (base.b初めての進行描画) | |
156 | + { | |
157 | + this.ct登場用 = new CCounter(0, 100, 5, CDTXMania.Timer); | |
158 | + base.b初めての進行描画 = false; | |
159 | + } | |
160 | + this.ct登場用.t進行(); | |
161 | + int x = this.n本体X; | |
162 | + int y = this.n本体Y; | |
163 | + this.txジャケットパネル.t2D描画(CDTXMania.app.Device, 467, 287); | |
164 | + if (this.txリザルト画像 != null) | |
165 | + { | |
187 | 166 | Matrix mat = Matrix.Identity; |
188 | 167 | mat *= Matrix.Scaling(245.0f / this.txリザルト画像.sz画像サイズ.Width, 245.0f / this.txリザルト画像.sz画像サイズ.Height, 1f); |
189 | 168 | mat *= Matrix.Translation(-28f, -94.5f, 0f); |
@@ -190,7 +169,7 @@ | ||
190 | 169 | mat *= Matrix.RotationZ(0.3f); |
191 | 170 | |
192 | 171 | this.txリザルト画像.t3D描画(CDTXMania.app.Device, mat); |
193 | - } | |
172 | + } | |
194 | 173 | |
195 | 174 | if (this.txSongName.sz画像サイズ.Width > 320) |
196 | 175 | this.txSongName.vc拡大縮小倍率.X = 320f / this.txSongName.sz画像サイズ.Width; |
@@ -202,17 +181,17 @@ | ||
202 | 181 | this.txArtistName.t2D描画(CDTXMania.app.Device, 500, 665); |
203 | 182 | |
204 | 183 | if (!this.ct登場用.b終了値に達した) |
205 | - { | |
206 | - return 0; | |
207 | - } | |
208 | - return 1; | |
209 | - } | |
184 | + { | |
185 | + return 0; | |
186 | + } | |
187 | + return 1; | |
188 | + } | |
210 | 189 | |
211 | 190 | |
212 | - // その他 | |
191 | + // その他 | |
213 | 192 | |
214 | - #region [ private ] | |
215 | - //----------------- | |
193 | + #region [ private ] | |
194 | + //----------------- | |
216 | 195 | private CCounter ct登場用; |
217 | 196 | private System.Drawing.Font ftSongDifficultyFont; |
218 | 197 | private System.Drawing.Font ftSongNameFont; |
@@ -231,8 +210,6 @@ | ||
231 | 210 | private CTexture txSongName; |
232 | 211 | private CTexture txArtistName; |
233 | 212 | |
234 | - private Font ftタイトル表示用フォント; | |
235 | - private Font ftアーティスト名表示フォント; | |
236 | 213 | private CPrivateFastFont pfタイトル; |
237 | 214 | private CPrivateFastFont pfアーティスト; |
238 | 215 |
@@ -241,48 +218,48 @@ | ||
241 | 218 | private Color clGITADORAgradationTopColor = Color.FromArgb(0, 220, 200); |
242 | 219 | private Color clGITADORAgradationBottomColor = Color.FromArgb(255, 250, 40); |
243 | 220 | |
244 | - private bool tプレビュー画像の指定があれば構築する() | |
245 | - { | |
246 | - if( string.IsNullOrEmpty( CDTXMania.DTX.PREIMAGE ) ) | |
247 | - { | |
248 | - return false; | |
249 | - } | |
250 | - CDTXMania.tテクスチャの解放( ref this.txリザルト画像 ); | |
251 | - this.r表示するリザルト画像 = null; | |
252 | - string path = CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.PREIMAGE; | |
253 | - if( !File.Exists( path ) ) | |
254 | - { | |
255 | - Trace.TraceWarning( "ファイルが存在しません。({0})", new object[] { path } ); | |
256 | - return false; | |
257 | - } | |
258 | - this.txリザルト画像 = CDTXMania.tテクスチャの生成( path ); | |
259 | - this.r表示するリザルト画像 = this.txリザルト画像; | |
260 | - return ( this.r表示するリザルト画像 != null ); | |
261 | - } | |
262 | - private bool tリザルト画像の指定があれば構築する() | |
263 | - { | |
264 | - int rank = CScoreIni.t総合ランク値を計算して返す( CDTXMania.stage結果.st演奏記録.Drums, CDTXMania.stage結果.st演奏記録.Guitar, CDTXMania.stage結果.st演奏記録.Bass ); | |
265 | - if (rank == 99) // #23534 2010.10.28 yyagi: 演奏チップが0個のときは、rankEと見なす | |
266 | - { | |
267 | - rank = 6; | |
268 | - } | |
269 | - if (string.IsNullOrEmpty(CDTXMania.DTX.RESULTIMAGE[rank])) | |
270 | - { | |
271 | - return false; | |
272 | - } | |
273 | - CDTXMania.tテクスチャの解放( ref this.txリザルト画像 ); | |
274 | - this.r表示するリザルト画像 = null; | |
275 | - string path = CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.RESULTIMAGE[ rank ]; | |
276 | - if( !File.Exists( path ) ) | |
277 | - { | |
278 | - Trace.TraceWarning( "ファイルが存在しません。({0})", new object[] { path } ); | |
279 | - return false; | |
280 | - } | |
281 | - this.txリザルト画像 = CDTXMania.tテクスチャの生成( path ); | |
282 | - this.r表示するリザルト画像 = this.txリザルト画像; | |
283 | - return ( this.r表示するリザルト画像 != null ); | |
284 | - } | |
285 | - //----------------- | |
286 | - #endregion | |
287 | - } | |
221 | + private bool tプレビュー画像の指定があれば構築する() | |
222 | + { | |
223 | + if (string.IsNullOrEmpty(CDTXMania.DTX.PREIMAGE)) | |
224 | + { | |
225 | + return false; | |
226 | + } | |
227 | + CDTXMania.tテクスチャの解放(ref this.txリザルト画像); | |
228 | + this.r表示するリザルト画像 = null; | |
229 | + string path = CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.PREIMAGE; | |
230 | + if (!File.Exists(path)) | |
231 | + { | |
232 | + Trace.TraceWarning("ファイルが存在しません。({0})", new object[] { path }); | |
233 | + return false; | |
234 | + } | |
235 | + this.txリザルト画像 = CDTXMania.tテクスチャの生成(path); | |
236 | + this.r表示するリザルト画像 = this.txリザルト画像; | |
237 | + return (this.r表示するリザルト画像 != null); | |
238 | + } | |
239 | + private bool tリザルト画像の指定があれば構築する() | |
240 | + { | |
241 | + int rank = CScoreIni.t総合ランク値を計算して返す(CDTXMania.stage結果.st演奏記録.Drums, CDTXMania.stage結果.st演奏記録.Guitar, CDTXMania.stage結果.st演奏記録.Bass); | |
242 | + if (rank == 99) // #23534 2010.10.28 yyagi: 演奏チップが0個のときは、rankEと見なす | |
243 | + { | |
244 | + rank = 6; | |
245 | + } | |
246 | + if (string.IsNullOrEmpty(CDTXMania.DTX.RESULTIMAGE[rank])) | |
247 | + { | |
248 | + return false; | |
249 | + } | |
250 | + CDTXMania.tテクスチャの解放(ref this.txリザルト画像); | |
251 | + this.r表示するリザルト画像 = null; | |
252 | + string path = CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.RESULTIMAGE[rank]; | |
253 | + if (!File.Exists(path)) | |
254 | + { | |
255 | + Trace.TraceWarning("ファイルが存在しません。({0})", new object[] { path }); | |
256 | + return false; | |
257 | + } | |
258 | + this.txリザルト画像 = CDTXMania.tテクスチャの生成(path); | |
259 | + this.r表示するリザルト画像 = this.txリザルト画像; | |
260 | + return (this.r表示するリザルト画像 != null); | |
261 | + } | |
262 | + //----------------- | |
263 | + #endregion | |
264 | + } | |
288 | 265 | } |
@@ -104,36 +104,15 @@ | ||
104 | 104 | this.strSongName = CDTXMania.DTX.TITLE; |
105 | 105 | |
106 | 106 | pfタイトル = new CPrivateFastFont(new FontFamily(CDTXMania.ConfigIni.str選曲リストフォント), 20, FontStyle.Regular); |
107 | - this.ftタイトル表示用フォント = new Font(CDTXMania.ConfigIni.str選曲リストフォント, 20, FontStyle.Bold, GraphicsUnit.Pixel); | |
108 | - | |
109 | - Bitmap image1 = new Bitmap(1, 1); | |
110 | - Graphics graphics1 = Graphics.FromImage(image1); | |
111 | - | |
112 | - SizeF ef = graphics1.MeasureString(this.strSongName, this.ftタイトル表示用フォント); | |
113 | - Size size = new Size((int)Math.Ceiling((double)ef.Width), (int)Math.Ceiling((double)ef.Height)); | |
114 | - Bitmap bmpSongName = new Bitmap(size.Width, size.Height); | |
115 | - | |
107 | + Bitmap bmpSongName = new Bitmap(1, 1); | |
116 | 108 | bmpSongName = pfタイトル.DrawPrivateFont(this.strSongName, CPrivateFont.DrawMode.Edge, Color.Black, Color.Black, this.clGITADORAgradationTopColor, this.clGITADORAgradationBottomColor, true); |
117 | 109 | this.txSongName = CDTXMania.tテクスチャの生成(bmpSongName, false); |
118 | - | |
119 | - graphics1.Dispose(); | |
120 | - image1.Dispose(); | |
121 | 110 | bmpSongName.Dispose(); |
122 | 111 | |
123 | 112 | pfアーティスト = new CPrivateFastFont(new FontFamily(CDTXMania.ConfigIni.str選曲リストフォント), 15, FontStyle.Regular); |
124 | - this.ftアーティスト名表示フォント = new Font(CDTXMania.ConfigIni.str選曲リストフォント, 15, FontStyle.Bold, GraphicsUnit.Pixel); | |
125 | - | |
126 | - Bitmap image2 = new Bitmap(1, 1); | |
127 | - Graphics graphics2 = Graphics.FromImage(image2); | |
128 | - SizeF ef2 = graphics2.MeasureString(CDTXMania.DTX.ARTIST, this.ftアーティスト名表示フォント); | |
129 | - Size size2 = new Size((int)Math.Ceiling((double)ef2.Width), (int)Math.Ceiling((double)ef2.Height)); | |
130 | - Bitmap bmpArtistName = new Bitmap(size2.Width, size2.Height); | |
131 | - | |
113 | + Bitmap bmpArtistName = new Bitmap(1, 1); | |
132 | 114 | bmpArtistName = pfアーティスト.DrawPrivateFont(CDTXMania.DTX.ARTIST, CPrivateFont.DrawMode.Edge, Color.Black, Color.Black, this.clGITADORAgradationTopColor, this.clGITADORAgradationBottomColor, true); |
133 | 115 | this.txArtistName = CDTXMania.tテクスチャの生成(bmpArtistName, false); |
134 | - | |
135 | - graphics2.Dispose(); | |
136 | - image2.Dispose(); | |
137 | 116 | bmpArtistName.Dispose(); |
138 | 117 | #endregion |
139 | 118 |
@@ -240,8 +219,6 @@ | ||
240 | 219 | private CTexture txSongName; |
241 | 220 | private CTexture txArtistName; |
242 | 221 | |
243 | - private Font ftタイトル表示用フォント; | |
244 | - private Font ftアーティスト名表示フォント; | |
245 | 222 | private CPrivateFastFont pfタイトル; |
246 | 223 | private CPrivateFastFont pfアーティスト; |
247 | 224 |
@@ -1027,13 +1027,23 @@ | ||
1027 | 1027 | { |
1028 | 1028 | if( this.tx選択中の曲名テクスチャ == null ) |
1029 | 1029 | this.tx選択中の曲名テクスチャ = this.t指定された文字テクスチャを生成する( this.stバー情報[ nパネル番号 ].strタイトル文字列 ); |
1030 | + if ( this.tx選択中の曲名テクスチャ != null ) | |
1031 | + { | |
1032 | + if ( this.tx選択中の曲名テクスチャ.sz画像サイズ.Width > 600 ) | |
1033 | + this.tx選択中の曲名テクスチャ.vc拡大縮小倍率.X = 600f / this.tx選択中の曲名テクスチャ.sz画像サイズ.Width; | |
1034 | + | |
1035 | + this.tx選択中の曲名テクスチャ.t2D描画( CDTXMania.app.Device, 60, 490 ); | |
1036 | + } | |
1037 | + | |
1030 | 1038 | if( this.tx選択中のアーティスト名テクスチャ == null ) |
1031 | 1039 | this.tx選択中のアーティスト名テクスチャ = this.t指定された文字テクスチャを生成する_小( CDTXMania.stage選曲.r現在選択中のスコア.譜面情報.アーティスト名 ); |
1040 | + if ( this.tx選択中のアーティスト名テクスチャ != null ) | |
1041 | + { | |
1042 | + if ( this.tx選択中のアーティスト名テクスチャ.sz画像サイズ.Width > 600 ) | |
1043 | + this.tx選択中のアーティスト名テクスチャ.vc拡大縮小倍率.X = 600f / this.tx選択中のアーティスト名テクスチャ.sz画像サイズ.Width; | |
1032 | 1044 | |
1033 | - if( this.tx選択中の曲名テクスチャ != null ) | |
1034 | - this.tx選択中の曲名テクスチャ.t2D描画( CDTXMania.app.Device, 60, 490 ); | |
1035 | - if( this.tx選択中のアーティスト名テクスチャ != null ) | |
1036 | 1045 | this.tx選択中のアーティスト名テクスチャ.t2D描画( CDTXMania.app.Device, 60, 545 ); |
1046 | + } | |
1037 | 1047 | } |
1038 | 1048 | |
1039 | 1049 | //----------------- |
@@ -6,6 +6,7 @@ | ||
6 | 6 | using System.Drawing; |
7 | 7 | using System.IO; |
8 | 8 | using SlimDX; |
9 | +using SlimDX.Direct3D9; | |
9 | 10 | using System.Drawing.Text; |
10 | 11 | using FDK; |
11 | 12 |
@@ -263,20 +264,9 @@ | ||
263 | 264 | if ((this.str曲タイトル != null) && (this.str曲タイトル.Length > 0)) |
264 | 265 | { |
265 | 266 | pfタイトル = new CPrivateFastFont(new FontFamily(CDTXMania.ConfigIni.str選曲リストフォント), 40, FontStyle.Regular); |
266 | - this.ftタイトル表示用フォント = new Font(CDTXMania.ConfigIni.str選曲リストフォント, 40, FontStyle.Bold, GraphicsUnit.Pixel); | |
267 | - | |
268 | - Bitmap image1 = new Bitmap(1, 1); | |
269 | - Graphics graphics1 = Graphics.FromImage(image1); | |
270 | - | |
271 | - SizeF ef = graphics1.MeasureString(this.str曲タイトル, this.ftタイトル表示用フォント); | |
272 | - Size size = new Size((int)Math.Ceiling((double)ef.Width), (int)Math.Ceiling((double)ef.Height)); | |
273 | - Bitmap bmpSongName = new Bitmap(size.Width, size.Height); | |
274 | - | |
267 | + Bitmap bmpSongName = new Bitmap(1, 1); | |
275 | 268 | bmpSongName = pfタイトル.DrawPrivateFont(this.str曲タイトル, CPrivateFont.DrawMode.Edge, Color.Black, Color.Black, this.clGITADORAgradationTopColor, this.clGITADORAgradationBottomColor, true); |
276 | 269 | this.txタイトル = CDTXMania.tテクスチャの生成(bmpSongName, false); |
277 | - | |
278 | - graphics1.Dispose(); | |
279 | - image1.Dispose(); | |
280 | 270 | bmpSongName.Dispose(); |
281 | 271 | } |
282 | 272 | else |
@@ -287,19 +277,9 @@ | ||
287 | 277 | if ((this.strアーティスト名 != null) && (this.strアーティスト名.Length > 0)) |
288 | 278 | { |
289 | 279 | pfアーティスト = new CPrivateFastFont(new FontFamily(CDTXMania.ConfigIni.str選曲リストフォント), 30, FontStyle.Regular); |
290 | - this.ftアーティスト名表示フォント = new Font(CDTXMania.ConfigIni.str選曲リストフォント, 30, FontStyle.Bold, GraphicsUnit.Pixel); | |
291 | - | |
292 | - Bitmap image2 = new Bitmap(1, 1); | |
293 | - Graphics graphics2 = Graphics.FromImage(image2); | |
294 | - SizeF ef2 = graphics2.MeasureString(this.strアーティスト名, this.ftアーティスト名表示フォント); | |
295 | - Size size2 = new Size((int)Math.Ceiling((double)ef2.Width), (int)Math.Ceiling((double)ef2.Height)); | |
296 | - Bitmap bmpArtistName = new Bitmap(size2.Width, size2.Height); | |
297 | - | |
280 | + Bitmap bmpArtistName = new Bitmap(1, 1); | |
298 | 281 | bmpArtistName = pfアーティスト.DrawPrivateFont(this.strアーティスト名, CPrivateFont.DrawMode.Edge, Color.Black, Color.Black, this.clGITADORAgradationTopColor, this.clGITADORAgradationBottomColor, true); |
299 | 282 | this.txアーティスト = CDTXMania.tテクスチャの生成(bmpArtistName, false); |
300 | - | |
301 | - graphics2.Dispose(); | |
302 | - image2.Dispose(); | |
303 | 283 | bmpArtistName.Dispose(); |
304 | 284 | } |
305 | 285 | else |
@@ -674,8 +654,6 @@ | ||
674 | 654 | private CTexture txRISKY; |
675 | 655 | private ST泡[] st泡 = new ST泡[8]; |
676 | 656 | |
677 | - private Font ftタイトル表示用フォント; | |
678 | - private Font ftアーティスト名表示フォント; | |
679 | 657 | private CPrivateFastFont pfタイトル; |
680 | 658 | private CPrivateFastFont pfアーティスト; |
681 | 659 |