OSDN Git Service

#none チップファイア関連コードのリファクタ。若干負荷軽減もしているが、感覚的には負荷は変わらず。
authoryyagi <yyagi@16f42ceb-6dc6-49c8-ba94-f2d53467949d>
Mon, 20 Jun 2011 15:56:09 +0000 (15:56 +0000)
committeryyagi <yyagi@16f42ceb-6dc6-49c8-ba94-f2d53467949d>
Mon, 20 Jun 2011 15:56:09 +0000 (15:56 +0000)
git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/trunk@212 16f42ceb-6dc6-49c8-ba94-f2d53467949d

DTXManiaプロジェクト/コード/ステージ/07.演奏/ドラム画面/CAct演奏DrumsチップファイアD.cs

index e832882..bdc2a7e 100644 (file)
@@ -35,17 +35,26 @@ namespace DTXMania
                {\r
                        if( this.tx火花 != null )\r
                        {\r
-                               float num = CDTXMania.Random.Next( 360 );\r
-                               for( int i = 0; i < 8; i++ )\r
+                               for ( int j = 0; j < FIRE_MAX; j++ )\r
                                {\r
-                                       for( int j = 0; j < 0x40; j++ )\r
+                                       if ( this.st火花[ j ].b使用中 && this.st火花[ j ].nLane == (int) lane )          // yyagi 負荷軽減のつもり・・・だが、あまり効果なさげ\r
+                                       {\r
+                                               this.st火花[ j ].ct進行.t停止();\r
+                                               this.st火花[ j ].b使用中 = false;\r
+                                       }\r
+                               }\r
+                               float n回転初期値 = CDTXMania.Random.Next( 360 );\r
+                               for ( int i = 0; i < 8; i++ )\r
+                               {\r
+                                       for( int j = 0; j < FIRE_MAX; j++ )\r
                                        {\r
                                                if( !this.st火花[ j ].b使用中 )\r
                                                {\r
                                                        this.st火花[ j ].b使用中 = true;\r
                                                        this.st火花[ j ].nLane = (int) lane;\r
+//                                                     this.st火花[ j ].ct進行 = new CCounter( 0, 35, 6, CDTXMania.Timer );\r
                                                        this.st火花[ j ].ct進行 = new CCounter( 0, 70, 3, CDTXMania.Timer );\r
-                                                       this.st火花[ j ].f回転単位 = C変換.DegreeToRadian( (float) ( num + ( i * 90f ) ) );\r
+                                                       this.st火花[ j ].f回転単位 = C変換.DegreeToRadian( (float) ( n回転初期値 + ( i * 90f ) ) );\r
                                                        this.st火花[ j ].f回転方向 = ( i < 4 ) ? 1f : -2f;\r
                                                        this.st火花[ j ].fサイズ = ( i < 4 ) ? 1f : 0.5f;\r
                                                        break;\r
@@ -55,25 +64,25 @@ namespace DTXMania
                        }\r
                        if( bフィルイン && ( this.tx青い星 != null ) )\r
                        {\r
-                               for( int k = 0; k < 0x10; k++ )\r
+                               for( int i = 0; i < 0x10; i++ )\r
                                {\r
-                                       for( int m = 0; m < 0x100; m++ )\r
+                                       for( int j = 0; j < STAR_MAX; j++ )\r
                                        {\r
-                                               if( !this.st青い星[ m ].b使用中 )\r
+                                               if( !this.st青い星[ j ].b使用中 )\r
                                                {\r
-                                                       this.st青い星[ m ].b使用中 = true;\r
-                                                       int num6 = CDTXMania.Random.Next( 360 );\r
+                                                       this.st青い星[ j ].b使用中 = true;\r
+                                                       int n回転初期値 = CDTXMania.Random.Next( 360 );\r
                                                        double num7 = 0.9 + ( ( (double) CDTXMania.Random.Next( 40 ) ) / 100.0 );\r
-                                                       this.st青い星[ m ].nLane = (int) lane;\r
-                                                       this.st青い星[ m ].ct進行 = new CCounter( 0, 100, 7, CDTXMania.Timer );\r
-                                                       this.st青い星[ m ].fX = this.nレーンの中央X座標[ (int) lane ];\r
-                                                       this.st青い星[ m ].fY = CDTXMania.ConfigIni.bReverse.Drums ? ( (float) 0x37 ) : ( (float) 0x1a9 );\r
-                                                       this.st青い星[ m ].f加速度X = (float) ( num7 * Math.Cos( ( 6.2831853071795862 * num6 ) / 360.0 ) );\r
-                                                       this.st青い星[ m ].f加速度Y = (float) ( num7 * ( Math.Sin( ( 6.2831853071795862 * num6 ) / 360.0 ) - 0.2 ) );\r
-                                                       this.st青い星[ m ].f加速度の加速度X = 0.995f;\r
-                                                       this.st青い星[ m ].f加速度の加速度Y = 0.995f;\r
-                                                       this.st青い星[ m ].f重力加速度 = 0.00355f;\r
-                                                       this.st青い星[ m ].f半径 = (float) ( 0.5 + ( ( (double) CDTXMania.Random.Next( 30 ) ) / 100.0 ) );\r
+                                                       this.st青い星[ j ].nLane = (int) lane;\r
+                                                       this.st青い星[ j ].ct進行 = new CCounter( 0, 100, 7, CDTXMania.Timer );\r
+                                                       this.st青い星[ j ].fX = this.nレーンの中央X座標[ (int) lane ];\r
+                                                       this.st青い星[ j ].fY = CDTXMania.ConfigIni.bReverse.Drums ? ( (float) 0x37 ) : ( (float) 0x1a9 );\r
+                                                       this.st青い星[ j ].f加速度X = (float) ( num7 * Math.Cos( ( Math.PI * 2 * n回転初期値 ) / 360.0 ) );\r
+                                                       this.st青い星[ j ].f加速度Y = (float) ( num7 * ( Math.Sin( ( Math.PI * 2 * n回転初期値 ) / 360.0 ) - 0.2 ) );\r
+                                                       this.st青い星[ j ].f加速度の加速度X = 0.995f;\r
+                                                       this.st青い星[ j ].f加速度の加速度Y = 0.995f;\r
+                                                       this.st青い星[ j ].f重力加速度 = 0.00355f;\r
+                                                       this.st青い星[ j ].f半径 = (float) ( 0.5 + ( ( (double) CDTXMania.Random.Next( 30 ) ) / 100.0 ) );\r
                                                        break;\r
                                                }\r
                                        }\r
@@ -81,22 +90,22 @@ namespace DTXMania
                        }\r
                        if( b大波 && ( this.tx大波 != null ) )\r
                        {\r
-                               for( int n = 0; n < 4; n++ )\r
+                               for( int i = 0; i < 4; i++ )\r
                                {\r
-                                       for( int num9 = 0; num9 < 20; num9++ )\r
+                                       for( int j = 0; j < BIGWAVE_MAX; j++ )\r
                                        {\r
-                                               if( !this.st大波[ num9 ].b使用中 )\r
+                                               if( !this.st大波[ j ].b使用中 )\r
                                                {\r
-                                                       this.st大波[ num9 ].b使用中 = true;\r
-                                                       this.st大波[ num9 ].nLane = (int) lane;\r
-                                                       this.st大波[ num9 ].f半径 = ( (float) ( ( 20 - CDTXMania.Random.Next( 40 ) ) + 100 ) ) / 100f;\r
-                                                       this.st大波[ num9 ].n進行速度ms = 10;\r
-                                                       this.st大波[ num9 ].ct進行 = new CCounter( 0, 100, this.st大波[ num9 ].n進行速度ms, CDTXMania.Timer );\r
-                                                       this.st大波[ num9 ].ct進行.n現在の値 = n * 10;\r
-                                                       this.st大波[ num9 ].f角度X = C変換.DegreeToRadian( (float) ( ( ( (double) ( CDTXMania.Random.Next( 100 ) * 50 ) ) / 100.0 ) + 30.0 ) );\r
-                                                       this.st大波[ num9 ].f角度Y = C変換.DegreeToRadian( this.b大波Balance ? ( this.fY波の最小仰角[ (int) lane ] + CDTXMania.Random.Next( 30 ) ) : ( this.fY波の最大仰角[ (int) lane ] - CDTXMania.Random.Next( 30 ) ) );\r
-                                                       this.st大波[ num9 ].f回転単位 = C変換.DegreeToRadian( (float) 0f );\r
-                                                       this.st大波[ num9 ].f回転方向 = 1f;\r
+                                                       this.st大波[ j ].b使用中 = true;\r
+                                                       this.st大波[ j ].nLane = (int) lane;\r
+                                                       this.st大波[ j ].f半径 = ( (float) ( ( 20 - CDTXMania.Random.Next( 40 ) ) + 100 ) ) / 100f;\r
+                                                       this.st大波[ j ].n進行速度ms = 10;\r
+                                                       this.st大波[ j ].ct進行 = new CCounter( 0, 100, this.st大波[ j ].n進行速度ms, CDTXMania.Timer );\r
+                                                       this.st大波[ j ].ct進行.n現在の値 = i * 10;\r
+                                                       this.st大波[ j ].f角度X = C変換.DegreeToRadian( (float) ( ( ( (double) ( CDTXMania.Random.Next( 100 ) * 50 ) ) / 100.0 ) + 30.0 ) );\r
+                                                       this.st大波[ j ].f角度Y = C変換.DegreeToRadian( this.b大波Balance ? ( this.fY波の最小仰角[ (int) lane ] + CDTXMania.Random.Next( 30 ) ) : ( this.fY波の最大仰角[ (int) lane ] - CDTXMania.Random.Next( 30 ) ) );\r
+                                                       this.st大波[ j ].f回転単位 = C変換.DegreeToRadian( (float) 0f );\r
+                                                       this.st大波[ j ].f回転方向 = 1f;\r
                                                        this.b大波Balance = !this.b大波Balance;\r
                                                        break;\r
                                                }\r
@@ -105,20 +114,20 @@ namespace DTXMania
                        }\r
                        if( b細波 && ( this.tx細波 != null ) )\r
                        {\r
-                               for( int num10 = 0; num10 < 1; num10++ )\r
+                               for( int i = 0; i < 1; i++ )\r
                                {\r
-                                       for( int num11 = 0; num11 < 20; num11++ )\r
+                                       for( int j = 0; j < BIGWAVE_MAX; j++ )\r
                                        {\r
-                                               if( !this.st細波[ num11 ].b使用中 )\r
+                                               if( !this.st細波[ j ].b使用中 )\r
                                                {\r
-                                                       this.st細波[ num11 ].b使用中 = true;\r
-                                                       this.st細波[ num11 ].nLane = (int) lane;\r
-                                                       this.st細波[ num11 ].f半径 = ( (float) ( ( 20 - CDTXMania.Random.Next( 40 ) ) + 100 ) ) / 100f;\r
-                                                       this.st細波[ num11 ].n進行速度ms = 8;\r
-                                                       this.st細波[ num11 ].ct進行 = new CCounter( 0, 100, this.st細波[ num11 ].n進行速度ms, CDTXMania.Timer );\r
-                                                       this.st細波[ num11 ].ct進行.n現在の値 = 0;\r
-                                                       this.st細波[ num11 ].f角度X = C変換.DegreeToRadian( (float) ( ( ( (double) ( CDTXMania.Random.Next( 100 ) * 50 ) ) / 100.0 ) + 30.0 ) );\r
-                                                       this.st細波[ num11 ].f角度Y = C変換.DegreeToRadian( this.b細波Balance ? ( this.fY波の最小仰角[ (int) lane ] + CDTXMania.Random.Next( 30 ) ) : ( this.fY波の最大仰角[ (int) lane ] - CDTXMania.Random.Next( 30 ) ) );\r
+                                                       this.st細波[ j ].b使用中 = true;\r
+                                                       this.st細波[ j ].nLane = (int) lane;\r
+                                                       this.st細波[ j ].f半径 = ( (float) ( ( 20 - CDTXMania.Random.Next( 40 ) ) + 100 ) ) / 100f;\r
+                                                       this.st細波[ j ].n進行速度ms = 8;\r
+                                                       this.st細波[ j ].ct進行 = new CCounter( 0, 100, this.st細波[ j ].n進行速度ms, CDTXMania.Timer );\r
+                                                       this.st細波[ j ].ct進行.n現在の値 = 0;\r
+                                                       this.st細波[ j ].f角度X = C変換.DegreeToRadian( (float) ( ( ( (double) ( CDTXMania.Random.Next( 100 ) * 50 ) ) / 100.0 ) + 30.0 ) );\r
+                                                       this.st細波[ j ].f角度Y = C変換.DegreeToRadian( this.b細波Balance ? ( this.fY波の最小仰角[ (int) lane ] + CDTXMania.Random.Next( 30 ) ) : ( this.fY波の最大仰角[ (int) lane ] - CDTXMania.Random.Next( 30 ) ) );\r
                                                        this.b細波Balance = !this.b細波Balance;\r
                                                        break;\r
                                                }\r
@@ -132,51 +141,43 @@ namespace DTXMania
 \r
                public override void On活性化()\r
                {\r
-                       for( int i = 0; i < 0x40; i++ )\r
+                       for( int i = 0; i < FIRE_MAX; i++ )\r
                        {\r
-                               ST火花 st火花2 = new ST火花();\r
-                               ST火花 st火花 = st火花2;\r
-                               st火花.b使用中 = false;\r
-                               st火花.ct進行 = new CCounter();\r
-                               this.st火花[ i ] = st火花;\r
+                               this.st火花[ i ] = new ST火花();\r
+                               this.st火花[ i ].b使用中 = false;\r
+                               this.st火花[ i ].ct進行 = new CCounter();\r
                        }\r
-                       for( int j = 0; j < 0x100; j++ )\r
+                       for( int i = 0; i < STAR_MAX; i++ )\r
                        {\r
-                               ST青い星 st青い星2 = new ST青い星();\r
-                               ST青い星 st青い星 = st青い星2;\r
-                               st青い星.b使用中 = false;\r
-                               st青い星.ct進行 = new CCounter();\r
-                               this.st青い星[ j ] = st青い星;\r
+                               this.st青い星[ i ] = new ST青い星();\r
+                               this.st青い星[ i ].b使用中 = false;\r
+                               this.st青い星[ i ].ct進行 = new CCounter();\r
                        }\r
-                       for( int k = 0; k < 20; k++ )\r
+                       for( int i = 0; i < BIGWAVE_MAX; i++ )\r
                        {\r
-                               ST大波 st大波2 = new ST大波();\r
-                               ST大波 st大波 = st大波2;\r
-                               st大波.b使用中 = false;\r
-                               st大波.ct進行 = new CCounter();\r
-                               this.st大波[ k ] = st大波;\r
-                               ST細波 st細波2 = new ST細波();\r
-                               ST細波 st細波 = st細波2;\r
-                               st細波.b使用中 = false;\r
-                               st細波.ct進行 = new CCounter();\r
-                               this.st細波[ k ] = st細波;\r
+                               this.st大波[ i ] = new ST大波();\r
+                               this.st大波[ i ].b使用中 = false;\r
+                               this.st大波[ i ].ct進行 = new CCounter();\r
+                               this.st細波[ i ] = new ST細波();\r
+                               this.st細波[ i ].b使用中 = false;\r
+                               this.st細波[ i ].ct進行 = new CCounter();\r
                        }\r
                        base.On活性化();\r
                }\r
                public override void On非活性化()\r
                {\r
-                       for( int i = 0; i < 0x40; i++ )\r
+                       for( int i = 0; i <FIRE_MAX; i++ )\r
                        {\r
                                this.st火花[ i ].ct進行 = null;\r
                        }\r
-                       for( int j = 0; j < 0x100; j++ )\r
+                       for( int i = 0; i < STAR_MAX; i++ )\r
                        {\r
-                               this.st青い星[ j ].ct進行 = null;\r
+                               this.st青い星[ i ].ct進行 = null;\r
                        }\r
-                       for( int k = 0; k < 20; k++ )\r
+                       for( int i = 0; i < BIGWAVE_MAX; i++ )\r
                        {\r
-                               this.st大波[ k ].ct進行 = null;\r
-                               this.st細波[ k ].ct進行 = null;\r
+                               this.st大波[ i ].ct進行 = null;\r
+                               this.st細波[ i ].ct進行 = null;\r
                        }\r
                        base.On非活性化();\r
                }\r
@@ -222,7 +223,7 @@ namespace DTXMania
                {\r
                        if( !base.b活性化してない )\r
                        {\r
-                               for( int i = 0; i < 0x40; i++ )\r
+                               for( int i = 0; i < FIRE_MAX; i++ )\r
                                {\r
                                        if( this.st火花[ i ].b使用中 )\r
                                        {\r
@@ -233,12 +234,14 @@ namespace DTXMania
                                                        this.st火花[ i ].b使用中 = false;\r
                                                }\r
                                                Matrix identity = Matrix.Identity;\r
+//                                             float num2 = ( (float) this.st火花[ i ].ct進行.n現在の値 * 2 ) / 70f;\r
                                                float num2 = ( (float) this.st火花[ i ].ct進行.n現在の値 ) / 70f;\r
                                                float num3 = this.st火花[ i ].f回転単位 + ( this.st火花[ i ].f回転方向 * C変換.DegreeToRadian( (float) ( 60f * num2 ) ) );\r
-                                               float num4 = ( (float) ( 0.2 + ( 0.8 * Math.Cos( ( ( (double) this.st火花[ i ].ct進行.n現在の値 ) / 50.0 ) * 1.5707963267948966 ) ) ) ) * this.st火花[ i ].fサイズ;\r
+//                                             float num4 = ( (float) ( 0.2 + ( 0.8 * Math.Cos( ( ( (double) this.st火花[ i ].ct進行.n現在の値 ) * 2 / 50.0 ) * Math.PI / 2 ) ) ) ) * this.st火花[ i ].fサイズ;\r
+                                               float num4 = ( (float) ( 0.2 + ( 0.8 * Math.Cos( ( ( (double) this.st火花[ i ].ct進行.n現在の値 ) / 50.0 ) * Math.PI / 2 ) ) ) ) * this.st火花[ i ].fサイズ;\r
                                                identity *= Matrix.Scaling( 0.2f + num4, 0.2f + this.st火花[ i ].fサイズ, 1f );\r
-                                               identity *= Matrix.RotationZ( num3 + ( (float) 1.5707963267948966 ) );\r
-                                               float num5 = ( (float) ( 0.8 * Math.Sin( num2 * 1.5707963267948966 ) ) ) * this.st火花[ i ].fサイズ;\r
+                                               identity *= Matrix.RotationZ( num3 + ( (float) Math.PI / 2 ) );\r
+                                               float num5 = ( (float) ( 0.8 * Math.Sin( num2 * Math.PI / 2 ) ) ) * this.st火花[ i ].fサイズ;\r
                                                identity *= Matrix.Translation( ( this.nレーンの中央X座標[ this.st火花[ i ].nLane ] + ( ( (float) Math.Cos( (double) num3 ) ) * num5 ) ) - 320f, -( ( ( CDTXMania.ConfigIni.bReverse.Drums ? ( (float) 0x37 ) : ( (float) 0x1a9 ) ) + ( ( (float) Math.Sin( (double) num3 ) ) * num5 ) ) - 240f ), 0f );\r
                                                if( this.tx火花 != null )\r
                                                {\r
@@ -246,50 +249,50 @@ namespace DTXMania
                                                }\r
                                        }\r
                                }\r
-                               for( int j = 0; j < 0x100; j++ )\r
+                               for( int i = 0; i < STAR_MAX; i++ )\r
                                {\r
-                                       if( this.st青い星[ j ].b使用中 )\r
+                                       if( this.st青い星[ i ].b使用中 )\r
                                        {\r
-                                               this.st青い星[ j ].n前回のValue = this.st青い星[ j ].ct進行.n現在の値;\r
-                                               this.st青い星[ j ].ct進行.t進行();\r
-                                               if( this.st青い星[ j ].ct進行.b終了値に達した )\r
+                                               this.st青い星[ i ].n前回のValue = this.st青い星[ i ].ct進行.n現在の値;\r
+                                               this.st青い星[ i ].ct進行.t進行();\r
+                                               if( this.st青い星[ i ].ct進行.b終了値に達した )\r
                                                {\r
-                                                       this.st青い星[ j ].ct進行.t停止();\r
-                                                       this.st青い星[ j ].b使用中 = false;\r
+                                                       this.st青い星[ i ].ct進行.t停止();\r
+                                                       this.st青い星[ i ].b使用中 = false;\r
                                                }\r
-                                               for( int n = this.st青い星[ j ].n前回のValue; n < this.st青い星[ j ].ct進行.n現在の値; n++ )\r
+                                               for( int n = this.st青い星[ i ].n前回のValue; n < this.st青い星[ i ].ct進行.n現在の値; n++ )\r
                                                {\r
-                                                       this.st青い星[ j ].fX += this.st青い星[ j ].f加速度X;\r
-                                                       this.st青い星[ j ].fY -= this.st青い星[ j ].f加速度Y;\r
-                                                       this.st青い星[ j ].f加速度X *= this.st青い星[ j ].f加速度の加速度X;\r
-                                                       this.st青い星[ j ].f加速度Y *= this.st青い星[ j ].f加速度の加速度Y;\r
-                                                       this.st青い星[ j ].f加速度Y -= this.st青い星[ j ].f重力加速度;\r
+                                                       this.st青い星[ i ].fX += this.st青い星[ i ].f加速度X;\r
+                                                       this.st青い星[ i ].fY -= this.st青い星[ i ].f加速度Y;\r
+                                                       this.st青い星[ i ].f加速度X *= this.st青い星[ i ].f加速度の加速度X;\r
+                                                       this.st青い星[ i ].f加速度Y *= this.st青い星[ i ].f加速度の加速度Y;\r
+                                                       this.st青い星[ i ].f加速度Y -= this.st青い星[ i ].f重力加速度;\r
                                                }\r
                                                Matrix mat = Matrix.Identity;\r
-                                               float x = (float) ( this.st青い星[ j ].f半径 * Math.Cos( ( 1.5707963267948966 * this.st青い星[ j ].ct進行.n現在の値 ) / 100.0 ) );\r
+                                               float x = (float) ( this.st青い星[ i ].f半径 * Math.Cos( ( Math.PI / 2 * this.st青い星[ i ].ct進行.n現在の値 ) / 100.0 ) );\r
                                                mat *= Matrix.Scaling( x, x, 1f );\r
-                                               mat *= Matrix.Translation( this.st青い星[ j ].fX - 320f, -( this.st青い星[ j ].fY - 240f ), 0f );\r
+                                               mat *= Matrix.Translation( this.st青い星[ i ].fX - 320f, -( this.st青い星[ i ].fY - 240f ), 0f );\r
                                                if( this.tx青い星 != null )\r
                                                {\r
                                                        this.tx青い星.t3D描画( CDTXMania.app.Device, mat );\r
                                                }\r
                                        }\r
                                }\r
-                               for( int k = 0; k < 20; k++ )\r
+                               for( int i = 0; i < BIGWAVE_MAX; i++ )\r
                                {\r
-                                       if( this.st大波[ k ].b使用中 )\r
+                                       if( this.st大波[ i ].b使用中 )\r
                                        {\r
-                                               this.st大波[ k ].ct進行.t進行();\r
-                                               if( this.st大波[ k ].ct進行.b終了値に達した )\r
+                                               this.st大波[ i ].ct進行.t進行();\r
+                                               if( this.st大波[ i ].ct進行.b終了値に達した )\r
                                                {\r
-                                                       this.st大波[ k ].ct進行.t停止();\r
-                                                       this.st大波[ k ].b使用中 = false;\r
+                                                       this.st大波[ i ].ct進行.t停止();\r
+                                                       this.st大波[ i ].b使用中 = false;\r
                                                }\r
-                                               if( this.st大波[ k ].ct進行.n現在の値 >= 0 )\r
+                                               if( this.st大波[ i ].ct進行.n現在の値 >= 0 )\r
                                                {\r
                                                        Matrix matrix3 = Matrix.Identity;\r
-                                                       float num10 = ( (float) this.st大波[ k ].ct進行.n現在の値 ) / 100f;\r
-                                                       float angle = this.st大波[ k ].f回転単位 + ( this.st大波[ k ].f回転方向 * C変換.DegreeToRadian( (float) ( 60f * num10 ) ) );\r
+                                                       float num10 = ( (float) this.st大波[ i ].ct進行.n現在の値 ) / 100f;\r
+                                                       float angle = this.st大波[ i ].f回転単位 + ( this.st大波[ i ].f回転方向 * C変換.DegreeToRadian( (float) ( 60f * num10 ) ) );\r
                                                        float num12 = 1f;\r
                                                        if( num10 < 0.4f )\r
                                                        {\r
@@ -297,7 +300,7 @@ namespace DTXMania
                                                        }\r
                                                        else if( num10 < 0.8f )\r
                                                        {\r
-                                                               num12 = (float) ( 1.0 + ( 10.1 * ( 1.0 - Math.Cos( ( 1.5707963267948966 * ( num10 - 0.4 ) ) * 2.5 ) ) ) );\r
+                                                               num12 = (float) ( 1.0 + ( 10.1 * ( 1.0 - Math.Cos( ( Math.PI / 2 * ( num10 - 0.4 ) ) * 2.5 ) ) ) );\r
                                                        }\r
                                                        else\r
                                                        {\r
@@ -312,11 +315,11 @@ namespace DTXMania
                                                        {\r
                                                                num13 = (int) ( ( 55f * ( 1f - num10 ) ) / 0.25f );\r
                                                        }\r
-                                                       matrix3 *= Matrix.Scaling( num12 * this.st大波[ k ].f半径, num12 * this.st大波[ k ].f半径, 1f );\r
+                                                       matrix3 *= Matrix.Scaling( num12 * this.st大波[ i ].f半径, num12 * this.st大波[ i ].f半径, 1f );\r
                                                        matrix3 *= Matrix.RotationZ( angle );\r
-                                                       matrix3 *= Matrix.RotationX( this.st大波[ k ].f角度X );\r
-                                                       matrix3 *= Matrix.RotationY( this.st大波[ k ].f角度Y );\r
-                                                       matrix3 *= Matrix.Translation( this.nレーンの中央X座標[ this.st大波[ k ].nLane ] - 320f, -( ( CDTXMania.ConfigIni.bReverse.Drums ? ( (float) 0x37 ) : ( (float) 0x1a9 ) ) - 240f ), 0f );\r
+                                                       matrix3 *= Matrix.RotationX( this.st大波[ i ].f角度X );\r
+                                                       matrix3 *= Matrix.RotationY( this.st大波[ i ].f角度Y );\r
+                                                       matrix3 *= Matrix.Translation( this.nレーンの中央X座標[ this.st大波[ i ].nLane ] - 320f, -( ( CDTXMania.ConfigIni.bReverse.Drums ? ( (float) 0x37 ) : ( (float) 0x1a9 ) ) - 240f ), 0f );\r
                                                        if( this.tx大波 != null )\r
                                                        {\r
                                                                this.tx大波.n透明度 = num13;\r
@@ -325,26 +328,26 @@ namespace DTXMania
                                                }\r
                                        }\r
                                }\r
-                               for( int m = 0; m < 20; m++ )\r
+                               for( int i = 0; i < BIGWAVE_MAX; i++ )\r
                                {\r
-                                       if( this.st細波[ m ].b使用中 )\r
+                                       if( this.st細波[ i ].b使用中 )\r
                                        {\r
-                                               this.st細波[ m ].ct進行.t進行();\r
-                                               if( this.st細波[ m ].ct進行.b終了値に達した )\r
+                                               this.st細波[ i ].ct進行.t進行();\r
+                                               if( this.st細波[ i ].ct進行.b終了値に達した )\r
                                                {\r
-                                                       this.st細波[ m ].ct進行.t停止();\r
-                                                       this.st細波[ m ].b使用中 = false;\r
+                                                       this.st細波[ i ].ct進行.t停止();\r
+                                                       this.st細波[ i ].b使用中 = false;\r
                                                }\r
-                                               if( this.st細波[ m ].ct進行.n現在の値 >= 0 )\r
+                                               if( this.st細波[ i ].ct進行.n現在の値 >= 0 )\r
                                                {\r
                                                        Matrix matrix4 = Matrix.Identity;\r
-                                                       float num15 = ( (float) this.st細波[ m ].ct進行.n現在の値 ) / 100f;\r
+                                                       float num15 = ( (float) this.st細波[ i ].ct進行.n現在の値 ) / 100f;\r
                                                        float num16 = 14f * num15;\r
                                                        int num17 = ( num15 < 0.5f ) ? 0x9b : ( (int) ( ( 155f * ( 1f - num15 ) ) / 1f ) );\r
-                                                       matrix4 *= Matrix.Scaling( num16 * this.st細波[ m ].f半径, num16 * this.st細波[ m ].f半径, 1f );\r
-                                                       matrix4 *= Matrix.RotationX( this.st細波[ m ].f角度X );\r
-                                                       matrix4 *= Matrix.RotationY( this.st細波[ m ].f角度Y );\r
-                                                       matrix4 *= Matrix.Translation( this.nレーンの中央X座標[ this.st細波[ m ].nLane ] - 320f, -( ( CDTXMania.ConfigIni.bReverse.Drums ? ( (float) 0x37 ) : ( (float) 0x1a9 ) ) - 240f ), 0f );\r
+                                                       matrix4 *= Matrix.Scaling( num16 * this.st細波[ i ].f半径, num16 * this.st細波[ i ].f半径, 1f );\r
+                                                       matrix4 *= Matrix.RotationX( this.st細波[ i ].f角度X );\r
+                                                       matrix4 *= Matrix.RotationY( this.st細波[ i ].f角度Y );\r
+                                                       matrix4 *= Matrix.Translation( this.nレーンの中央X座標[ this.st細波[ i ].nLane ] - 320f, -( ( CDTXMania.ConfigIni.bReverse.Drums ? ( (float) 0x37 ) : ( (float) 0x1a9 ) ) - 240f ), 0f );\r
                                                        if( this.tx細波 != null )\r
                                                        {\r
                                                                this.tx細波.n透明度 = num17;\r
@@ -416,15 +419,15 @@ namespace DTXMania
                private const int BIGWAVE_MAX = 20;\r
                private bool b細波Balance;\r
                private bool b大波Balance;\r
-               private const int FIRE_MAX = 0x40;\r
+               private const int FIRE_MAX = 8 * 8;\r
                private readonly float[] fY波の最小仰角 = new float[] { -130f, -126f, -120f, -118f, -110f, -108f, -103f, -97f };\r
                private readonly float[] fY波の最大仰角 = new float[] { 70f, 72f, 77f, 84f, 89f, 91f, 99f, 107f };\r
                private readonly int[] nレーンの中央X座標 = new int[] { 0x36, 0x5c, 0x7e, 0xa7, 0xd0, 0xf2, 0x114, 0x139 };\r
                private const int STAR_MAX = 0x100;\r
-               private ST火花[] st火花 = new ST火花[ 0x40 ];\r
-               private ST細波[] st細波 = new ST細波[ 20 ];\r
-               private ST青い星[] st青い星 = new ST青い星[ 0x100 ];\r
-               private ST大波[] st大波 = new ST大波[ 20 ];\r
+               private ST火花[] st火花 = new ST火花[ FIRE_MAX ];\r
+               private ST大波[] st大波 = new ST大波[ BIGWAVE_MAX ];\r
+               private ST細波[] st細波 = new ST細波[ BIGWAVE_MAX ];\r
+               private ST青い星[] st青い星 = new ST青い星[ STAR_MAX ];\r
                private CTexture tx火花;\r
                private CTexture tx細波;\r
                private CTexture tx青い星;\r