Пример #1
0
void
lib3ds_chunk_unknown(uint16_t chunk, Lib3dsIo *io)
{
    if (io->log_func)
    {
        lib3ds_io_log(io, LIB3DS_LOG_WARN, "Unknown Chunk: %s (0x%X)", lib3ds_chunk_name(chunk), chunk);
    }
}
Пример #2
0
/*!
 * \ingroup chunk
 */
void
lib3ds_chunk_unknown(Lib3dsWord chunk)
{
  if (enable_unknown) {
    printf("%s***WARNING*** Unknown Chunk: %s (0x%X)\n",
      lib3ds_chunk_level,
      lib3ds_chunk_name(chunk),
      chunk
    );
  }
}
Пример #3
0
static void
lib3ds_chunk_debug_dump(Lib3dsChunk *c)
{
  if (enable_dump) {
    printf("%s%s (0x%X) size=%lu\n",
      lib3ds_chunk_level,
      lib3ds_chunk_name(c->chunk),
      c->chunk,
      c->size
    );
  }
}
Пример #4
0
uint16_t
lib3ds_chunk_read_next(Lib3dsChunk *c, Lib3dsIo *io) {
    Lib3dsChunk d;

    if (c->cur >= c->end) {
        assert(c->cur == c->end);
        return 0;
    }

    lib3ds_io_seek(io, (long)c->cur, LIB3DS_SEEK_SET);
    d.chunk = lib3ds_io_read_word(io);
    d.size = lib3ds_io_read_dword(io);
    c->cur += d.size;

    if (io->log_func) {
        lib3ds_io_log(io, LIB3DS_LOG_INFO, "%s (0x%X) size=%lu", lib3ds_chunk_name(d.chunk), d.chunk, d.size);
    }

    return d.chunk;
}