[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog libbase/log.cpp libbase/log.h s...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog libbase/log.cpp libbase/log.h s... |
Date: |
Tue, 08 Aug 2006 09:50:54 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 06/08/08 09:50:54
Modified files:
. : ChangeLog
libbase : log.cpp log.h
server : edit_text_character_def.cpp font.cpp
movie_def_impl.cpp shape_character_def.cpp
sprite_definition.cpp stream.cpp styles.cpp
server/swf : tag_loaders.cpp
Log message:
* libbase/log.cpp (log_parse): removed check for
dbglogfile.getParserDump() - it's checked by IF_VERBOSE_PARSE
macro.
* libbase/log.h: added IF_VERBOSE_PARSE macro, either no-op
or checks for dbglogfile.getParserDump(), depending on
VERBOSE_PARSE macro (defaults to 1).
* server/edit_text_character_def.cpp, server/font.cpp,
server/movie_def_impl.cpp, server/shape_character_def.cpp,
server/sprite_definition.cpp, server/stream.cpp,
server/styles.cpp,
server/swf/tag_loaders.cpp: wrapped all log_parse calls inside
IF_VERBOSE_PARSE().
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.601&r2=1.602
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.cpp?cvsroot=gnash&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.h?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/server/edit_text_character_def.cpp?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/server/font.cpp?cvsroot=gnash&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_def_impl.cpp?cvsroot=gnash&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/gnash/server/shape_character_def.cpp?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/server/sprite_definition.cpp?cvsroot=gnash&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/gnash/server/stream.cpp?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/server/styles.cpp?cvsroot=gnash&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/tag_loaders.cpp?cvsroot=gnash&r1=1.22&r2=1.23
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.601
retrieving revision 1.602
diff -u -b -r1.601 -r1.602
--- ChangeLog 8 Aug 2006 07:53:09 -0000 1.601
+++ ChangeLog 8 Aug 2006 09:50:54 -0000 1.602
@@ -1,3 +1,17 @@
+2006-08-08 Sandro Santilli <address@hidden>
+
+ * libbase/log.cpp (log_parse): removed check for
+ dbglogfile.getParserDump() - it's checked by IF_VERBOSE_PARSE
+ macro.
+ * libbase/log.h: added IF_VERBOSE_PARSE macro, either no-op
+ or checks for dbglogfile.getParserDump(), depending on
+ VERBOSE_PARSE macro (defaults to 1).
+ * server/edit_text_character_def.cpp, server/font.cpp,
+ server/movie_def_impl.cpp, server/shape_character_def.cpp,
+ server/sprite_definition.cpp, server/stream.cpp, server/styles.cpp,
+ server/swf/tag_loaders.cpp: wrapped all log_parse calls inside
+ IF_VERBOSE_PARSE().
+
2006-08-07 Sandro Santilli <address@hidden>
* server/swf/ASHandlers.cpp: allow WaitForFrame actions
Index: libbase/log.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/log.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- libbase/log.cpp 6 Aug 2006 02:00:54 -0000 1.16
+++ libbase/log.cpp 8 Aug 2006 09:50:54 -0000 1.17
@@ -216,10 +216,12 @@
void
log_parse(const char* fmt, ...)
{
+#if 0 // callers should always use IF_VERBOSE_PARSE
if ( ! dbglogfile.getParserDump() )
{
return;
}
+#endif
va_list ap;
char tmp[BUFFER_SIZE];
Index: libbase/log.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/log.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- libbase/log.h 6 Aug 2006 02:00:54 -0000 1.10
+++ libbase/log.h 8 Aug 2006 09:50:54 -0000 1.11
@@ -185,6 +185,15 @@
void log_parse(const char* fmt, ...) __attribute__((format (printf, 1, 2)));
#endif
+// Undefine this to completely remove parse debugging at compile-time
+#define VERBOSE_PARSE 1
+
+#ifdef VERBOSE_PARSE
+#define IF_VERBOSE_PARSE(x) do { if ( dbglogfile.getParserDump() ) { (x); } }
while (0);
+#else
+#define IF_VERBOSE_PARSE(x)
+#endif
+
extern LogFile dbglogfile;
struct __Host_Function_Report__ {
Index: server/edit_text_character_def.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/edit_text_character_def.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- server/edit_text_character_def.cpp 1 Jul 2006 20:44:10 -0000 1.7
+++ server/edit_text_character_def.cpp 8 Aug 2006 09:50:54 -0000 1.8
@@ -84,6 +84,7 @@
delete [] str;
}
+ IF_VERBOSE_PARSE (
log_parse("edit_text_char:\n"
" default varname = %s\n"
" text = ``%s''\n",
@@ -93,6 +94,7 @@
" text_height: %d\n",
m_font_id,
m_text_height);
+ );
}
const font*
Index: server/font.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/font.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- server/font.cpp 6 Aug 2006 02:00:54 -0000 1.18
+++ server/font.cpp 8 Aug 2006 09:50:54 -0000 1.19
@@ -121,7 +121,9 @@
// Read a DefineFont tag
void font::readDefineFont(stream* in, movie_definition* m)
{
+ IF_VERBOSE_PARSE (
log_parse("reading DefineFont");
+ );
int table_base = in->get_position();
@@ -130,12 +132,19 @@
// offset table.
std::vector<int> offsets;
offsets.push_back(in->read_u16());
+
+ IF_VERBOSE_PARSE (
log_parse("offset[0] = %d", offsets[0]);
+ );
+
int count = offsets[0] >> 1;
for (int i = 1; i < count; i++)
{
offsets.push_back(in->read_u16());
+
+ IF_VERBOSE_PARSE (
log_parse("offset[%d] = %d", i, offsets[i]);
+ );
}
m_glyphs.resize(count);
@@ -162,7 +171,9 @@
// Read a DefineFont2 tag
void font::readDefineFont2(stream* in, movie_definition* m)
{
+ IF_VERBOSE_PARSE (
log_parse("reading DefineFont2");
+ );
bool has_layout = (in->read_uint(1) != 0);
m_shift_jis_chars = (in->read_uint(1) != 0);
@@ -194,7 +205,11 @@
for (unsigned int i = 0; i < glyph_count; i++)
{
uint32_t off = in->read_u32();
+
+ IF_VERBOSE_PARSE (
log_parse("Glyph %d at offset %u", i, off);
+ );
+
offsets.push_back(off);
}
font_code_offset = in->read_u32();
@@ -205,7 +220,11 @@
for (unsigned int i = 0; i < glyph_count; i++)
{
uint16_t off = in->read_u16();
+
+ IF_VERBOSE_PARSE (
log_parse("Glyph %d at offset %u", i, off);
+ );
+
offsets.push_back(off);
}
font_code_offset = in->read_u16();
@@ -303,7 +322,7 @@
// later using the character pair as the key.
if ( ! m_kerning_pairs.insert(std::make_pair(k, adjustment)).second )
{
- log_parse("ERROR: Repeated kerning pair found - ignoring\n");
+ log_warning("Repeated kerning pair found - ignoring\n");
}
}
@@ -336,7 +355,9 @@
// Read the table that maps from glyph indices to character
// codes.
{
+ IF_VERBOSE_PARSE (
log_parse("reading code table at offset %d",
in->get_position());
+ );
assert(m_code_table.empty());
Index: server/movie_def_impl.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_def_impl.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- server/movie_def_impl.cpp 7 Aug 2006 20:43:38 -0000 1.18
+++ server/movie_def_impl.cpp 8 Aug 2006 09:50:54 -0000 1.19
@@ -345,7 +345,10 @@
}
bool compressed = (header & 255) == 'C';
- log_parse("version = %d, file_length = %d\n", m_version, m_file_length);
+ IF_VERBOSE_PARSE(
+ log_parse("version = %d, file_length = %d\n",
+ m_version, m_file_length);
+ );
tu_file* original_in = NULL;
if (compressed)
@@ -356,7 +359,10 @@
return false;
#endif
+ IF_VERBOSE_PARSE(
log_parse("file is compressed.\n");
+ );
+
original_in = in;
// Uncompress the input as we read it.
@@ -383,11 +389,11 @@
m_playlist.resize(m_frame_count);
m_init_action_list.resize(m_frame_count);
- if (dbglogfile.getParserDump()) {
+ IF_VERBOSE_PARSE(
m_frame_size.print();
- }
log_parse("frame rate = %f, frames = %d\n",
m_frame_rate, m_frame_count);
+ );
#if 0
size_t startup_frames = m_frame_count;
@@ -475,7 +481,11 @@
if (tag_type == SWF::SHOWFRAME)
{
// show frame tag -- advance to the next frame.
+
+ IF_VERBOSE_PARSE(
log_parse(" show_frame\n");
+ );
+
++m_loading_frame;
#if DEBUG_FRAMES_LOAD
log_msg("Loaded frame %u/%u",
@@ -491,10 +501,11 @@
else
{
// no tag loader for this tag type.
- log_parse("*** no tag loader for type %d\n", tag_type);
- if (dbglogfile.getParserDump()) {
+ IF_VERBOSE_PARSE(
+ log_parse("*** no tag loader for type %d\n",
+ tag_type);
dump_tag_bytes(&str);
- }
+ );
}
str.close_tag();
Index: server/shape_character_def.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/shape_character_def.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- server/shape_character_def.cpp 6 Aug 2006 02:00:54 -0000 1.5
+++ server/shape_character_def.cpp 8 Aug 2006 09:50:54 -0000 1.6
@@ -66,7 +66,9 @@
}
}
+ IF_VERBOSE_PARSE (
log_parse(" read_fill_styles: count = %d\n", fill_style_count);
+ );
// Read the styles.
for (int i = 0; i < fill_style_count; i++) {
@@ -84,14 +86,20 @@
// Get the count.
int line_style_count = in->read_u8();
+ IF_VERBOSE_PARSE
+ (
log_parse(" read_line_styles: count = %d\n", line_style_count);
+ );
// @@ does the 0xFF flag apply to all tag types?
// if (tag_type > 2)
// {
if (line_style_count == 0xFF) {
line_style_count = in->read_u16();
+ IF_VERBOSE_PARSE
+ (
log_parse(" read_line_styles: count2 = %d\n", line_style_count);
+ );
}
// }
@@ -131,7 +139,10 @@
int num_fill_bits = in->read_uint(4);
int num_line_bits = in->read_uint(4);
+ IF_VERBOSE_PARSE
+ (
log_parse(" shape_character_def read: nfillbits = %d, nlinebits = %d",
num_fill_bits, num_line_bits);
+ );
// These are state variables that keep the
// current position & style of the shape
@@ -184,9 +195,11 @@
current_path.m_ax = x;
current_path.m_ay = y;
- if (SHAPE_LOG) {
+ IF_VERBOSE_PARSE
+ (
+ if (SHAPE_LOG)
log_parse(" shape_character read: moveto %4g %4g\n", x, y);
- }
+ );
}
if ((flags & 0x02) && num_fill_bits > 0) {
// fill_style_0_change = 1;
@@ -201,9 +214,12 @@
style += fill_base;
}
current_path.m_fill0 = style;
+ IF_VERBOSE_PARSE
+ (
if (SHAPE_LOG) {
log_parse(" shape_character read: fill0 = %d\n",
current_path.m_fill0);
}
+ );
}
if ((flags & 0x04) && num_fill_bits > 0) {
@@ -219,9 +235,12 @@
style += fill_base;
}
current_path.m_fill1 = style;
- if (SHAPE_LOG)
+ IF_VERBOSE_PARSE (
+ if (SHAPE_LOG) {
log_parse(" shape_character read: fill1 = %d\n",
current_path.m_fill1);
}
+ );
+ }
if ((flags & 0x08) && num_line_bits > 0) {
// line_style_change = 1;
if (! current_path.is_empty()) {
@@ -235,16 +254,22 @@
style += line_base;
}
current_path.m_line = style;
+ IF_VERBOSE_PARSE (
if (SHAPE_LOG)
+ {
log_parse(" shape_character_read: line = %d\n",
current_path.m_line);
}
+ );
+ }
if (flags & 0x10) {
if (tag_type == 2) {
tag_type+=20;
}
assert(tag_type >= 22);
+ IF_VERBOSE_PARSE (
log_parse(" shape_character read: more fill styles\n");
+ );
// Store the current path if any.
if (! current_path.is_empty()) {
@@ -280,8 +305,12 @@
float ax = cx + in->read_sint(num_bits);
float ay = cy + in->read_sint(num_bits);
+ IF_VERBOSE_PARSE (
if (SHAPE_LOG)
+ {
log_parse(" shape_character read: curved edge = %4g %4g
- %4g %4g - %4g %4g\n", x, y, cx, cy, ax, ay);
+ }
+ );
current_path.m_edges.push_back(edge(cx, cy, ax, ay));
@@ -307,8 +336,12 @@
}
}
+ IF_VERBOSE_PARSE (
if (SHAPE_LOG)
+ {
log_parse(" shape_character_read: straight edge = %4g %4g
- %4g %4g\n", x, y, x + dx, y + dy);
+ }
+ );
current_path.m_edges.push_back(edge(x + dx, y + dy, x + dx, y +
dy));
Index: server/sprite_definition.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/sprite_definition.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- server/sprite_definition.cpp 6 Aug 2006 02:00:54 -0000 1.11
+++ server/sprite_definition.cpp 8 Aug 2006 09:50:54 -0000 1.12
@@ -98,7 +98,9 @@
// need a playlist for each frame
m_playlist.resize(m_frame_count);
+ IF_VERBOSE_PARSE (
log_parse(" frames = %d\n", m_frame_count);
+ );
m_loading_frame = 0;
@@ -117,7 +119,9 @@
if (tag_type == SWF::SHOWFRAME)
{
// show frame tag -- advance to the next frame.
+ IF_VERBOSE_PARSE (
log_parse(" show_frame (sprite)\n");
+ );
m_loading_frame++;
}
else if (_tag_loaders.get(tag_type, &lf))
@@ -129,14 +133,16 @@
else
{
// no tag loader for this tag type.
- log_parse("*** no tag loader for type %d\n",
+ log_error("*** no tag loader for type %d\n",
tag_type);
}
in->close_tag();
}
+ IF_VERBOSE_PARSE (
log_parse(" -- sprite END --\n");
+ );
}
/*virtual*/
Index: server/stream.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/stream.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- server/stream.cpp 7 Jun 2006 03:03:21 -0000 1.6
+++ server/stream.cpp 8 Aug 2006 09:50:54 -0000 1.7
@@ -230,7 +230,9 @@
tag_length = m_input->read_le32();
}
+ IF_VERBOSE_PARSE (
log_parse("---------------tag type = %d, tag length = %d\n",
tag_type, tag_length);
+ );
// Remember where the end of the tag is, so we can
// fast-forward past it when we're done reading it.
Index: server/styles.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/styles.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- server/styles.cpp 19 Jun 2006 01:11:09 -0000 1.13
+++ server/styles.cpp 8 Aug 2006 09:50:54 -0000 1.14
@@ -59,7 +59,10 @@
{
m_type = in->read_u8();
+ IF_VERBOSE_PARSE
+ (
log_parse(" fill_style read type = 0x%X\n", m_type);
+ );
if (m_type == SWF::FILL_SOLID)
{
@@ -76,8 +79,11 @@
m_color.read_rgb(in);
}
+ IF_VERBOSE_PARSE
+ (
log_parse(" color: ");
m_color.print();
+ );
}
else if (m_type == SWF::FILL_LINEAR_GRADIENT
|| m_type == SWF::FILL_RADIAL_GRADIENT)
@@ -118,7 +124,10 @@
m_gradients[i].read(in, tag_type);
}
+ IF_VERBOSE_PARSE
+ (
log_parse(" gradients: num_gradients = %d\n", num_gradients);
+ );
// @@ hack.
if (num_gradients > 0) {
@@ -145,7 +154,10 @@
// 0x43: clipped bitmap fill with hard edges
int bitmap_char_id = in->read_u16();
+ IF_VERBOSE_PARSE
+ (
log_parse(" bitmap_char = %d\n", bitmap_char_id);
+ );
// Look up the bitmap character.
m_bitmap_character = md->get_bitmap_character(bitmap_char_id);
Index: server/swf/tag_loaders.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf/tag_loaders.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- server/swf/tag_loaders.cpp 7 Aug 2006 18:27:34 -0000 1.22
+++ server/swf/tag_loaders.cpp 8 Aug 2006 09:50:54 -0000 1.23
@@ -161,8 +161,11 @@
{
m_color.read_rgb(in);
+ IF_VERBOSE_PARSE
+ (
log_parse(" set_background_color: (%d %d %d)\n",
m_color.m_r, m_color.m_g, m_color.m_b);
+ );
}
};
@@ -245,7 +248,10 @@
uint16_t character_id = in->read_u16();
+ IF_VERBOSE_PARSE
+ (
log_parse(" define_bits_jpeg2_loader: charid = %d pos = 0x%x\n",
character_id, in->get_position());
+ );
//
// Read the image data.
@@ -340,7 +346,10 @@
uint16_t character_id = in->read_u16();
+ IF_VERBOSE_PARSE
+ (
log_parse(" define_bits_jpeg3_loader: charid = %d pos = 0x%x\n",
character_id, in->get_position());
+ );
uint32_t jpeg_size = in->read_u32();
uint32_t alpha_position = in->get_position() + jpeg_size;
@@ -404,12 +413,15 @@
uint16_t width = in->read_u16();
uint16_t height = in->read_u16();
+ IF_VERBOSE_PARSE
+ (
log_parse(" defbitslossless2: tag = %d, id = %d, fmt = %d, w = %d, h =
%d\n",
tag,
character_id,
bitmap_format,
width,
height);
+ );
bitmap_info* bi = NULL;
if (m->get_create_bitmaps() == DO_LOAD_BITMAPS)
@@ -646,7 +658,7 @@
void
fixme_loader(stream* /*in*/, tag_type tag, movie_definition* /*m*/)
{
- log_parse(" FIXME: tagtype = %d\n", tag);
+ log_error(" FIXME: tagtype = %d\n", tag);
}
void define_shape_loader(stream* in, tag_type tag, movie_definition* m)
@@ -656,12 +668,15 @@
|| tag == SWF::DEFINESHAPE3);
uint16_t character_id = in->read_u16();
- log_parse(" shape_loader: id = %d\n", character_id);
shape_character_def* ch = new shape_character_def;
ch->read(in, tag, true, m);
+ IF_VERBOSE_PARSE
+ (
+ log_parse(" shape_loader: id = %d\n", character_id);
log_parse(" bound rect:"); ch->get_bound().print();
+ );
m->add_character(character_id, ch);
}
@@ -670,7 +685,12 @@
{
assert(tag == SWF::DEFINEMORPHSHAPE); // 46
uint16_t character_id = in->read_u16();
+
+ IF_VERBOSE_PARSE
+ (
log_parse(" shape_morph_loader: id = %d\n", character_id);
+ );
+
morph2_character_def* morph = new morph2_character_def;
morph->read(in, tag, true, m);
m->add_character(character_id, morph);
@@ -782,17 +802,25 @@
m_depth = in->read_u16();
m_matrix.read(in);
+ IF_VERBOSE_PARSE
+ (
log_parse(" char_id = %d\n"
" depth = %d\n"
" mat = \n",
m_character_id,
m_depth);
m_matrix.print();
+ );
if (in->get_position() < in->get_tag_end_position())
{
m_color_transform.read_rgb(in);
+
+ IF_VERBOSE_PARSE
+ (
log_parse(" cxform:\n"); m_color_transform.print();
+ );
+
}
}
else
@@ -811,36 +839,58 @@
bool flag_move = in->read_uint(1) ? true : false;
m_depth = in->read_u16();
+
+ IF_VERBOSE_PARSE
+ (
log_parse(" depth = %d\n", m_depth);
+ );
if (has_char) {
m_character_id = in->read_u16();
+ IF_VERBOSE_PARSE
+ (
log_parse(" char id = %d\n", m_character_id);
+ );
}
if (has_matrix) {
m_has_matrix = true;
m_matrix.read(in);
+ IF_VERBOSE_PARSE
+ (
log_parse(" mat:\n"); m_matrix.print();
+ );
}
if (has_cxform) {
m_has_cxform = true;
m_color_transform.read_rgba(in);
+ IF_VERBOSE_PARSE
+ (
log_parse(" cxform:\n"); m_color_transform.print();
+ );
}
if (has_ratio) {
m_ratio = (float)in->read_u16() / (float)65535;
+ IF_VERBOSE_PARSE
+ (
log_parse(" ratio: %f\n", m_ratio);
+ );
}
if (has_name) {
m_name = in->read_string();
+ IF_VERBOSE_PARSE
+ (
log_parse(" name = %s\n", m_name ? m_name : "<null>");
+ );
}
if (has_clip_bracket) {
m_clip_depth = in->read_u16();
+ IF_VERBOSE_PARSE
+ (
log_parse(" clip_depth = %d\n", m_clip_depth);
+ );
}
if (has_actions)
{
@@ -852,7 +902,10 @@
uint32_t all_flags = (movie_version >= 6) ?
in->read_u32() : in->read_u16();
UNUSED(all_flags);
+ IF_VERBOSE_PARSE
+ (
log_parse(" actions: flags = 0x%X\n", all_flags);
+ );
// Read swf_events.
for (;;)
@@ -1084,7 +1137,10 @@
{
assert(tag == SWF::PLACEOBJECT || tag == SWF::PLACEOBJECT2);
+ IF_VERBOSE_PARSE
+ (
log_parse(" place_object_2\n");
+ );
place_object_2* ch = new place_object_2;
ch->read(in, tag, m->get_version());
@@ -1100,7 +1156,10 @@
int character_id = in->read_u16();
+ IF_VERBOSE_PARSE
+ (
log_parse(" sprite\n char id = %d\n", character_id);
+ );
/// A DEFINESPRITE tag as part of a DEFINESPRITE
/// would be a malformed SWF
@@ -1189,7 +1248,10 @@
remove_object_2* t = new remove_object_2;
t->read(in, tag);
+ IF_VERBOSE_PARSE
+ (
log_parse(" remove_object_2(%d)\n", t->m_depth);
+ );
m->add_execute_tag(t);
}
@@ -1214,7 +1276,10 @@
int character_id = in->read_u16();
+ IF_VERBOSE_PARSE
+ (
log_parse(" button character loader: char_id = %d\n", character_id);
+ );
button_character_definition* ch = new button_character_definition;
ch->read(in, tag, m);
@@ -1235,7 +1300,10 @@
int count = in->read_u16();
+ IF_VERBOSE_PARSE
+ (
log_parse(" export: count = %d\n", count);
+ );
// Read the exports.
for (int i = 0; i < count; i++)
@@ -1281,7 +1349,10 @@
char* source_url = in->read_string();
int count = in->read_u16();
+ IF_VERBOSE_PARSE
+ (
log_parse(" import: source_url = %s, count = %d\n", source_url, count);
+ );
// Try to load the source movie into the movie library.
movie_definition* source_movie = NULL;
@@ -1307,7 +1378,10 @@
{
uint16_t id = in->read_u16();
char* symbol_name = in->read_string();
+ IF_VERBOSE_PARSE
+ (
log_parse(" import: id = %d, name = %s\n", id, symbol_name);
+ )
if (s_no_recurse_while_loading)
{
@@ -1356,7 +1430,10 @@
uint16_t character_id = in->read_u16();
edit_text_character_def* ch = new edit_text_character_def(m);
+ IF_VERBOSE_PARSE
+ (
log_parse("edit_text_char, id = %d\n", character_id);
+ );
ch->read(in, tag, m);
m->add_character(character_id, ch);
@@ -1371,7 +1448,10 @@
uint16_t character_id = in->read_u16();
text_character_def* ch = new text_character_def(m);
+ IF_VERBOSE_PARSE
+ (
log_parse("text_character, id = %d\n", character_id);
+ );
ch->read(in, tag, m);
// IF_VERBOSE_PARSE(print some stuff);
@@ -1389,9 +1469,12 @@
void
do_action_loader(stream* in, tag_type tag, movie_definition* m)
{
+ IF_VERBOSE_PARSE
+ (
log_parse("tag %d: do_action_loader", tag);
- log_action("-- actions in frame %d",
+ log_parse("-- actions in frame %d",
m->get_loading_frame());
+ );
assert(in);
assert(tag == SWF::DOACTION); // 12
@@ -1408,11 +1491,15 @@
{
assert(tag == SWF::INITACTION); // 59
+
+ IF_VERBOSE_PARSE
+ (
int sprite_character_id = in->read_u16();
log_parse(" tag %d: do_init_action_loader", tag);
- log_action(" -- init actions for sprite %d",
+ log_parse(" -- init actions for sprite %d",
sprite_character_id);
+ );
do_action* da = new do_action;
da->read(in);
@@ -1442,8 +1529,13 @@
static int s_sample_rate_table[] = { 5512, 11025, 22050, 44100 };
- log_parse("define sound: ch=%d, format=%d, rate=%d, 16=%d, stereo=%d,
ct=%d\n",
- character_id, int(format), sample_rate, int(sample_16bit),
int(stereo), sample_count);
+ IF_VERBOSE_PARSE
+ (
+ log_parse("define sound: ch=%d, format=%d, "
+ "rate=%d, 16=%d, stereo=%d, ct=%d\n",
+ character_id, int(format), sample_rate,
+ int(sample_16bit), int(stereo), sample_count);
+ );
// If we have a sound_handler, ask it to init this sound.
@@ -1525,8 +1617,11 @@
start_sound_tag* sst = new start_sound_tag();
sst->read(in, tag, m, sam);
+ IF_VERBOSE_PARSE
+ (
log_parse("start_sound tag: id=%d, stop = %d, loop ct = %d\n",
sound_id, int(sst->m_stop_playback),
sst->m_loop_count);
+ );
}
else
{
@@ -1574,8 +1669,11 @@
static int s_sample_rate_table[] = { 5512, 11025, 22050, 44100 };
+ IF_VERBOSE_PARSE
+ (
log_parse("sound stream head: format=%d, rate=%d, 16=%d, stereo=%d,
ct=%d\n",
int(format), sample_rate, int(sample_16bit), int(stereo),
sample_count);
+ );
// Ask sound_handler it to init this sound.
int data_bytes = 0;
- [Gnash-commit] gnash ChangeLog libbase/log.cpp libbase/log.h s...,
Sandro Santilli <=