• R/O
  • SSH
  • HTTPS

dxruby: Commit


Commit MetaInfo

Revision528 (tree)
Time2016-04-30 09:39:55
Authormirichi

Log Message

delayed_dispose用配列をRenderTarget内からグローバルに移動

Change Summary

Incremental Difference

--- branches/1.5dev/image.c (revision 527)
+++ branches/1.5dev/image.c (revision 528)
@@ -123,7 +123,7 @@
123123 struct DXRubyImage *image = DXRUBY_GET_STRUCT( Image, self );
124124 DXRUBY_CHECK_DISPOSE( image, texture );
125125
126- rb_ary_push( rt->varray, self );
126+ rb_ary_push( g_WindowInfo.image_array, self );
127127
128128 return self;
129129 }
--- branches/1.5dev/dxruby.h (revision 527)
+++ branches/1.5dev/dxruby.h (revision 528)
@@ -115,6 +115,7 @@
115115 VALUE render_target; /* スクリーンレンダーターゲット */
116116 VALUE before_call; /* 毎フレーム自動で最初に呼ばれる */
117117 VALUE after_call; /* 毎フレーム自動で最後に呼ばれる */
118+ VALUE image_array; /* DrawFontExによる自動生成Image置き場 */
118119 int active; /* ゲーム調整用 */
119120 LPD3DXEFFECT pD3DXEffectCircleShader; /* 円描画用Shader */
120121 LPD3DXEFFECT pD3DXEffectCircleFillShader; /* 塗りつぶし円描画用Shader */
@@ -160,7 +161,6 @@
160161 int g; /* 背景クリア色 緑成分 */
161162 int b; /* 背景クリア色 青成分 */
162163
163- VALUE varray; /* drawFontExによる自動生成Imageの置き場所 */
164164 #ifdef DXRUBY15
165165 VALUE vregenerate_proc;
166166 #endif
--- branches/1.5dev/dxruby.c (revision 527)
+++ branches/1.5dev/dxruby.c (revision 528)
@@ -585,11 +585,11 @@
585585 rt->PictureSize = 0;
586586 rt->PictureDecideCount = 0;
587587 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++ )
589589 {
590- Image_dispose( RARRAY_AREF(rt->varray, i) );
590+ Image_dispose( RARRAY_AREF(g_WindowInfo.image_array, i) );
591591 }
592- rb_ary_clear( rt->varray );
592+ rb_ary_clear( g_WindowInfo.image_array );
593593 }
594594
595595 CleanRenderTargetList();
@@ -754,7 +754,6 @@
754754 free( rt->PictureList );
755755 free( rt->PictureStruct );
756756 rt->PictureCount = 0;
757- rt->varray = Qnil;
758757 #ifdef DXRUBY15
759758 rt->vregenerate_proc = Qnil;
760759 #endif
@@ -2211,7 +2210,6 @@
22112210 rt->PictureSize = 0;
22122211 rt->PictureDecideCount = 0;
22132212 rt->PictureDecideSize = 0;
2214- rt->varray = Qnil;
22152213 #ifdef DXRUBY15
22162214 rt->vregenerate_proc = Qnil;
22172215 #endif
@@ -2246,7 +2244,6 @@
22462244 rb_gc_mark( rt->PictureList[i].picture->value );
22472245 }
22482246
2249- rb_gc_mark( rt->varray );
22502247 #ifdef DXRUBY15
22512248 rb_gc_mark( rt->vregenerate_proc );
22522249 #endif
@@ -2348,8 +2345,6 @@
23482345 rt->r = 0;
23492346 rt->g = 0;
23502347 rt->b = 0;
2351- rt->varray = Qnil;
2352- rt->varray = rb_ary_new();
23532348 #ifdef DXRUBY15
23542349 rt->vregenerate_proc = Qnil;
23552350 #endif
@@ -4438,10 +4433,7 @@
44384433 RenderTarget_drawEx( 4, arr, obj );
44394434 }
44404435
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 );
44454437
44464438 return obj;
44474439 }
@@ -5560,6 +5552,8 @@
55605552 g_WindowInfo.after_call = rb_hash_new();
55615553 rb_global_variable( &g_WindowInfo.before_call );
55625554 rb_global_variable( &g_WindowInfo.after_call );
5555+ g_WindowInfo.image_array = rb_ary_new();
5556+ rb_global_variable( &g_WindowInfo.image_array );
55635557
55645558 g_enc_sys = rb_enc_find( sys_encode );
55655559 g_enc_utf16 = rb_enc_find( "UTF-16LE" );
Show on old repository browser