Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

pandatool/src/lwo/test_lwo.cxx

Go to the documentation of this file.
00001 // Filename: test_lwo.cxx
00002 // Created by:  drose (24Apr01)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #include "lwoInputFile.h"
00020 #include "lwoChunk.h"
00021 #include "config_lwo.h"
00022 
00023 int
00024 main(int argc, char *argv[]) {
00025   init_liblwo();
00026   if (argc != 2) {
00027     nout << "test_lwo file.lwo\n";
00028     exit(1);
00029   }
00030 
00031   LwoInputFile in;
00032   if (!in.open_read(argv[1])) {
00033     nout << "Unable to open " << argv[1] << "\n";
00034     exit(1);
00035   }
00036 
00037   PT(IffChunk) chunk = in.get_chunk();
00038   while (chunk != (IffChunk *)NULL) {
00039     nout << "Got chunk type " << chunk->get_type() << ":\n";
00040     chunk->write(nout, 2);
00041     chunk = in.get_chunk();
00042   }
00043 
00044   nout << "EOF = " << in.is_eof() << "\n";
00045 
00046   return (0);
00047 }

Generated on Fri May 2 03:21:07 2003 for Panda-Tool by doxygen1.3