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: Sat, 30 Dec 2006 10:11:30 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  06/12/30 10:11:30

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

Log message:
                * testsuite/misc-ming.all/: Makefile.am,
                          place_and_remove_object_test.c:
                                    Added new test from Zou (missing a 
testrunner).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2013&r2=1.2014
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/Makefile.am?cvsroot=gnash&r1=1.47&r2=1.48
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/place_and_remove_object_test.c?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2013
retrieving revision 1.2014
diff -u -b -r1.2013 -r1.2014
--- ChangeLog   30 Dec 2006 09:08:31 -0000      1.2013
+++ ChangeLog   30 Dec 2006 10:11:29 -0000      1.2014
@@ -1,3 +1,9 @@
+2006-12-30 Sandro Santilli <address@hidden>
+
+       * testsuite/misc-ming.all/: Makefile.am,
+         place_and_remove_object_test.c:
+         Added new test from Zou (missing a testrunner).
+
 2006-12-30 Bastiaan Jacques <address@hidden>
 
        * macros/boost.m4: When the --with-boost-lib configure

Index: testsuite/misc-ming.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/Makefile.am,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- testsuite/misc-ming.all/Makefile.am 28 Dec 2006 02:39:18 -0000      1.47
+++ testsuite/misc-ming.all/Makefile.am 30 Dec 2006 10:11:30 -0000      1.48
@@ -65,6 +65,7 @@
        loop_test-Runner \
        place_object_test \
        place_object_testrunner \
+       place_and_remove_object_test \
        $(NULL)
 
 check_SCRIPTS = \
@@ -216,6 +217,16 @@
        place_object_test.swf      \
        $(NULL)
 
+place_and_remove_object_test_SOURCES = \
+       place_and_remove_object_test.c  \
+       ming_utils.h            \
+       ming_utils.c            \
+       $(NULL)
+place_and_remove_object_test_LDADD = $(MING_LIBS)
+
+place_and_remove_object_test.swf: place_and_remove_object_test
+       ./place_and_remove_object_test $(top_srcdir)/testsuite/media
+
 spritehier.swf: spritehier
        ./spritehier
 

Index: testsuite/misc-ming.all/place_and_remove_object_test.c
===================================================================
RCS file: testsuite/misc-ming.all/place_and_remove_object_test.c
diff -N testsuite/misc-ming.all/place_and_remove_object_test.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-ming.all/place_and_remove_object_test.c      30 Dec 2006 
10:11:30 -0000      1.1
@@ -0,0 +1,90 @@
+/* 
+ *   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 tag PlaceObject2 and also sprite_instance::advance_sprite(float 
delta_time)
+ *
+ * Normally, you will see the both the red square and black square
+ *  again and again while looping back
+ *
+ * run as ./place_and_remove_object_test
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ming.h>
+
+#include "ming_utils.h"
+
+#define OUTPUT_VERSION 6
+#define OUTPUT_FILENAME "place_and_remove_object_test.swf"
+
+
+
+
+int
+main(int argc, char** argv)
+{
+       SWFMovie mo;
+       SWFMovieClip mc1, mc2, 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 = newSWFMovieWithVersion(OUTPUT_VERSION);
+       SWFMovie_setDimension(mo, 800, 600);
+
+       //dejagnuclip = get_dejagnu_clip((SWFBlock)get_default_font(srcdir), 
10, 0, 0, 800, 600);
+       //SWFMovie_add(mo, (SWFBlock)dejagnuclip);
+       //SWFMovie_nextFrame(mo); 
+
+
+       sh1 = make_fill_square (300, 300, 60, 60, 255, 0, 0, 255, 0, 0);
+       sh2 = make_fill_square (330, 300, 60, 60, 255, 0, 0, 0, 0, 0);
+
+               
+       SWFDisplayItem it;
+       it = SWFMovie_add(mo, (SWFBlock)sh1);  //add a red square to the 1st 
frame at depth 3
+       SWFDisplayItem_setDepth(it, 3); 
+       SWFMovie_nextFrame(mo);        
+       
+       SWFMovie_remove(mo, it);          //remove the red square at the 2nd 
frame
+       SWFMovie_nextFrame(mo);       
+       
+       it = SWFMovie_add(mo, (SWFBlock)sh2);  //add a black square to the 3rd 
frame at depth 3
+       SWFDisplayItem_setDepth(it, 3); 
+       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]