Displaying 15 results from an estimated 15 matches for "swfdec_action_goto_fram".
Did you mean:
swfdec_action_goto_frame
2007 Jan 18
0
Branch 'interpreter' - 2 commits - libswfdec/js libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c
...+static JSBool
+swfdec_action_play (JSContext *cx, guint action, const guint8 *data, guint len)
+{
+ SwfdecMovie *movie = swfdec_action_get_target (cx);
+ if (movie)
+ movie->stopped = FALSE;
+ else
+ SWFDEC_ERROR ("no movie to play");
+ return JS_TRUE;
+}
+
+static JSBool
+swfdec_action_goto_frame (JSContext *cx, guint action, const guint8 *data, guint len)
+{
+ SwfdecMovie *movie = swfdec_action_get_target (cx);
+ guint frame;
+
+ if (len != 2) {
+ SWFDEC_ERROR ("GotoFrame action length invalid (is %u, should be 2", len);
+ return JS_FALSE;
+ }
+ frame = GUINT16_FROM_L...
2007 Mar 07
1
2 commits - libswfdec/swfdec_script.c test/trace
libswfdec/swfdec_script.c | 14 ++++++++++++--
test/trace/Makefile.am | 2 ++
test/trace/gotoframe.swf |binary
test/trace/gotoframe.swf.trace | 13 +++++++++++++
4 files changed, 27 insertions(+), 2 deletions(-)
New commits:
diff-tree 12348410a3509928a6e8e4c8ca00292a58ff542c (from 46e62d4410c20c19774a45758d8ebf11cd0bdf96)
Author: Benjamin Otte <otte@gnome.org>
2007 Jan 24
0
Branch 'interpreter' - 8 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_js.c libswfdec/swfdec_js.h libswfdec/swfdec_script.c test/swfdec_out.c test/swfdec_out.h test/swfedit_tag.c test/swfedit_token.c test/swfedit_token.h
...ty, swfdec_action_set_property, swfdec_action_set_property, swfdec_action_set_property } },
[0x24] = { "CloneSprite", NULL },
@@ -1010,7 +1063,7 @@ static const SwfdecActionSpec actions[25
/* version 3 */
[0x81] = { "GotoFrame", swfdec_action_print_goto_frame, 0, 0, { swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame } },
- [0x83] = { "GetURL", NULL },
+ [0x83] = { "GetURL", swfdec_action_print_get_url, 0, 0, { swfdec_action_get_url, swfdec_action_get_url, swfdec_action_get_url, swfdec_...
2007 Feb 16
0
11 commits - libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/.gitignore test/trace
...t_u16 (&bits));
break;
- case 4: /* register */
default:
SWFDEC_ERROR ("Push: type %u not implemented", type);
return JS_FALSE;
@@ -2017,7 +2062,7 @@ static const SwfdecActionSpec actions[25
[0x81] = { "GotoFrame", swfdec_action_print_goto_frame, 0, 0, { swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame } },
[0x83] = { "GetURL", swfdec_action_print_get_url, 0, 0, { swfdec_action_get_url, swfdec_action_get_url, swfdec_action_get_url, swfdec_action_get_url, swfdec_action_get_url } },...
2007 Nov 07
0
14 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_script.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_text_field_movie.c
...ING_GREATER] = { "StringGreater", NULL, -1, -1, NULL, 6 },
/* version 7 */
[SWFDEC_AS_ACTION_EXTENDS] = { "Extends", NULL, 2, 0, swfdec_action_extends, 7 },
- /* version 3 */
- [SWFDEC_AS_ACTION_GOTO_FRAME] = { "GotoFrame", swfdec_action_print_goto_frame, 0, 0, swfdec_action_goto_frame, 3 },
- [SWFDEC_AS_ACTION_GET_URL] = { "GetURL", swfdec_action_print_get_url, 0, 0, swfdec_action_get_url, 3 },
+ /* version 1 */
+ [SWFDEC_AS_ACTION_GOTO_FRAME] = { "GotoFrame", swfdec_action_print_goto_frame, 0, 0, swfdec_action_goto_frame, 1 },
+ [SWFDEC_AS_ACTION_GET_UR...
2007 Apr 12
0
Branch 'as' - 15 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c
...{ "StringGreater", NULL },
/* version 7 */
+#if 0
[0x69] = { "Extends", NULL, 2, 0, { NULL, NULL, NULL, NULL, swfdec_action_extends } },
+#endif
/* version 3 */
-#endif
[SWFDEC_AS_ACTION_GOTO_FRAME] = { "GotoFrame", swfdec_action_print_goto_frame, 0, 0, { swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame } },
#if 0
[0x83] = { "GetURL", swfdec_action_print_get_url, 0, 0, { swfdec_action_get_url, swfdec_action_get_url, swfdec_action_get_url, swfdec_action_get_url, swfdec_action_get_u...
2007 Apr 12
0
Branch 'as' - 14 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h
...ster %u", (guint) *data);
}
-#endif
static char *
swfdec_action_print_set_target (guint action, const guint8 *data, guint len)
@@ -2244,9 +2243,9 @@ const SwfdecActionSpec swfdec_as_actions
[SWFDEC_AS_ACTION_GOTO_FRAME] = { "GotoFrame", swfdec_action_print_goto_frame, 0, 0, { swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame } },
#if 0
[0x83] = { "GetURL", swfdec_action_print_get_url, 0, 0, { swfdec_action_get_url, swfdec_action_get_url, swfdec_action_get_url, swfdec_action_get_url, swfdec_action_get_u...
2007 Jun 27
0
Branch 'as' - 6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_movie_asprops.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie_as.c
...->frame - 1);
+ if (movie->frame > 1) {
+ swfdec_sprite_movie_goto (movie, movie->frame - 1);
} else {
SWFDEC_INFO ("can't execute previousFrame, already at first frame");
}
@@ -124,7 +124,7 @@ swfdec_action_previous_frame (SwfdecAsCo
static void
swfdec_action_goto_frame (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
{
- SwfdecMovie *movie = swfdec_action_get_target (cx);
+ SwfdecSpriteMovie *movie = swfdec_action_get_target (cx);
guint frame;
if (len != 2) {
@@ -133,8 +133,8 @@ swfdec_action_goto_frame (SwfdecAsContex
}
frame...
2007 Apr 04
0
Branch 'as' - 4 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...+ if (movie->frame > 0) {
+ swfdec_movie_goto (movie, movie->frame - 1);
+ } else {
+ SWFDEC_INFO ("can't execute previousFrame, already at first frame");
+ }
+ } else {
+ SWFDEC_ERROR ("no movie to previousFrame on");
+ }
+}
+
+static void
+swfdec_action_goto_frame (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
+{
+ SwfdecMovie *movie = swfdec_action_get_target (cx);
+ guint frame;
+
+ if (len != 2) {
+ SWFDEC_ERROR ("GotoFrame action length invalid (is %u, should be 2", len);
+ return;
+ }
+ frame = GUINT16_FROM_LE (...
2007 Jul 04
0
Branch 'as' - 25 commits - libswfdec/Makefile.am libswfdec/swfdec_as_boolean.c libswfdec/swfdec_as_boolean.h libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c
...ULL, NULL, NULL, swfdec_action_extends } },
+ [SWFDEC_AS_ACTION_EXTENDS] = { "Extends", NULL, 2, 0, { NULL, NULL, NULL, swfdec_action_extends, swfdec_action_extends } },
/* version 3 */
[SWFDEC_AS_ACTION_GOTO_FRAME] = { "GotoFrame", swfdec_action_print_goto_frame, 0, 0, { swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame, swfdec_action_goto_frame } },
[SWFDEC_AS_ACTION_GET_URL] = { "GetURL", swfdec_action_print_get_url, 0, 0, { swfdec_action_get_url, swfdec_action_get_url, swfdec_action_get_url, swfdec_action_get_url, swfdec...
2007 Jun 27
0
Branch 'as' - 16 commits - configure.ac libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_script_function.c
...{
+ if (SWFDEC_IS_MOVIE (cx->frame->target)) {
+ SwfdecMovie *movie = SWFDEC_MOVIE (cx->frame->target);
if (movie->frame > 0) {
swfdec_movie_goto (movie, movie->frame - 1);
} else {
@@ -124,7 +103,6 @@ swfdec_action_previous_frame (SwfdecAsCo
static void
swfdec_action_goto_frame (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
{
- SwfdecMovie *movie = swfdec_action_get_target (cx);
guint frame;
if (len != 2) {
@@ -132,7 +110,8 @@ swfdec_action_goto_frame (SwfdecAsContex
return;
}
frame = GUINT16_FROM_LE (*((guint16 *) data));
- if (...
2007 Dec 10
0
5 commits - libswfdec/jpeg libswfdec/swfdec_as_interpret.c libswfdec/swfdec_bits.c libswfdec/swfdec_cached.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_flash_security.c libswfdec/swfdec_image.c
...<otte at gnome.org>
Date: Mon Dec 10 21:52:53 2007 +0100
fix alignment warnings
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index c37b2bf..0b48d67 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -116,7 +116,7 @@ swfdec_action_goto_frame (SwfdecAsContext *cx, guint action, const guint8 *data,
SWFDEC_ERROR ("GotoFrame action length invalid (is %u, should be 2", len);
return;
}
- frame = GUINT16_FROM_LE (*((guint16 *) data));
+ frame = (data[0] | data[1] << 8);
if (SWFDEC_IS_SPRITE_MOVIE (cx->fra...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...SWFDEC_ERROR ("FIXME: handle targets");
+ }
+ frame = swfdec_sprite_get_frame (SWFDEC_SPRITE_MOVIE (movie)->sprite, name);
+ } else {
+ /* FIXME: how do we treat undefined etc? */
+ frame = swfdec_action_to_number (cx, val);
+ }
+ return frame;
+}
+
static JSBool
swfdec_action_goto_frame2 (JSContext *cx, guint action, const guint8 *data, guint len)
{
@@ -274,7 +295,6 @@ swfdec_action_goto_frame2 (JSContext *cx
guint bias;
gboolean play;
jsval val;
- int frame;
SwfdecMovie *movie;
swfdec_bits_init_data (&bits, data, len);
@@ -288,24 +308,13 @@ swfdec_action_g...
2007 Jan 31
0
Branch 'interpreter' - 20 commits - autogen.sh configure.ac libswfdec/js libswfdec/swfdec_debug.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_script.c
...rame > 0) {
+ swfdec_movie_goto (movie, movie->frame - 1);
+ } else {
+ SWFDEC_INFO ("can't execute previousFrame, already at first frame");
+ }
+ } else {
+ SWFDEC_ERROR ("no movie to previousFrame on");
+ }
+ return JS_TRUE;
+}
+
+static JSBool
swfdec_action_goto_frame (JSContext *cx, guint action, const guint8 *data, guint len)
{
SwfdecMovie *movie = swfdec_action_get_target (cx);
@@ -160,6 +213,76 @@ swfdec_action_goto_frame (JSContext *cx,
}
static JSBool
+swfdec_action_goto_label (JSContext *cx, guint action, const guint8 *data, guint len)
+{
+ Swfd...
2007 Apr 08
0
6 commits - libswfdec/Makefile.am libswfdec/swfdec_audio_flv.c libswfdec/swfdec_audio_flv.h libswfdec/swfdec_audio_stream.c libswfdec/swfdec_audio_stream.h libswfdec/swfdec_buffer.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec_audio.c
...Author: Benjamin Otte <otte@gnome.org>
Date: Sun Apr 8 11:06:26 2007 +0200
implement StringEquals action
diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c
index d8ce1ad..5163ce7 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -360,7 +360,8 @@ swfdec_action_goto_frame (JSContext *cx,
}
frame = GUINT16_FROM_LE (*((guint16 *) data));
if (movie) {
- swfdec_movie_goto (movie, frame);
+ if (frame < movie->n_frames)
+ swfdec_movie_goto (movie, frame);
movie->stopped = TRUE;
} else {
SWFDEC_ERROR ("no movie to goto on&quo...