From 145fad6dca3e45fd63e010fe04f1f72a978e0ae8 Mon Sep 17 00:00:00 2001 From: yoya Date: Wed, 27 Oct 2010 14:44:54 +0000 Subject: [PATCH] =?utf8?q?shape=5Fcoord=5Freal=5Fsize=20=E7=AE=97=E5=87=BA?= =?utf8?q?=E3=83=AD=E3=82=B8=E3=83=83=E3=82=AF=E3=82=92=E3=82=8F=E3=81=9A?= =?utf8?q?=E3=81=8B=E3=81=AB=E8=BB=BD=E9=87=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/swfed/trunk@304 7c90b180-03d5-4157-b861-58a559ae9d1e --- src/swf_shape_record_edge.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/swf_shape_record_edge.c b/src/swf_shape_record_edge.c index 6a174d7..42ce07d 100644 --- a/src/swf_shape_record_edge.c +++ b/src/swf_shape_record_edge.c @@ -64,7 +64,7 @@ swf_shape_record_edge_build(bitstream_t *bs, swf_shape_record_edge_t *shape_record_edge, swf_tag_t *tag) { // int ret; - unsigned int size, shape_coord_real_size = 0; + unsigned int size, shape_coord_real_size = 2; swf_tag_shape_detail_t *swf_tag_shape = (swf_tag_shape_detail_t *) tag->detail; bitstream_putbit(bs, shape_record_edge->shape_record_type); @@ -84,13 +84,7 @@ swf_shape_record_edge_build(bitstream_t *bs, shape_coord_real_size = (shape_coord_real_size>size)?shape_coord_real_size:size; 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; - - if (shape_coord_real_size > 2) { - // fprintf(stderr, "shape_coord_real_size=%d delta_x=%d\n", shape_coord_real_size, shape_record_edge->shape_x - swf_tag_shape->_current_x); - shape_record_edge->shape_coord_size = shape_coord_real_size - 2; - } else { - shape_record_edge->shape_coord_size = 0; - } + 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) { @@ -124,7 +118,6 @@ swf_shape_record_edge_build(bitstream_t *bs, } 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; -- 2.11.0