CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/08/27 12:44:29
Modified files: . : ChangeLog server : cxform.cpp font.cpp matrix.cpp stream.cpp server/parser : button_character_def.cpp edit_text_character_def.cpp filter_factory.cpp sound_definition.cpp video_stream_def.cpp server/swf : PlaceObject2Tag.cpp tag_loaders.cpp utilities : parser.cpp Log message: * server/cxform.cpp, server/font.cpp, server/matrix.cpp, server/stream.h, server/parser/button_character_def.cpp, server/parser/edit_text_character_def.cpp, server/parser/filter_factory.cpp, server/parser/sound_definition.cpp, server/parser/video_stream_def.cpp, server/swf/PlaceObject2Tag.cpp, server/swf/tag_loaders.cpp, utilities/parser.cpp: read_uint(1) => read_bit(); * server/stream.cpp (read_uint): htf_sweet.swf aborts if we assert bit_count <= 24, so change this base to <= 32 (will inspect later). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4115&r2=1.4116 http://cvs.savannah.gnu.org/viewcvs/gnash/server/cxform.cpp?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/font.cpp?cvsroot=gnash&r1=1.46&r2=1.47 http://cvs.savannah.gnu.org/viewcvs/gnash/server/matrix.cpp?cvsroot=gnash&r1=1.17&r2=1.18 http://cvs.savannah.gnu.org/viewcvs/gnash/server/stream.cpp?cvsroot=gnash&r1=1.27&r2=1.28 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/button_character_def.cpp?cvsroot=gnash&r1=1.17&r2=1.18 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/edit_text_character_def.cpp?cvsroot=gnash&r1=1.12&r2=1.13 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/filter_factory.cpp?cvsroot=gnash&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/sound_definition.cpp?cvsroot=gnash&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/video_stream_def.cpp?cvsroot=gnash&r1=1.11&r2=1.12 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/PlaceObject2Tag.cpp?cvsroot=gnash&r1=1.20&r2=1.21 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/tag_loaders.cpp?cvsroot=gnash&r1=1.131&r2=1.132 http://cvs.savannah.gnu.org/viewcvs/gnash/utilities/parser.cpp?cvsroot=gnash&r1=1.41&r2=1.42 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4115 retrieving revision 1.4116 diff -u -b -r1.4115 -r1.4116 --- ChangeLog 27 Aug 2007 12:09:04 -0000 1.4115 +++ ChangeLog 27 Aug 2007 12:44:27 -0000 1.4116 @@ -1,5 +1,19 @@ 2007-08-27 Sandro Santilli <[EMAIL PROTECTED]> + * server/cxform.cpp, server/font.cpp, server/matrix.cpp, + server/stream.h, server/parser/button_character_def.cpp, + server/parser/edit_text_character_def.cpp, + server/parser/filter_factory.cpp, + server/parser/sound_definition.cpp, + server/parser/video_stream_def.cpp, + server/swf/PlaceObject2Tag.cpp, server/swf/tag_loaders.cpp, + utilities/parser.cpp: read_uint(1) => read_bit(); + * server/stream.cpp (read_uint): htf_sweet.swf aborts if we + assert bit_count <= 24, so change this base to <= 32 (will + inspect later). + +2007-08-27 Sandro Santilli <[EMAIL PROTECTED]> + * server/stream.{cpp,h}: add read_bit(), optimize read_uint() a little-bit (there are likely more optimization options). * server/parser/shape_character_def.cpp (read): use read_bit() Index: server/cxform.cpp =================================================================== RCS file: /sources/gnash/gnash/server/cxform.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/cxform.cpp 1 Jul 2007 10:54:21 -0000 1.4 +++ server/cxform.cpp 27 Aug 2007 12:44:28 -0000 1.5 @@ -16,7 +16,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -// $Id: cxform.cpp,v 1.4 2007/07/01 10:54:21 bjacques Exp $ +// $Id: cxform.cpp,v 1.5 2007/08/27 12:44:28 strk Exp $ // #ifdef HAVE_CONFIG_H @@ -87,8 +87,8 @@ { in->align(); - int has_add = in->read_uint(1); - int has_mult = in->read_uint(1); + bool has_add = in->read_bit(); + bool has_mult = in->read_bit(); int nbits = in->read_uint(4); if (has_mult) { @@ -115,8 +115,8 @@ { in->align(); - int has_add = in->read_uint(1); - int has_mult = in->read_uint(1); + bool has_add = in->read_bit(); + bool has_mult = in->read_bit(); int nbits = in->read_uint(4); if (has_mult) { Index: server/font.cpp =================================================================== RCS file: /sources/gnash/gnash/server/font.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -u -b -r1.46 -r1.47 --- server/font.cpp 22 Aug 2007 13:09:10 -0000 1.46 +++ server/font.cpp 27 Aug 2007 12:44:28 -0000 1.47 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: font.cpp,v 1.46 2007/08/22 13:09:10 cmusick Exp $ */ +/* $Id: font.cpp,v 1.47 2007/08/27 12:44:28 strk Exp $ */ // Based on the public domain work of Thatcher Ulrich <[EMAIL PROTECTED]> 2003 @@ -255,14 +255,14 @@ log_parse(_("reading DefineFont2 or DefineFont3")); ); - bool has_layout = (in->read_uint(1) != 0); - m_shift_jis_chars = (in->read_uint(1) != 0); - m_unicode_chars = (in->read_uint(1) != 0); - m_ansi_chars = (in->read_uint(1) != 0); - bool wide_offsets = (in->read_uint(1) != 0); - m_wide_codes = (in->read_uint(1) != 0); - m_is_italic = (in->read_uint(1) != 0); - m_is_bold = (in->read_uint(1) != 0); + bool has_layout = in->read_bit(); + m_shift_jis_chars = in->read_bit(); + m_unicode_chars = in->read_bit(); + m_ansi_chars = in->read_bit(); + bool wide_offsets = in->read_bit(); + m_wide_codes = in->read_bit(); + m_is_italic = in->read_bit(); + m_is_bold = in->read_bit(); uint8_t reserved = in->read_u8(); IF_VERBOSE_PARSE ( Index: server/matrix.cpp =================================================================== RCS file: /sources/gnash/gnash/server/matrix.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -b -r1.17 -r1.18 --- server/matrix.cpp 7 Aug 2007 20:53:10 -0000 1.17 +++ server/matrix.cpp 27 Aug 2007 12:44:28 -0000 1.18 @@ -19,7 +19,7 @@ // // Original author: Thatcher Ulrich <[EMAIL PROTECTED]> 2003 // -// $Id: matrix.cpp,v 1.17 2007/08/07 20:53:10 strk Exp $ +// $Id: matrix.cpp,v 1.18 2007/08/27 12:44:28 strk Exp $ // #ifdef HAVE_CONFIG_H @@ -213,14 +213,14 @@ set_identity(); - int has_scale = in->read_uint(1); + bool has_scale = in->read_bit(); if (has_scale) { int scale_nbits = in->read_uint(5); m_[0][0] = in->read_sint(scale_nbits) / 65536.0f; m_[1][1] = in->read_sint(scale_nbits) / 65536.0f; } - int has_rotate = in->read_uint(1); + bool has_rotate = in->read_bit(); if (has_rotate) { int rotate_nbits = in->read_uint(5); Index: server/stream.cpp =================================================================== RCS file: /sources/gnash/gnash/server/stream.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -b -r1.27 -r1.28 --- server/stream.cpp 27 Aug 2007 12:09:05 -0000 1.27 +++ server/stream.cpp 27 Aug 2007 12:44:28 -0000 1.28 @@ -70,7 +70,9 @@ unsigned stream::read_uint(unsigned short bitcount) { - assert(bitcount <= 24); + //assert(bitcount <= 24); + // should be 24, check why htf_sweet.swf fails this assertion + assert(bitcount <= 32); if (!m_unused_bits) { Index: server/parser/button_character_def.cpp =================================================================== RCS file: /sources/gnash/gnash/server/parser/button_character_def.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -b -r1.17 -r1.18 --- server/parser/button_character_def.cpp 10 Jul 2007 16:16:00 -0000 1.17 +++ server/parser/button_character_def.cpp 27 Aug 2007 12:44:28 -0000 1.18 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: button_character_def.cpp,v 1.17 2007/07/10 16:16:00 strk Exp $ */ +/* $Id: button_character_def.cpp,v 1.18 2007/08/27 12:44:28 strk Exp $ */ // Based on the public domain work of Thatcher Ulrich <[EMAIL PROTECTED]> 2003 @@ -163,12 +163,12 @@ { m_in_point = m_out_point = m_loop_count = 0; in->read_uint(2); // skip reserved bits. - m_stop_playback = in->read_uint(1) ? true : false; - m_no_multiple = in->read_uint(1) ? true : false; - m_has_envelope = in->read_uint(1) ? true : false; - m_has_loops = in->read_uint(1) ? true : false; - m_has_out_point = in->read_uint(1) ? true : false; - m_has_in_point = in->read_uint(1) ? true : false; + m_stop_playback = in->read_bit(); + m_no_multiple = in->read_bit(); + m_has_envelope = in->read_bit(); + m_has_loops = in->read_bit(); + m_has_out_point = in->read_bit(); + m_has_in_point = in->read_bit(); if (m_has_in_point) m_in_point = in->read_u32(); if (m_has_out_point) m_out_point = in->read_u32(); if (m_has_loops) m_loop_count = in->read_u16(); Index: server/parser/edit_text_character_def.cpp =================================================================== RCS file: /sources/gnash/gnash/server/parser/edit_text_character_def.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -b -r1.12 -r1.13 --- server/parser/edit_text_character_def.cpp 11 Jul 2007 16:52:47 -0000 1.12 +++ server/parser/edit_text_character_def.cpp 27 Aug 2007 12:44:28 -0000 1.13 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: edit_text_character_def.cpp,v 1.12 2007/07/11 16:52:47 strk Exp $ */ +/* $Id: edit_text_character_def.cpp,v 1.13 2007/08/27 12:44:28 strk Exp $ */ // Based on the public domain text.cpp of Thatcher Ulrich <[EMAIL PROTECTED]> 2003 @@ -44,23 +44,23 @@ m_rect.read(in); in->align(); - bool has_text = in->read_uint(1) ? true : false; - m_word_wrap = in->read_uint(1) ? true : false; - m_multiline = in->read_uint(1) ? true : false; - m_password = in->read_uint(1) ? true : false; - m_readonly = in->read_uint(1) ? true : false; - bool has_color = in->read_uint(1) ? true : false; - bool has_max_length = in->read_uint(1) ? true : false; - bool has_font = in->read_uint(1) ? true : false; - - in->read_uint(1); // reserved - m_auto_size = in->read_uint(1) ? true : false; - bool has_layout = in->read_uint(1) ? true : false; - m_no_select = in->read_uint(1) ? true : false; - m_border = in->read_uint(1) ? true : false; - in->read_uint(1); // reserved - m_html = in->read_uint(1) ? true : false; - m_use_outlines = in->read_uint(1) ? true : false; + bool has_text = in->read_bit(); + m_word_wrap = in->read_bit(); + m_multiline = in->read_bit(); + m_password = in->read_bit(); + m_readonly = in->read_bit(); + bool has_color = in->read_bit(); + bool has_max_length = in->read_bit(); + bool has_font = in->read_bit(); + + in->read_bit(); // reserved + m_auto_size = in->read_bit(); + bool has_layout = in->read_bit(); + m_no_select = in->read_bit(); + m_border = in->read_bit(); + in->read_bit(); // reserved + m_html = in->read_bit(); + m_use_outlines = in->read_bit(); if (has_font) { Index: server/parser/filter_factory.cpp =================================================================== RCS file: /sources/gnash/gnash/server/parser/filter_factory.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -b -r1.2 -r1.3 --- server/parser/filter_factory.cpp 27 Aug 2007 03:06:42 -0000 1.2 +++ server/parser/filter_factory.cpp 27 Aug 2007 12:44:28 -0000 1.3 @@ -15,7 +15,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -/* $Id: filter_factory.cpp,v 1.2 2007/08/27 03:06:42 cmusick Exp $ */ +/* $Id: filter_factory.cpp,v 1.3 2007/08/27 12:44:28 strk Exp $ */ #include "filter_factory.h" #include "BitmapFilter.h" @@ -123,9 +123,9 @@ m_strength = in->read_short_sfixed(); - m_inner = in->read_uint(1) ? true : false; - m_knockout = in->read_uint(1) ? true : false; - m_hideObject = in->read_uint(1) ? true : false; + m_inner = in->read_bit(); + m_knockout = in->read_bit(); + m_hideObject = in->read_bit(); static_cast<void> (in->read_uint(5)); // Throw these away on purpose. @@ -154,8 +154,8 @@ m_strength = in->read_short_sfixed(); - m_inner = in->read_uint(1) ? true : false; - m_knockout = in->read_uint(1) ? true : false; + m_inner = in->read_bit(); + m_knockout = in->read_bit(); static_cast<void> (in->read_uint(6)); // Throw these away. @@ -181,10 +181,10 @@ m_strength = in->read_short_sfixed(); - bool inner_shadow = in->read_uint(1) ? true : false; - m_knockout = in->read_uint(1) ? true : false; - static_cast<void> (in->read_uint(1)); - bool on_top = in->read_uint(1) ? true : false; + bool inner_shadow = in->read_bit(); + m_knockout = in->read_bit(); + in->read_bit(); // reserved ? + bool on_top = in->read_bit(); // Set the bevel type. top and inner is full, top is outer, inner is inner m_type = on_top ? (inner_shadow ? FULL_BEVEL : OUTER_BEVEL) : INNER_BEVEL; @@ -217,10 +217,10 @@ m_strength = in->read_short_sfixed(); - bool inner = in->read_uint(1) ? true : false; - m_knockout = in->read_uint(1) ? true : false; - static_cast<void> (in->read_uint(1)); - bool outer = in->read_uint(1) ? true : false; + bool inner = in->read_bit(); + m_knockout = in->read_bit(); + in->read_bit(); // reserved ? + bool outer = in->read_bit(); m_type = outer ? (inner ? FULL_GLOW : OUTER_GLOW) : INNER_GLOW; @@ -247,8 +247,8 @@ static_cast<void> (in->read_uint(6)); // Throw away. - m_clamp = in->read_uint(1) ? true : false; - m_preserveAlpha = in->read_uint(1) ? true : false; + m_clamp = in->read_bit(); + m_preserveAlpha = in->read_bit(); return true; } @@ -286,10 +286,10 @@ m_strength = in->read_short_sfixed(); - bool inner = in->read_uint(1) ? true : false; - m_knockout = in->read_uint(1) ? true : false; - static_cast<void> (in->read_uint(1)); - bool outer = in->read_uint(1) ? true : false; + bool inner = in->read_bit(); + m_knockout = in->read_bit(); + in->read_bit(); // reserved ? + bool outer = in->read_bit(); m_type = outer ? (inner ? FULL_BEVEL : OUTER_BEVEL) : INNER_BEVEL; Index: server/parser/sound_definition.cpp =================================================================== RCS file: /sources/gnash/gnash/server/parser/sound_definition.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- server/parser/sound_definition.cpp 24 May 2007 08:48:03 -0000 1.4 +++ server/parser/sound_definition.cpp 27 Aug 2007 12:44:28 -0000 1.5 @@ -37,12 +37,12 @@ assert(sam); in->read_uint(2); // skip reserved bits. - m_stop_playback = in->read_uint(1) ? true : false; - bool no_multiple = in->read_uint(1) ? true : false; - bool has_envelope = in->read_uint(1) ? true : false; - bool has_loops = in->read_uint(1) ? true : false; - bool has_out_point = in->read_uint(1) ? true : false; - bool has_in_point = in->read_uint(1) ? true : false; + m_stop_playback = in->read_bit(); + bool no_multiple = in->read_bit(); + bool has_envelope = in->read_bit(); + bool has_loops = in->read_bit(); + bool has_out_point = in->read_bit(); + bool has_in_point = in->read_bit(); UNUSED(no_multiple); UNUSED(has_envelope); Index: server/parser/video_stream_def.cpp =================================================================== RCS file: /sources/gnash/gnash/server/parser/video_stream_def.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -u -b -r1.11 -r1.12 --- server/parser/video_stream_def.cpp 24 Jul 2007 22:48:12 -0000 1.11 +++ server/parser/video_stream_def.cpp 27 Aug 2007 12:44:29 -0000 1.12 @@ -16,7 +16,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -// $Id: video_stream_def.cpp,v 1.11 2007/07/24 22:48:12 tgc Exp $ +// $Id: video_stream_def.cpp,v 1.12 2007/08/27 12:44:29 strk Exp $ #include "video_stream_def.h" #include "video_stream_instance.h" @@ -67,7 +67,7 @@ m_reserved_flags = in->read_uint(5); m_deblocking_flags = in->read_uint(2); - m_smoothing_flags = in->read_uint(1) ? true : false; + m_smoothing_flags = in->read_bit(); m_codec_id = in->read_u8(); Index: server/swf/PlaceObject2Tag.cpp =================================================================== RCS file: /sources/gnash/gnash/server/swf/PlaceObject2Tag.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -u -b -r1.20 -r1.21 --- server/swf/PlaceObject2Tag.cpp 26 Aug 2007 15:14:13 -0000 1.20 +++ server/swf/PlaceObject2Tag.cpp 27 Aug 2007 12:44:29 -0000 1.21 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: PlaceObject2Tag.cpp,v 1.20 2007/08/26 15:14:13 cmusick Exp $ */ +/* $Id: PlaceObject2Tag.cpp,v 1.21 2007/08/27 12:44:29 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -221,21 +221,21 @@ bool has_blend_mode = false; bool has_filters = false; - bool has_actions = in->read_uint(1) ? true : false; - bool has_clip_bracket = in->read_uint(1) ? true : false; - bool has_name = in->read_uint(1) ? true : false; - bool has_ratio = in->read_uint(1) ? true : false; - bool has_cxform = in->read_uint(1) ? true : false; - bool has_matrix = in->read_uint(1) ? true : false; - bool has_char = in->read_uint(1) ? true : false; - bool flag_move = in->read_uint(1) ? true : false; + bool has_actions = in->read_bit(); + bool has_clip_bracket = in->read_bit(); + bool has_name = in->read_bit(); + bool has_ratio = in->read_bit(); + bool has_cxform = in->read_bit(); + bool has_matrix = in->read_bit(); + bool has_char = in->read_bit(); + bool flag_move = in->read_bit(); if (!place_2 && movie_version >= 8) { - static_cast<void> (in->read_uint(5)); // Ignore on purpose. - has_bitmap_caching = in->read_uint(1) ? true : false; - has_blend_mode = in->read_uint(1) ? true : false; - has_filters = in->read_uint(1) ? true : false; + in->read_uint(5); // Ignore on purpose. + has_bitmap_caching = in->read_bit(); + has_blend_mode = in->read_bit(); + has_filters = in->read_bit(); } m_depth = in->read_u16()+character::staticDepthOffset; Index: server/swf/tag_loaders.cpp =================================================================== RCS file: /sources/gnash/gnash/server/swf/tag_loaders.cpp,v retrieving revision 1.131 retrieving revision 1.132 diff -u -b -r1.131 -r1.132 --- server/swf/tag_loaders.cpp 22 Aug 2007 13:09:10 -0000 1.131 +++ server/swf/tag_loaders.cpp 27 Aug 2007 12:44:29 -0000 1.132 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: tag_loaders.cpp,v 1.131 2007/08/22 13:09:10 cmusick Exp $ */ +/* $Id: tag_loaders.cpp,v 1.132 2007/08/27 12:44:29 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1390,8 +1390,8 @@ sound_handler::format_type format = static_cast<sound_handler::format_type>(in->read_uint(4)); sound_handler::format_type orgFormat = format; int sample_rate = in->read_uint(2); // multiples of 5512.5 - bool sample_16bit = in->read_uint(1) ? true : false; - bool stereo = in->read_uint(1) ? true : false; + bool sample_16bit = in->read_bit(); + bool stereo = in->read_bit(); unsigned int sample_count = in->read_u32(); @@ -1509,8 +1509,8 @@ sound_handler::format_type format = static_cast<sound_handler::format_type>(in->read_uint(4)); sound_handler::format_type orgFormat = format; int sample_rate = in->read_uint(2); // multiples of 5512.5 - bool sample_16bit = in->read_uint(1) ? true : false; - bool stereo = in->read_uint(1) ? true : false; + bool sample_16bit = in->read_bit(); + bool stereo = in->read_bit(); // checks if this is a new streams header or just one in the row if (format == 0 && sample_rate == 0 && !sample_16bit && !stereo) return; @@ -1786,9 +1786,9 @@ file_attrs_flags flags; flags.reserved1 = in->read_uint(3); - flags.has_metadata = in->read_uint(1); + flags.has_metadata = in->read_bit(); flags.reserved2 = in->read_uint(3); - flags.use_network = in->read_uint(1); + flags.use_network = in->read_bit(); flags.reserved3 = in->read_uint(24); IF_VERBOSE_PARSE Index: utilities/parser.cpp =================================================================== RCS file: /sources/gnash/gnash/utilities/parser.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -u -b -r1.41 -r1.42 --- utilities/parser.cpp 1 Jul 2007 10:55:16 -0000 1.41 +++ utilities/parser.cpp 27 Aug 2007 12:44:29 -0000 1.42 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: parser.cpp,v 1.41 2007/07/01 10:55:16 bjacques Exp $ */ +/* $Id: parser.cpp,v 1.42 2007/08/27 12:44:29 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -116,13 +116,13 @@ m_[0][0] = 1; m_[1][1] = 1; - int has_scale = in->read_uint(1); + bool has_scale = in->read_bit(); if (has_scale) { int scale_nbits = in->read_uint(5); m_[0][0] = in->read_sint(scale_nbits) / 65536.0f; m_[1][1] = in->read_sint(scale_nbits) / 65536.0f; } - int has_rotate = in->read_uint(1); + bool has_rotate = in->read_bit(); if (has_rotate) { int rotate_nbits = in->read_uint(5); m_[1][0] = in->read_sint(rotate_nbits) / 65536.0f; @@ -224,8 +224,8 @@ { in->align(); - int has_add = in->read_uint(1); - int has_mult = in->read_uint(1); + bool has_add = in->read_bit(); + bool has_mult = in->read_bit(); int nbits = in->read_uint(4); if (has_mult) { @@ -251,8 +251,8 @@ { in->align(); - int has_add = in->read_uint(1); - int has_mult = in->read_uint(1); + bool has_add = in->read_bit(); + bool has_mult = in->read_bit(); int nbits = in->read_uint(4); if (has_mult) { @@ -357,14 +357,14 @@ log_msg("place_object2:\n"); ident++; - bool has_actions = input->read_uint(1) ? true : false; - bool has_clip_depth = input->read_uint(1) ? true : false; - bool has_name = input->read_uint(1) ? true : false; - bool has_ratio = input->read_uint(1) ? true : false; - bool has_cxform = input->read_uint(1) ? true : false; - bool has_matrix = input->read_uint(1) ? true : false; - bool has_char = input->read_uint(1) ? true : false; - bool flag_move = input->read_uint(1) ? true : false; + bool has_actions = input->read_bit(); + bool has_clip_depth = input->read_bit(); + bool has_name = input->read_bit(); + bool has_ratio = input->read_bit(); + bool has_cxform = input->read_bit(); + bool has_matrix = input->read_bit(); + bool has_char = input->read_bit(); + bool flag_move = input->read_bit(); UNUSED(has_actions); _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit