gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog testsuite/misc-ming.all/Makefil...
Date: Thu, 21 Dec 2006 23:07:34 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/12/21 23:07:34

Modified files:
        .              : ChangeLog 
        testsuite/misc-ming.all: Makefile.am 
Added files:
        testsuite/misc-ming.all: root_stop_test.c 

Log message:
        2006-12-21 Sandro Santilli <address@hidden>
        
                * testsuite/misc-ming.all/Makefile.am: added rules
                  to build root_stop_test.swf
        
        2006-12-21 Zou Lunkai <address@hidden>
        
                * testsuite/misc-ming.all/root_stop_test.c: new testcase
                  for bug #18549.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.1992&r2=1.1993
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.42&r2=1.43
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/root_stop_test.c?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1992
retrieving revision 1.1993
diff -u -b -r1.1992 -r1.1993
--- ChangeLog   21 Dec 2006 22:17:02 -0000      1.1992
+++ ChangeLog   21 Dec 2006 23:07:33 -0000      1.1993
@@ -1,3 +1,14 @@
+
+2006-12-21 Sandro Santilli <address@hidden>
+
+       * testsuite/misc-ming.all/Makefile.am: added rules
+         to build root_stop_test.swf
+
+2006-12-21 Zou Lunkai <address@hidden>
+
+       * testsuite/misc-ming.all/root_stop_test.c: new testcase
+         for bug #18549.
+
 2006-12-21  Rob Savoye  <address@hidden>
 
        * macros/ffmpeg.m4: Also check for the dc1394_control library,

Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- testsuite/misc-ming.all/Makefile.am 18 Dec 2006 13:40:45 -0000      1.42
+++ testsuite/misc-ming.all/Makefile.am 21 Dec 2006 23:07:34 -0000      1.43
@@ -61,6 +61,7 @@
        spritehier \
        timeline_var_test \
        timeline_var_test-Runner \
+       root_stop_test \
        $(NULL)
 
 # TESTS = \
@@ -141,6 +142,16 @@
        sh $< $(top_builddir) timeline_var_test.swf > $@
        chmod 755 $@
 
+root_stop_test_SOURCES =       \
+       root_stop_test.c        \
+       ming_utils.h            \
+       ming_utils.c            \
+       $(NULL)
+root_stop_test_LDADD = $(MING_LIBS)
+
+root_stop_test.swf: root_stop_test
+       ./root_stop_test $(top_srcdir)/testsuite/media
+
 spritehier.swf: spritehier
        ./spritehier
 

Index: testsuite/misc-ming.all/root_stop_test.c
===================================================================
RCS file: testsuite/misc-ming.all/root_stop_test.c
diff -N testsuite/misc-ming.all/root_stop_test.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/root_stop_test.c    21 Dec 2006 23:07:34 -0000      
1.1
@@ -0,0 +1,124 @@
+/* 
+ *   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */ 
+
+/*
+ * Zou Lunkai, address@hidden
+ *
+ * Test for stopping and playing the _root
+ * 
+ * The _root movie has two frames. 
+ * In frame1, there's a sprite which contains 3 frames.
+ *    In each of the sprite's 3 frames, there is a red square. 
+ * In frame2, there is black square.
+ *
+ * The sprite will check the counter defined in _root, and then
+ * conditionally stops and plays the _root.
+ *
+ * Normally, you can see both the red and black squares.
+ *
+ * run as ./root_stop_test
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 6
+#define OUTPUT_FILENAME "root_stop_test.swf"
+
+
+//actions in _root movie, defines a counter
+SWFAction  action_in_root(void);
+SWFAction  action_in_root()
+{
+  SWFAction ac;
+  ac = compileSWFActionCode(" \
+      counter = 0; \
+  ");
+  return ac;
+}
+
+//actions in sprite, conditionally stops and plays the _root
+SWFAction  action_in_sprite(void);
+SWFAction  action_in_sprite()
+{
+  SWFAction ac;
+  ac = compileSWFActionCode(" \
+      counter++; \
+      if(counter < 2) \
+          _root.stop(); \
+      else \
+          _root.play(); \
+  ");
+  return ac;
+}
+
+int
+main(int argc, char** argv)
+{
+       SWFMovie mo;
+       SWFMovieClip mc, dejagnuclip;
+       SWFShape  sh1,sh2;
+       SWFAction ac1, ac2;
+       int i;
+
+       const char *srcdir=".";
+       if ( argc>1 ) 
+               srcdir=argv[1];
+       else
+  {
+       //fprintf(stderr, "Usage: %s <mediadir>\n", argv[0]);
+       //return 1;
+  }
+
+  Ming_init();
+  mo = newSWFMovie();
+  SWFMovie_setDimension(mo, 800, 600);
+
+  //dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 10, 0, 
0, 800, 600);
+  //SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+
+       ac2 = action_in_sprite();
+       sh2 = make_fill_square (300, 300, 60, 60, 255, 0, 0, 255, 0, 0);
+       mc = newSWFMovieClip();
+       
+       for(i=0; i<3; i++)
+       {
+               SWFMovieClip_add(mc, (SWFBlock)sh2);  
+               SWFMovieClip_add(mc, (SWFBlock)ac2);
+               SWFMovieClip_nextFrame(mc);
+       }
+       
+
+  ac1 =  action_in_root();
+  SWFMovie_add(mo, (SWFBlock)ac1);
+       SWFMovie_add(mo, (SWFBlock)mc);  //add the movieClip to the _root
+  SWFMovie_nextFrame(mo); 
+
+       sh1 = make_fill_square(270, 270, 120, 120, 255, 0, 0, 0, 0, 0);
+       SWFMovie_add(mo, (SWFBlock)sh1); //add the black square to the _root's 
2nd frame
+       SWFMovie_nextFrame(mo); 
+
+       //Output movie
+       puts("Saving " OUTPUT_FILENAME );
+       SWFMovie_save(mo, OUTPUT_FILENAME);
+
+       return 0;
+}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]