search for: swfdec_bits_get_u16

Displaying 20 results from an estimated 70 matches for "swfdec_bits_get_u16".

2007 Feb 15
0
8 commits - libswfdec/swfdec_bits.h libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_tag.c libswfdec/swfdec_text.c libswfdec/swfdec_text.h test/swfedit_token.c test/various
...+++ b/libswfdec/swfdec_font.c @@ -206,6 +206,7 @@ tag_func_define_font (SwfdecSwfDecoder * font = swfdec_swf_decoder_create_character (s, id, SWFDEC_TYPE_FONT); if (!font) return SWFDEC_STATUS_OK; + font->scale_factor = SWFDEC_TEXT_SCALE_FACTOR; offsets = s->b; n_glyphs = swfdec_bits_get_u16 (&s->b); @@ -234,16 +235,22 @@ tag_func_define_font (SwfdecSwfDecoder * } static void -get_kerning_record (SwfdecBits * bits, int wide_codes) +swfdec_font_parse_kerning_table (SwfdecSwfDecoder *s, SwfdecFont *font, gboolean wide_codes) { - if (wide_codes) { - swfdec_bits_get_u16 (bi...
2007 Aug 13
0
2 commits - libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_tag.h
...button_append_content (SwfdecButt static int tag_func_define_button_2 (SwfdecSwfDecoder * s, guint tag) { - SwfdecBits *bits = &s->b; - int id; - int flags; - int offset; + SwfdecBits bits; + int id, reserved; + guint length; SwfdecButton *button; char *script_name; - id = swfdec_bits_get_u16 (bits); + id = swfdec_bits_get_u16 (&s->b); button = swfdec_swf_decoder_create_character (s, id, SWFDEC_TYPE_BUTTON); if (!button) return SWFDEC_STATUS_OK; SWFDEC_LOG (" ID: %d", id); - flags = swfdec_bits_get_u8 (bits); - if (flags & 0x01) - button-&gt...
2007 Apr 22
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_movie.c
...s_left (&s->b)) { + SWFDEC_WARNING ("parsing shape didn't use %d bytes", + swfdec_bits_left (&s->b) / 8); } + s->b = save_bits; } int @@ -232,7 +229,7 @@ tag_func_define_font (SwfdecSwfDecoder * g_array_set_size (font->glyphs, n_glyphs); offset = swfdec_bits_get_u16 (&offsets); - for (i = 0; i < n_glyphs; i++) { + for (i = 0; i < n_glyphs && swfdec_bits_left (&s->b); i++) { SwfdecFontEntry *entry = &g_array_index (font->glyphs, SwfdecFontEntry, i); if (i + 1 == n_glyphs) next_offset = offset + swfdec_bits_left...
2007 Oct 26
0
3 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_interpret.c
...etbit (&bits); - finally = swfdec_bits_getbit (&bits); - catch = swfdec_bits_getbit (&bits); + try_data->use_register = swfdec_bits_getbit (&bits); + try_data->finally = swfdec_bits_getbit (&bits); + try_data->catch = swfdec_bits_getbit (&bits); try_size = swfdec_bits_get_u16 (&bits); - catch_size = swfdec_bits_get_u16 (&bits); - finally_size = swfdec_bits_get_u16 (&bits); + try_data->catch_size = swfdec_bits_get_u16 (&bits); + try_data->finally_size = swfdec_bits_get_u16 (&bits); + try_data->start = data + len + try_size; - if (use_...
2007 Feb 15
0
3 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_shape.c libswfdec/swfdec_tag.c
...@@ tag_func_define_text_2 (SwfdecSwfDecoder int tag_func_define_sprite (SwfdecSwfDecoder * s) { - SwfdecBits *bits = &s->b; SwfdecBits parse; int id; SwfdecSprite *sprite; int ret; - SwfdecBits save_bits; + guint tag; - save_bits = s->b; + parse = s->b; - id = swfdec_bits_get_u16 (bits); + id = swfdec_bits_get_u16 (&parse); sprite = swfdec_swf_decoder_create_character (s, id, SWFDEC_TYPE_SPRITE); if (!sprite) return SWFDEC_STATUS_OK; SWFDEC_LOG (" ID: %d", id); - swfdec_sprite_set_n_frames (sprite, swfdec_bits_get_u16 (bits), SWFDEC_DECODE...
2007 Jun 19
0
Branch 'as' - test/dump.c
...+ guint depth; + + swfdec_bits_init (&bits, buffer); + swfdec_bits_getbits (&bits, 6); + has_char = swfdec_bits_getbit (&bits); + is_move = swfdec_bits_getbit (&bits); + if (tag == SWFDEC_TAG_PLACEOBJECT3) + swfdec_bits_get_u8 (&bits); + depth = swfdec_bits_get_u16 (&bits); + g_print (" %4u %5u %s", j, depth, is_move ? "move" : "place"); + if (has_char) { + SwfdecCharacter *c; + c = swfdec_swf_decoder_get_character (dec, swfdec_bits_get_u16 (&bits)); + if (c) + g_print (" %s %u", G_O...
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
...1:11:56 2007 +0100 use this as parent in DefineFunction diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c index 95a5561..9a9dd75 100644 --- a/libswfdec/swfdec_script.c +++ b/libswfdec/swfdec_script.c @@ -1439,10 +1439,10 @@ swfdec_action_do_define_function (JSCont n_args = swfdec_bits_get_u16 (&bits); if (*function_name == '\0') { /* anonymous function */ - fun = JS_NewFunction (cx, NULL, n_args, JSFUN_LAMBDA, NULL, NULL); + fun = JS_NewFunction (cx, NULL, n_args, JSFUN_LAMBDA, cx->fp->thisp, NULL); } else { /* named function */ - fun = JS_NewF...
2007 Apr 17
0
15 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_edittext.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sprite.c
...tAssets loop if no more bytes are available diff --git a/libswfdec/swfdec_root_sprite.c b/libswfdec/swfdec_root_sprite.c index 7159927..41e8b31 100644 --- a/libswfdec/swfdec_root_sprite.c +++ b/libswfdec/swfdec_root_sprite.c @@ -117,7 +117,7 @@ tag_func_export_assets (SwfdecSwfDecoder count = swfdec_bits_get_u16 (bits); SWFDEC_LOG ("exporting %u assets", count); - for (i = 0; i < count; i++) { + for (i = 0; i < count && swfdec_bits_left (bits); i++) { guint id; SwfdecCharacter *object; char *name; diff-tree 4ecf6f08ab585cbf8089373cb6535d5e3e3493fc (from 09b659302...
2007 Apr 17
0
Branch 'as' - 17 commits - libswfdec/jpeg libswfdec/swfdec_bits.c libswfdec/swfdec_font.c libswfdec/swfdec_image.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_script.c libswfdec/swfdec_shape.c libswfdec/swfdec_sound.c libswfdec/swfdec_sprite.c
...tAssets loop if no more bytes are available diff --git a/libswfdec/swfdec_root_sprite.c b/libswfdec/swfdec_root_sprite.c index 7159927..41e8b31 100644 --- a/libswfdec/swfdec_root_sprite.c +++ b/libswfdec/swfdec_root_sprite.c @@ -117,7 +117,7 @@ tag_func_export_assets (SwfdecSwfDecoder count = swfdec_bits_get_u16 (bits); SWFDEC_LOG ("exporting %u assets", count); - for (i = 0; i < count; i++) { + for (i = 0; i < count && swfdec_bits_left (bits); i++) { guint id; SwfdecCharacter *object; char *name; diff-tree 4ecf6f08ab585cbf8089373cb6535d5e3e3493fc (from 09b659302...
2007 Jun 18
0
Branch 'as' - 8 commits - libswfdec/swfdec_movie.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_sprite_movie.h libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_swf_decoder.h
...;actions = g_array_new (FALSE, FALSE, sizeof (SwfdecSpriteAction)); - - action.type = type; - action.data = data; - g_array_append_val (frame->actions, action); -} - -static int -swfdec_get_clipeventflags (SwfdecSwfDecoder * s, SwfdecBits * bits) -{ - if (s->version <= 5) { - return swfdec_bits_get_u16 (bits); - } else { - return swfdec_bits_get_u32 (bits); - } -} - -int -tag_show_frame (SwfdecSwfDecoder * s, guint tag) -{ - SWFDEC_DEBUG("show_frame %d of id %d", s->parse_sprite->parse_frame, - SWFDEC_CHARACTER (s->parse_sprite)->id); - - s->parse_sprite->p...
2007 Jun 06
0
Branch 'as' - libswfdec/Makefile.am libswfdec/swfdec_root_movie.c libswfdec/swfdec_root_sprite.c libswfdec/swfdec_root_sprite.h libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_swf_decoder.h libswfdec/swfdec_tag.c
...SwfdecSpriteAction)); - array = root->root_actions[sprite->parse_frame]; - } - action.type = type; - action.data = data; - g_array_append_val (array, action); -} - -int -tag_func_export_assets (SwfdecSwfDecoder * s) -{ - SwfdecBits *bits = &s->b; - guint count, i; - - count = swfdec_bits_get_u16 (bits); - SWFDEC_LOG ("exporting %u assets", count); - for (i = 0; i < count && swfdec_bits_left (bits); i++) { - guint id; - SwfdecCharacter *object; - char *name; - id = swfdec_bits_get_u16 (bits); - object = swfdec_swf_decoder_get_character (s, id); - nam...
2007 Aug 13
0
Branch 'vivi' - 24 commits - configure.ac libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_tag.h vivified/core vivified/dock vivified/ui
...button_append_content (SwfdecButt static int tag_func_define_button_2 (SwfdecSwfDecoder * s, guint tag) { - SwfdecBits *bits = &s->b; - int id; - int flags; - int offset; + SwfdecBits bits; + int id, reserved; + guint length; SwfdecButton *button; char *script_name; - id = swfdec_bits_get_u16 (bits); + id = swfdec_bits_get_u16 (&s->b); button = swfdec_swf_decoder_create_character (s, id, SWFDEC_TYPE_BUTTON); if (!button) return SWFDEC_STATUS_OK; SWFDEC_LOG (" ID: %d", id); - flags = swfdec_bits_get_u8 (bits); - if (flags & 0x01) - button-&gt...
2007 Oct 31
0
5 commits - libswfdec/swfdec_as_object.c libswfdec/swfdec_audio.c libswfdec/swfdec_sound.c libswfdec/swfdec_xml.c
...[i-1].offset > chunk->envelope[i].offset) { + SWFDEC_ERROR ("unordered sound envelopes"); + chunk->envelope[i].offset = chunk->envelope[i-1].offset; + } - envelope.offset = swfdec_bits_get_u32 (b); for (j = 0; j < 2; j++) { - envelope.volume[j] = swfdec_bits_get_u16 (b); - if (envelope.volume[j] > 32768) { + chunk->envelope[i].volume[j] = swfdec_bits_get_u16 (b); + if (chunk->envelope[i].volume[j] > 32768) { SWFDEC_ERROR ("envelope volume too big: %u > 32768", - envelope.volume[j]); - envelope.volume[j] = 32768; +...
2007 Feb 02
0
Branch 'interpreter' - 6 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_compiler.c libswfdec/swfdec_sprite.c test/swfdec-extract.c
...mpile_state_init (player->jscx, bits, version, &state); SWFDEC_INFO ("Creating new script in frame"); - while ((action = swfdec_bits_get_u8 (bits))) { + while (swfdec_bits_left (bits) && (action = swfdec_bits_get_u8 (bits))) { if (action & 0x80) { len = swfdec_bits_get_u16 (bits); } else { diff-tree b144bf362ce73d4a739663f8a28261eb317f45be (from c93579e07522e43a3d4d3ba9927d50ee74d5d5cb) Author: Benjamin Otte <otte@gnome.org> Date: Fri Feb 2 18:59:15 2007 +0100 Clean up parsing of actions in PlaceObject2 diff --git a/libswfdec/swfdec_sprite.c b/libs...
2007 Apr 16
0
7 commits - libswfdec/swfdec_codec_gst.c libswfdec/swfdec_font.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_morph_movie.c libswfdec/swfdec_pattern.c libswfdec/swfdec_pattern.h libswfdec/swfdec_shape.c libswfdec/swfdec_shape.h libswfdec/swfdec_sprite.c
...8 */ + if (paint_style_type == 0x13) { + gradient->focus = swfdec_bits_get_s16 (bits) / 256.0; } - SWFDEC_GRADIENT_PATTERN (pattern)->radial = (paint_style_type == 0x12); } else if (paint_style_type >= 0x40 && paint_style_type <= 0x43) { guint paint_id = swfdec_bits_get_u16 (bits); SWFDEC_LOG (" background paint id = %d (type 0x%02x)", diff-tree f2fadf23193be3fd4966809e4d0c34d288127b63 (from a99f988c1777df84a2fe0b91a6f10292cba3d07a) Author: Benjamin Otte <otte@gnome.org> Date: Sun Apr 15 23:00:21 2007 +0200 implement DefineShape4 in a ver...
2007 Mar 09
0
libswfdec/swfdec_root_sprite.c libswfdec/swfdec_root_sprite.h
...priteAction)); + array = root->root_actions[sprite->parse_frame]; + } + action.type = type; + action.data = data; + g_array_append_val (array, action); +} + +int +tag_func_export_assets (SwfdecSwfDecoder * s) +{ + SwfdecBits *bits = &s->b; + unsigned int count, i; + + count = swfdec_bits_get_u16 (bits); + SWFDEC_LOG ("exporting %u assets", count); + for (i = 0; i < count; i++) { + guint id; + SwfdecCharacter *object; + char *name; + id = swfdec_bits_get_u16 (bits); + object = swfdec_swf_decoder_get_character (s, id); + name = swfdec_bits_get_string (bits);...
2007 Apr 13
0
5 commits - libswfdec/Makefile.am libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_font.c libswfdec/swfdec_loadertarget.c libswfdec/swfdec_movie.h libswfdec/swfdec_pattern.c libswfdec/swfdec_pattern.h libswfdec/swfdec_player.c
...pixels", rect.x1 / SWFDEC_TWIPS_SCALE_FACTOR, + rect.y1 / SWFDEC_TWIPS_SCALE_FACTOR); + dec->width = MAX (0, ceil (rect.x1 / SWFDEC_TWIPS_SCALE_FACTOR)); + dec->height = MAX (0, ceil (rect.y1 / SWFDEC_TWIPS_SCALE_FACTOR)); swfdec_bits_syncbits (&s->b); dec->rate = swfdec_bits_get_u16 (&s->b); SWFDEC_LOG ("rate = %g", dec->rate / 256.0); diff-tree 61c1915ce1a6b610a5023443af62d64632322b6a (from ffd9d1fab29d4f256c59b597aac0a11ee1f58317) Author: Benjamin Otte <otte@gnome.org> Date: Fri Apr 13 14:50:00 2007 +0200 split out the stroke pattern as a...
2007 Aug 17
0
2 commits - libswfdec/swfdec_as_interpret.c
...200 0 registers means 4 registers diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c index ecc828a..47e62d5 100644 --- a/libswfdec/swfdec_as_interpret.c +++ b/libswfdec/swfdec_as_interpret.c @@ -1499,6 +1499,8 @@ swfdec_action_define_function (SwfdecAsC n_args = swfdec_bits_get_u16 (&bits); if (v2) { n_registers = swfdec_bits_get_u8 (&bits); + if (n_registers == 0) + n_registers = 4; flags = swfdec_bits_get_u16 (&bits); } else { n_registers = 5;
2007 Jun 13
0
Branch 'as' - libswfdec/swfdec_swf_decoder.c
....c index 66c6e34..33fb719 100644 --- a/libswfdec/swfdec_swf_decoder.c +++ b/libswfdec/swfdec_swf_decoder.c @@ -239,6 +239,10 @@ swf_parse_header2 (SwfdecSwfDecoder * s) dec->height = MAX (0, ceil (rect.y1 / SWFDEC_TWIPS_SCALE_FACTOR)); swfdec_bits_syncbits (&s->b); dec->rate = swfdec_bits_get_u16 (&s->b); + if (dec->rate == 0) { + SWFDEC_INFO ("rate is 0, setting to 1"); + dec->rate = 1; + } SWFDEC_LOG ("rate = %g", dec->rate / 256.0); dec->frames_total = swfdec_bits_get_u16 (&s->b); SWFDEC_LOG ("n_frames = %d", dec-&g...
2007 Mar 15
0
2 commits - libswfdec/swfdec_sprite.c
...07 +0100 remove contents from lookup table in error paths diff --git a/libswfdec/swfdec_sprite.c b/libswfdec/swfdec_sprite.c index c1b8016..8bbc7c9 100644 --- a/libswfdec/swfdec_sprite.c +++ b/libswfdec/swfdec_sprite.c @@ -355,7 +355,7 @@ swfdec_spriteseg_place_object_2 (SwfdecS int id = swfdec_bits_get_u16 (bits); content->graphic = swfdec_swf_decoder_get_character (s, id); if (!SWFDEC_IS_GRAPHIC (content->graphic)) { - g_hash_table_remove (sprite->live_content, GUINT_TO_POINTER (content->depth)); + g_hash_table_remove (s->parse_sprite->live_content, GUINT_TO_POI...