[Swfed-svn] swfed-svn [489] shape record edge の build 処理を修正 (current x, y の処理を修正 )

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2011年 3月 30日 (水) 17:07:07 JST


Revision: 489
          http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=489
Author:   yoya
Date:     2011-03-30 17:07:07 +0900 (Wed, 30 Mar 2011)

Log Message:
-----------
shape record edge の build 処理を修正 (current x, y の処理を修正)

Modified Paths:
--------------
    trunk/src/swf_shape_record_edge.c


-------------- next part --------------
Modified: trunk/src/swf_shape_record_edge.c
===================================================================
--- trunk/src/swf_shape_record_edge.c	2011-03-30 07:07:32 UTC (rev 488)
+++ trunk/src/swf_shape_record_edge.c	2011-03-30 08:07:07 UTC (rev 489)
@@ -87,7 +87,7 @@
 	size = bitstream_need_bits_signed(shape_record_edge->shape_y - swf_tag_shape->_current_y);
 	shape_coord_real_size =  (shape_coord_real_size>size)?shape_coord_real_size:size;
     }
-      shape_record_edge->shape_coord_size = shape_coord_real_size - 2;
+    shape_record_edge->shape_coord_size = shape_coord_real_size - 2;
     bitstream_putbits(bs, shape_record_edge->shape_coord_size, 4);
 
     if (shape_record_edge->shape_edge_type == 0) {
@@ -99,6 +99,8 @@
         bitstream_putbits_signed(bs, control_delta_y, shape_coord_real_size);
         bitstream_putbits_signed(bs, anchor_delta_x, shape_coord_real_size);
         bitstream_putbits_signed(bs, anchor_delta_y, shape_coord_real_size);
+	swf_tag_shape->_current_x = shape_record_edge->shape_anchor_x;
+	swf_tag_shape->_current_y = shape_record_edge->shape_anchor_y;
     } else {
         signed delta_x = shape_record_edge->shape_x - swf_tag_shape->_current_x;
         signed delta_y = shape_record_edge->shape_y - swf_tag_shape->_current_y;
@@ -111,8 +113,6 @@
         if (shape_record_edge->shape_line_has_x_and_y == 1) {
             bitstream_putbits_signed(bs, delta_x, shape_coord_real_size);
             bitstream_putbits_signed(bs, delta_y, shape_coord_real_size);
-            swf_tag_shape->_current_x += delta_x;
-            swf_tag_shape->_current_y += delta_y;
         } else {
             if (delta_x) {
                 shape_record_edge->shape_line_has_x_or_y = 0;
@@ -122,13 +122,12 @@
             bitstream_putbit(bs, shape_record_edge->shape_line_has_x_or_y);
             if (shape_record_edge->shape_line_has_x_or_y == 0) {
                 bitstream_putbits_signed(bs, delta_x, shape_coord_real_size);
-                swf_tag_shape->_current_x += delta_x;
-            
             } else {
                 bitstream_putbits_signed(bs, delta_y, shape_coord_real_size);
-                swf_tag_shape->_current_y += delta_y;
             }
         }
+	swf_tag_shape->_current_x = shape_record_edge->shape_x;
+	swf_tag_shape->_current_y = shape_record_edge->shape_y;
     }
     return 0;
 }



Swfed-svn メーリングリストの案内
アーカイブの一覧に戻る