[Swfed-svn] swfed-svn [399] Sprite 入れ替えで cid が 0 になるのを修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 3月 8日 (火) 10:22:06 JST


Revision: 399
          http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=399
Author:   yoya
Date:     2011-03-08 10:22:06 +0900 (Tue, 08 Mar 2011)

Log Message:
-----------
Sprite 入れ替えで cid が 0 になるのを修正

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


-------------- next part --------------
Modified: trunk/src/swf_object.c
===================================================================
--- trunk/src/swf_object.c	2011-03-08 01:07:31 UTC (rev 398)
+++ trunk/src/swf_object.c	2011-03-08 01:22:06 UTC (rev 399)
@@ -860,7 +860,7 @@
 swf_object_replace_movieclip(swf_object_t *swf,
                              unsigned char *instance_name, int instance_name_len,
                              unsigned char *swf_data, int swf_data_len) {
-    int cid = 0, ret = 0;
+    int cid = 0, sprite_cid = 0, ret = 0;
     swf_tag_t *tag = NULL;
     swf_tag_t *sprite_tag = NULL, *prev_sprite_tag = NULL;
     swf_tag_t *sprite_tag_tail = NULL; // sprite の中の最後の tag
@@ -890,6 +890,7 @@
         if (isSpriteTag(tag->tag)) {
             if (swf_tag_get_cid(tag) ==  cid) {
                 sprite_tag = tag;
+                sprite_cid = cid;
                 break;
             }
         }
@@ -927,6 +928,7 @@
     }
     sprite_tag->detail = detail_handler->create();
     swf_tag_sprite = sprite_tag->detail;
+    swf_tag_sprite->sprite_id = sprite_cid;
 
     // SWF 中のタグを種類に応じて展開する
     for (tag=swf4sprite->tag ; tag ; tag=tag->next) {



Swfed-svn メーリングリストの案内
Back to archive index