[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/dlist.cpp server/dlist.h...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/dlist.cpp server/dlist.h... |
Date: |
Thu, 24 May 2007 18:09:58 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/05/24 18:09:58
Modified files:
. : ChangeLog
server : dlist.cpp dlist.h sprite_instance.cpp
sprite_instance.h
server/swf : PlaceObject2Tag.cpp
server/vm : action.cpp
Log message:
* server/: dlist.{cpp,h}, sprite_instance.{cpp,h},
server/swf/PlaceObject2Tag.cpp, server/vm/action.cpp:
Drop the use_matrix/use_color_xform parameters, use
pointers for the actual matrix/color_xform so that NULL
signifies "don't use".
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3342&r2=1.3343
http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.cpp?cvsroot=gnash&r1=1.68&r2=1.69
http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.h?cvsroot=gnash&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.279&r2=1.280
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.113&r2=1.114
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/PlaceObject2Tag.cpp?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/action.cpp?cvsroot=gnash&r1=1.19&r2=1.20
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3342
retrieving revision 1.3343
diff -u -b -r1.3342 -r1.3343
--- ChangeLog 24 May 2007 14:34:50 -0000 1.3342
+++ ChangeLog 24 May 2007 18:09:57 -0000 1.3343
@@ -1,5 +1,13 @@
2007-05-24 Sandro Santilli <address@hidden>
+ * server/: dlist.{cpp,h}, sprite_instance.{cpp,h},
+ server/swf/PlaceObject2Tag.cpp, server/vm/action.cpp:
+ Drop the use_matrix/use_color_xform parameters, use
+ pointers for the actual matrix/color_xform so that NULL
+ signifies "don't use".
+
+2007-05-24 Sandro Santilli <address@hidden>
+
* testsuite/misc-ming.all/replace_sprites1test.c:
Add onClipEvent(unload) to both PLACE and REPLACE tag.
Index: server/dlist.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/dlist.cpp,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -b -r1.68 -r1.69
--- server/dlist.cpp 24 May 2007 11:57:55 -0000 1.68
+++ server/dlist.cpp 24 May 2007 18:09:57 -0000 1.69
@@ -252,10 +252,8 @@
DisplayList::replace_character(
character* ch,
int depth,
- bool use_cxform,
- const cxform& color_xform,
- bool use_matrix,
- const matrix& mat,
+ const cxform* color_xform,
+ const matrix* mat,
float ratio,
int clip_depth)
{
@@ -263,8 +261,8 @@
ch->set_invalidated();
ch->set_depth(depth);
- ch->set_cxform(color_xform);
- ch->set_matrix(mat);
+ if ( color_xform ) ch->set_cxform(*color_xform);
+ if ( mat ) ch->set_matrix(*mat);
ch->set_ratio(ratio);
ch->set_clip_depth(clip_depth);
ch->restart();
@@ -290,23 +288,24 @@
}
else
{
+ character* oldch = it->get();
InvalidatedRanges old_ranges;
- if (!use_cxform)
+ if (!color_xform)
{
// Use the cxform from the old character.
- ch->set_cxform((*it)->get_cxform());
+ ch->set_cxform(oldch->get_cxform());
}
- if (!use_matrix)
+ if (!mat)
{
// Use the matrix from the old character.
- ch->set_matrix((*it)->get_matrix());
+ ch->set_matrix(oldch->get_matrix());
}
// remember bounds of old char
- (*it)->add_invalidated_bounds(old_ranges, true);
+ oldch->add_invalidated_bounds(old_ranges, true);
// replace existing char
*it = di;
@@ -332,10 +331,8 @@
void
DisplayList::move_display_object(
int depth,
- bool use_cxform,
- const cxform& color_xform,
- bool use_matrix,
- const matrix& mat,
+ const cxform* color_xform,
+ const matrix* mat,
float ratio,
int /* clip_depth */)
{
@@ -362,13 +359,13 @@
return;
}
- if (use_cxform)
+ if (color_xform)
{
- ch->set_cxform(color_xform);
+ ch->set_cxform(*color_xform);
}
- if (use_matrix)
+ if (mat)
{
- ch->set_matrix(mat);
+ ch->set_matrix(*mat);
}
ch->set_ratio(ratio);
}
Index: server/dlist.h
===================================================================
RCS file: /sources/gnash/gnash/server/dlist.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- server/dlist.h 23 May 2007 16:30:10 -0000 1.41
+++ server/dlist.h 24 May 2007 18:09:57 -0000 1.42
@@ -102,16 +102,19 @@
/// present at the given depth, then keep those respective
/// properties from the existing character.
///
- /// TODO: use pointers for matrix and cxform, and use NULL
- /// instead of the two bool arguments
+ /// @param color_xform
+ /// The color tranform to assign to the new character.
+ /// If NULL the default color transform will be kept.
+ //
+ /// @param mat
+ /// The matrix tranform to assign to the new character.
+ /// If NULL the default matrix will be kept.
///
void replace_character(
character* ch,
int depth,
- bool use_cxform,
- const cxform& color_xform,
- bool use_matrix,
- const matrix& mat,
+ const cxform* color_xform,
+ const matrix* mat,
float ratio,
int clip_depth);
@@ -146,12 +149,18 @@
//
/// See character::get_accept_anim_moves()
///
+ /// @param color_xform
+ /// The color tranform to assign to the new character.
+ /// If NULL the default color transform will be kept.
+ //
+ /// @param mat
+ /// The matrix tranform to assign to the new character.
+ /// If NULL the default matrix will be kept.
+ ///
void move_display_object(
int depth,
- bool use_cxform,
- const cxform& color_xform,
- bool use_matrix,
- const matrix& mat,
+ const cxform* color_xform,
+ const matrix* mat,
float ratio,
int clip_depth);
Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.279
retrieving revision 1.280
diff -u -b -r1.279 -r1.280
--- server/sprite_instance.cpp 24 May 2007 13:33:23 -0000 1.279
+++ server/sprite_instance.cpp 24 May 2007 18:09:57 -0000 1.280
@@ -3045,7 +3045,7 @@
const std::vector<swf_event*>& event_handlers,
int depth,
bool replace_if_depth_is_occupied,
- const cxform& color_transform, const matrix& matrix,
+ const cxform& color_transform, const matrix& mat,
float ratio, int clip_depth)
{
// GNASH_REPORT_FUNCTION;
@@ -3065,7 +3065,7 @@
if (existing_char)
{
-#ifdef GNASH_DEBUG_REPLACE
+#ifdef GNASH_DEBUG_PLACE
log_debug("Another character exists in depth %d", depth);
#endif
@@ -3076,13 +3076,13 @@
// ... I guess it's checked inside move_display_object ...
if ( existing_char->get_id() == character_id )
{
-#ifdef GNASH_DEBUG_REPLACE
+#ifdef GNASH_DEBUG_PLACE
log_debug("Char has same id (%d), moving ",
character_id);
#endif
// TODO: update name ?
- move_display_object(depth, true, color_transform,
- true, matrix, ratio, clip_depth);
+ move_display_object(depth, &color_transform,
+ &mat, ratio, clip_depth);
return NULL;
}
@@ -3093,26 +3093,27 @@
TimelineInfo* info = existing_char->getTimelineInfo();
if ( info && info->placedByReplaceTag() &&
info->placedInFrame() > m_current_frame )
{
-#ifdef GNASH_DEBUG_REPLACE
+#ifdef GNASH_DEBUG_PLACE
log_debug("Char was placed by REPLACE tag in frame %d
(now in frame %d)", info->placedInFrame(), m_current_frame);
#endif
if ( existing_char->to_movie() )
{
-#ifdef GNASH_DEBUG_REPLACE
+#ifdef GNASH_DEBUG_PLACE
log_debug("Char is a sprite, moving");
#endif
// If it's a sprite we move it.
// See replace_sprites1test.swf
- move_display_object(depth, true,
color_transform, true, matrix, ratio, clip_depth);
+ move_display_object(depth, &color_transform,
&mat, ratio, clip_depth);
}
else
{
-#ifdef GNASH_DEBUG_REPLACE
+#ifdef GNASH_DEBUG_PLACE
log_debug("Char is NOT a sprite, replacing");
#endif
// If it's something else (a shape?) replace it
- replace_display_object(character_id, name,
depth, true, color_transform, true, matrix, ratio, clip_depth);
+ replace_display_object(character_id, name,
depth, &color_transform,
+ &mat, ratio, clip_depth);
}
return NULL;
}
@@ -3122,11 +3123,12 @@
// See loop_test5.swf (maybe should compare against *this*
ratio instead...
if ( existing_char->get_ratio() > 0 )
{
-#ifdef GNASH_DEBUG_REPLACE
+#ifdef GNASH_DEBUG_PLACE
log_debug("Char has ratio==%g (> 0). Replacing it.",
existing_char->get_ratio());
#endif
- replace_display_object(character_id, name, depth, true,
color_transform, true, matrix, ratio, clip_depth);
+ replace_display_object(character_id, name, depth,
&color_transform, &mat,
+ ratio, clip_depth);
return NULL;
}
#endif
@@ -3178,7 +3180,7 @@
ch.get(),
depth,
color_transform,
- matrix,
+ mat,
ratio,
clip_depth);
@@ -3191,10 +3193,8 @@
uint16_t character_id,
const char* name,
int depth,
- bool use_cxform,
- const cxform& color_transform,
- bool use_matrix,
- const matrix& mat,
+ const cxform* color_transform,
+ const matrix* mat,
float ratio,
int clip_depth)
{
@@ -3223,19 +3223,18 @@
replace_display_object(
ch.get(), name, depth,
- use_cxform, color_transform,
- use_matrix, mat,
- ratio, clip_depth);
+ color_transform,
+ mat,
+ ratio, clip_depth
+ );
}
void sprite_instance::replace_display_object(
character* ch,
const char* name,
int depth,
- bool use_cxform,
- const cxform& color_transform,
- bool use_matrix,
- const matrix& mat,
+ const cxform* color_transform,
+ const matrix* mat,
float ratio,
int clip_depth)
{
@@ -3251,9 +3250,7 @@
m_display_list.replace_character(
ch,
depth,
- use_cxform,
color_transform,
- use_matrix,
mat,
ratio,
clip_depth);
@@ -3779,10 +3776,8 @@
extern_movie.get(),
name,
depth,
- use_cxform,
- color_transform,
- use_matrix,
- mat,
+ use_cxform ? &color_transform : NULL,
+ use_matrix ? &mat : NULL,
ratio,
clip_depth);
}
Index: server/sprite_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.h,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -b -r1.113 -r1.114
--- server/sprite_instance.h 24 May 2007 11:30:15 -0000 1.113
+++ server/sprite_instance.h 24 May 2007 18:09:57 -0000 1.114
@@ -408,39 +408,60 @@
void unload();
/// See DisplayList::move_display_object, this method is just a proxy
to that...
+ //
+ /// @param color_xform
+ /// The color tranform to assign to the new character.
+ /// If NULL the default color transform will be kept.
+ ///
+ /// @param mat
+ /// The matrix tranform to assign to the new character.
+ /// If NULL the default matrix will be kept.
+ ///
void move_display_object(
int depth,
- bool use_cxform,
- const cxform& color_xform,
- bool use_matrix,
- const matrix& mat,
+ const cxform* color_xform,
+ const matrix* mat,
float ratio,
int clip_depth)
{
- m_display_list.move_display_object(depth, use_cxform, color_xform,
use_matrix, mat, ratio, clip_depth);
+ m_display_list.move_display_object(depth, color_xform, mat, ratio,
clip_depth);
}
+ ///
+ /// @param color_xform
+ /// The color tranform to assign to the new character.
+ /// If NULL the default color transform will be kept.
+ ///
+ /// @param mat
+ /// The matrix tranform to assign to the new character.
+ /// If NULL the default matrix will be kept.
+ ///
void replace_display_object(
uint16_t character_id,
const char* name,
int depth,
- bool use_cxform,
- const cxform& color_transform,
- bool use_matrix,
- const matrix& mat,
+ const cxform* color_xform,
+ const matrix* mat,
float ratio,
int clip_depth);
+ ///
+ /// @param color_xform
+ /// The color tranform to assign to the new character.
+ /// If NULL the default color transform will be kept.
+ //
+ /// @param mat
+ /// The matrix tranform to assign to the new character.
+ /// If NULL the default matrix will be kept.
+ ///
void replace_display_object(
character* ch,
const char* name,
int depth,
- bool use_cxform,
- const cxform& color_transform,
- bool use_matrix,
- const matrix& mat,
+ const cxform* color_xform,
+ const matrix* mat,
float ratio,
int clip_depth);
Index: server/swf/PlaceObject2Tag.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf/PlaceObject2Tag.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- server/swf/PlaceObject2Tag.cpp 24 May 2007 08:48:03 -0000 1.12
+++ server/swf/PlaceObject2Tag.cpp 24 May 2007 18:09:58 -0000 1.13
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: PlaceObject2Tag.cpp,v 1.12 2007/05/24 08:48:03 strk Exp $ */
+/* $Id: PlaceObject2Tag.cpp,v 1.13 2007/05/24 18:09:58 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -330,10 +330,8 @@
case MOVE:
m->move_display_object(
m_depth,
- m_has_cxform,
- m_color_transform,
- m_has_matrix,
- m_matrix,
+ m_has_cxform ? &m_color_transform : NULL,
+ m_has_matrix ? &m_matrix : NULL,
m_ratio,
m_clip_depth);
break;
@@ -343,10 +341,8 @@
m_character_id,
m_name,
m_depth,
- m_has_cxform,
- m_color_transform,
- m_has_matrix,
- m_matrix,
+ m_has_cxform ? &m_color_transform : NULL,
+ m_has_matrix ? &m_matrix : NULL,
m_ratio,
m_clip_depth);
break;
Index: server/vm/action.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/action.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- server/vm/action.cpp 10 May 2007 13:14:42 -0000 1.19
+++ server/vm/action.cpp 24 May 2007 18:09:58 -0000 1.20
@@ -175,10 +175,6 @@
const character* tar = (const character*)target;
const char* name = tar->get_name().c_str();
uint16_t depth = tar->get_depth();
- bool use_cxform = false;
- cxform color_transform = tar->get_cxform();
- bool use_matrix = false;
- matrix mat = tar->get_matrix();
float ratio = tar->get_ratio();
uint16_t clip_depth = tar->get_clip_depth();
@@ -197,10 +193,8 @@
newsprite.get(),
name,
depth,
- use_cxform,
- color_transform,
- use_matrix,
- mat,
+ NULL, // don't use color transform
+ NULL, // don't use matrix transform
ratio,
clip_depth);
}