[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog server/character.h server/sprit...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog server/character.h server/sprit... |
Date: |
Wed, 24 Jan 2007 13:23:18 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/01/24 13:23:18
Modified files:
. : ChangeLog
server : character.h sprite_instance.cpp
sprite_instance.h
Log message:
* server/: character.h, sprite_instance.{cpp,h}:
Understood, documented and cleaned up the concept of
"ActionScript-transformed" characters; Fix property handlers
to properly register having been transformed by script.
Fixes elvis.swf and bitmap.swf.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2166&r2=1.2167
http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.h?cvsroot=gnash&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.cpp?cvsroot=gnash&r1=1.132&r2=1.133
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_instance.h?cvsroot=gnash&r1=1.57&r2=1.58
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2166
retrieving revision 1.2167
diff -u -b -r1.2166 -r1.2167
--- ChangeLog 24 Jan 2007 10:11:54 -0000 1.2166
+++ ChangeLog 24 Jan 2007 13:23:17 -0000 1.2167
@@ -1,5 +1,10 @@
2007-01-24 Sandro Santilli <address@hidden>
+ * server/: character.h, sprite_instance.{cpp,h}:
+ Understood, documented and cleaned up the concept of
+ "ActionScript-transformed" characters; Fix property handlers
+ to properly register having been transformed by script.
+ Fixes elvis.swf and bitmap.swf.
* testsuite/misc-ming.all/: Makefile.am, attachMovieTestRunner.cpp,
loop_test-Runner.cpp, registerClassTestRunner.cpp:
Allow running tests from any directory.
Index: server/character.h
===================================================================
RCS file: /sources/gnash/gnash/server/character.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- server/character.h 12 Dec 2006 19:48:04 -0000 1.36
+++ server/character.h 24 Jan 2007 13:23:18 -0000 1.37
@@ -18,7 +18,7 @@
//
//
-/* $Id: character.h,v 1.36 2006/12/12 19:48:04 strk Exp $ */
+/* $Id: character.h,v 1.37 2007/01/24 13:23:18 strk Exp $ */
#ifndef GNASH_CHARACTER_H
#define GNASH_CHARACTER_H
@@ -117,6 +117,14 @@
///
rect m_old_invalidated_bounds;
+ /// Wheter this character has been transformed by ActionScript code
+ //
+ /// Once we've been moved by ActionScript,
+ /// Don't accept moves from anim tags (PlaceObject)
+ ///
+ /// See get_accept_anim_moves() function
+ ///
+ bool _scriptTransformed;
public:
@@ -132,7 +140,8 @@
m_visible(true),
m_parent(parent),
m_invalidated(true),
- m_old_invalidated_bounds()
+ m_old_invalidated_bounds(),
+ _scriptTransformed(false)
{
assert((parent == NULL && m_id == -1)
|| (parent != NULL && m_id >= 0));
@@ -315,7 +324,36 @@
virtual void goto_frame(size_t /*target_frame*/) {}
- virtual bool get_accept_anim_moves() const { return true; }
+ /// \brief
+ /// Return true if PlaceObjects tag are allowed to move
+ /// this character.
+ //
+ /// Once a character has been transformed by ActionScript,
+ /// further transformation trought non-action SWF constrol tags
+ /// is not allowed.
+ ///
+ /// See scriptTransformed()
+ ///
+ bool get_accept_anim_moves() const
+ {
+ return ! _scriptTransformed;
+ }
+
+ /// \brief
+ /// Call this function when the sprite has been
+ /// transformed due to ActionScript code.
+ //
+ /// This information will be used while executing
+ /// PlaceObject tags in that ActionScript-transformed
+ /// characters won't be allowed to be moved.
+ ///
+ /// TODO: make protected
+ ///
+ void transformedByScript()
+ {
+ _scriptTransformed = true;
+ }
+
virtual void set_visible(bool visible) {
if (m_visible!=visible) set_invalidated();
Index: server/sprite_instance.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.cpp,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -b -r1.132 -r1.133
--- server/sprite_instance.cpp 23 Jan 2007 23:20:28 -0000 1.132
+++ server/sprite_instance.cpp 24 Jan 2007 13:23:18 -0000 1.133
@@ -872,7 +872,7 @@
matrix m = ptr->get_matrix();
m.m_[0][2] =
infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number()));
ptr->set_matrix(m);
- //ptr->m_accept_anim_moves = false; // what is this about ??
+ ptr->transformedByScript(); // m_accept_anim_moves = false;
}
}
@@ -893,7 +893,7 @@
matrix m = ptr->get_matrix();
m.m_[1][2] =
infinite_to_fzero(PIXELS_TO_TWIPS(fn.arg(0).to_number()));
ptr->set_matrix(m);
- //ptr->m_accept_anim_moves = false; // what is this about ??
+ ptr->transformedByScript(); // m_accept_anim_moves = false;
}
}
@@ -944,7 +944,7 @@
m.set_scale_rotation(x_scale, y_scale, rotation);
ptr->set_matrix(m);
- //ptr->m_accept_anim_moves = false; // what is this about ??
+ ptr->transformedByScript(); // m_accept_anim_moves = false;
}
}
@@ -995,7 +995,7 @@
m.set_scale_rotation(x_scale, y_scale, rotation);
ptr->set_matrix(m);
- //ptr->m_accept_anim_moves = false; // what is this about ??
+ ptr->transformedByScript(); // m_accept_anim_moves = false;
}
}
@@ -1074,7 +1074,7 @@
cxform cx = ptr->get_cxform();
cx.m_[3][0] = infinite_to_fzero(fn.arg(0).to_number()) / 100.f;
ptr->set_cxform(cx);
- //ptr->m_accept_anim_moves = false; // what is this about ??
+ ptr->transformedByScript(); // m_accept_anim_moves = false;
}
}
@@ -1092,7 +1092,7 @@
else // setter
{
ptr->set_visible(fn.arg(0).to_bool());
- //ptr->m_accept_anim_moves = false; // what is this about ??
+ ptr->transformedByScript(); // m_accept_anim_moves = false;
}
}
@@ -1118,7 +1118,7 @@
m.m_[0][0] /= w;
}
ptr->set_matrix(m);
- //ptr->m_accept_anim_moves = false; // what is this about ??
+ ptr->transformedByScript(); // m_accept_anim_moves = false;
}
}
@@ -1143,7 +1143,7 @@
m.m_[1][1] /= h;
}
ptr->set_matrix(m);
- //ptr->m_accept_anim_moves = false; // what is this about ??
+ ptr->transformedByScript(); // m_accept_anim_moves = false;
}
}
@@ -1176,7 +1176,7 @@
m.set_scale_rotation(x_scale, y_scale, rotation);
ptr->set_matrix(m);
- //ptr->m_accept_anim_moves = false; // what is this about ??
+ ptr->transformedByScript(); // m_accept_anim_moves = false;
}
}
@@ -1697,7 +1697,6 @@
m_current_frame(0),
m_update_frame(true),
m_has_looped(false),
- m_accept_anim_moves(true),
m_init_actions_executed(),
m_as_environment(),
m_has_keypress_event(false),
@@ -2302,7 +2301,7 @@
m.m_[0][2] =
infinite_to_fzero(PIXELS_TO_TWIPS(val.to_number()));
set_matrix(m);
- m_accept_anim_moves = false;
+ transformedByScript(); // m_accept_anim_moves = false;
return;
}
@@ -2313,7 +2312,7 @@
m.m_[1][2] =
infinite_to_fzero(PIXELS_TO_TWIPS(val.to_number()));
set_matrix(m);
- m_accept_anim_moves = false;
+ transformedByScript(); // m_accept_anim_moves = false;
return;
}
@@ -2390,7 +2389,7 @@
m.set_scale_rotation(x_scale, y_scale, rotation);
set_matrix(m);
- m_accept_anim_moves = false;
+ transformedByScript(); // m_accept_anim_moves = false;
return;
}
case M_ALPHA:
@@ -2400,14 +2399,14 @@
cxform cx = get_cxform();
cx.m_[3][0] = infinite_to_fzero(val.to_number()) / 100.f;
set_cxform(cx);
- m_accept_anim_moves = false;
+ transformedByScript(); // m_accept_anim_moves = false;
return;
}
case M_VISIBLE:
//else if (name == "_visible")
{
set_visible(val.to_bool());
- m_accept_anim_moves = false;
+ transformedByScript(); // m_accept_anim_moves = false;
return;
}
case M_WIDTH:
@@ -2422,7 +2421,7 @@
m.m_[0][0] /= w;
}
set_matrix(m);
- m_accept_anim_moves = false;
+ transformedByScript(); // m_accept_anim_moves = false;
return;
}
case M_HEIGHT:
@@ -2437,7 +2436,7 @@
m.m_[1][1] /= h;
}
set_matrix(m);
- m_accept_anim_moves = false;
+ transformedByScript(); // m_accept_anim_moves = false;
return;
}
case M_ROTATION:
@@ -2452,7 +2451,7 @@
m.set_scale_rotation(x_scale, y_scale, rotation);
set_matrix(m);
- m_accept_anim_moves = false;
+ transformedByScript(); // m_accept_anim_moves = false;
return;
}
case M_ONROLLOVER:
Index: server/sprite_instance.h
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_instance.h,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- server/sprite_instance.h 19 Jan 2007 14:22:56 -0000 1.57
+++ server/sprite_instance.h 24 Jan 2007 13:23:18 -0000 1.58
@@ -17,7 +17,7 @@
//
//
-/* $Id: sprite_instance.h,v 1.57 2007/01/19 14:22:56 strk Exp $ */
+/* $Id: sprite_instance.h,v 1.58 2007/01/24 13:23:18 strk Exp $ */
// Stateful live Sprite instance
@@ -206,11 +206,6 @@
return m_has_looped;
}
- virtual bool get_accept_anim_moves() const
- {
- return m_accept_anim_moves;
- }
-
/// Combine the flags to avoid a conditional.
/// It would be faster with a macro.
inline int transition(int a, int b) const
@@ -637,9 +632,6 @@
bool m_update_frame;
bool m_has_looped;
- // once we've been moved by ActionScript,
- // don't accept moves from anim tags.
- bool m_accept_anim_moves;
// a bit-array class would be ideal for this
std::vector<bool> m_init_actions_executed;
- [Gnash-commit] gnash ChangeLog server/character.h server/sprit...,
Sandro Santilli <=