delayed_dispose用配列をRenderTarget内からグローバルに移動
@@ -123,7 +123,7 @@ | ||
123 | 123 | struct DXRubyImage *image = DXRUBY_GET_STRUCT( Image, self ); |
124 | 124 | DXRUBY_CHECK_DISPOSE( image, texture ); |
125 | 125 | |
126 | - rb_ary_push( rt->varray, self ); | |
126 | + rb_ary_push( g_WindowInfo.image_array, self ); | |
127 | 127 | |
128 | 128 | return self; |
129 | 129 | } |
@@ -115,6 +115,7 @@ | ||
115 | 115 | VALUE render_target; /* スクリーンレンダーターゲット */ |
116 | 116 | VALUE before_call; /* 毎フレーム自動で最初に呼ばれる */ |
117 | 117 | VALUE after_call; /* 毎フレーム自動で最後に呼ばれる */ |
118 | + VALUE image_array; /* DrawFontExによる自動生成Image置き場 */ | |
118 | 119 | int active; /* ゲーム調整用 */ |
119 | 120 | LPD3DXEFFECT pD3DXEffectCircleShader; /* 円描画用Shader */ |
120 | 121 | LPD3DXEFFECT pD3DXEffectCircleFillShader; /* 塗りつぶし円描画用Shader */ |
@@ -160,7 +161,6 @@ | ||
160 | 161 | int g; /* 背景クリア色 緑成分 */ |
161 | 162 | int b; /* 背景クリア色 青成分 */ |
162 | 163 | |
163 | - VALUE varray; /* drawFontExによる自動生成Imageの置き場所 */ | |
164 | 164 | #ifdef DXRUBY15 |
165 | 165 | VALUE vregenerate_proc; |
166 | 166 | #endif |
@@ -585,11 +585,11 @@ | ||
585 | 585 | rt->PictureSize = 0; |
586 | 586 | rt->PictureDecideCount = 0; |
587 | 587 | rt->PictureDecideSize = 0; |
588 | - for( i = 0; i < RARRAY_LEN(rt->varray); i++ ) | |
588 | + for( i = 0; i < RARRAY_LEN(g_WindowInfo.image_array); i++ ) | |
589 | 589 | { |
590 | - Image_dispose( RARRAY_AREF(rt->varray, i) ); | |
590 | + Image_dispose( RARRAY_AREF(g_WindowInfo.image_array, i) ); | |
591 | 591 | } |
592 | - rb_ary_clear( rt->varray ); | |
592 | + rb_ary_clear( g_WindowInfo.image_array ); | |
593 | 593 | } |
594 | 594 | |
595 | 595 | CleanRenderTargetList(); |
@@ -754,7 +754,6 @@ | ||
754 | 754 | free( rt->PictureList ); |
755 | 755 | free( rt->PictureStruct ); |
756 | 756 | rt->PictureCount = 0; |
757 | - rt->varray = Qnil; | |
758 | 757 | #ifdef DXRUBY15 |
759 | 758 | rt->vregenerate_proc = Qnil; |
760 | 759 | #endif |
@@ -2211,7 +2210,6 @@ | ||
2211 | 2210 | rt->PictureSize = 0; |
2212 | 2211 | rt->PictureDecideCount = 0; |
2213 | 2212 | rt->PictureDecideSize = 0; |
2214 | - rt->varray = Qnil; | |
2215 | 2213 | #ifdef DXRUBY15 |
2216 | 2214 | rt->vregenerate_proc = Qnil; |
2217 | 2215 | #endif |
@@ -2246,7 +2244,6 @@ | ||
2246 | 2244 | rb_gc_mark( rt->PictureList[i].picture->value ); |
2247 | 2245 | } |
2248 | 2246 | |
2249 | - rb_gc_mark( rt->varray ); | |
2250 | 2247 | #ifdef DXRUBY15 |
2251 | 2248 | rb_gc_mark( rt->vregenerate_proc ); |
2252 | 2249 | #endif |
@@ -2348,8 +2345,6 @@ | ||
2348 | 2345 | rt->r = 0; |
2349 | 2346 | rt->g = 0; |
2350 | 2347 | rt->b = 0; |
2351 | - rt->varray = Qnil; | |
2352 | - rt->varray = rb_ary_new(); | |
2353 | 2348 | #ifdef DXRUBY15 |
2354 | 2349 | rt->vregenerate_proc = Qnil; |
2355 | 2350 | #endif |
@@ -4438,10 +4433,7 @@ | ||
4438 | 4433 | RenderTarget_drawEx( 4, arr, obj ); |
4439 | 4434 | } |
4440 | 4435 | |
4441 | - { | |
4442 | - struct DXRubyRenderTarget *grt = DXRUBY_GET_STRUCT( RenderTarget, g_WindowInfo.render_target ); | |
4443 | - rb_ary_push( grt->varray, vimage ); | |
4444 | - } | |
4436 | + rb_ary_push( g_WindowInfo.image_array, vimage ); | |
4445 | 4437 | |
4446 | 4438 | return obj; |
4447 | 4439 | } |
@@ -5560,6 +5552,8 @@ | ||
5560 | 5552 | g_WindowInfo.after_call = rb_hash_new(); |
5561 | 5553 | rb_global_variable( &g_WindowInfo.before_call ); |
5562 | 5554 | rb_global_variable( &g_WindowInfo.after_call ); |
5555 | + g_WindowInfo.image_array = rb_ary_new(); | |
5556 | + rb_global_variable( &g_WindowInfo.image_array ); | |
5563 | 5557 | |
5564 | 5558 | g_enc_sys = rb_enc_find( sys_encode ); |
5565 | 5559 | g_enc_utf16 = rb_enc_find( "UTF-16LE" ); |