From c9c98ed0570a7a230a111b7430657bc88aef8653 Mon Sep 17 00:00:00 2001 From: cxgeorge <> Date: Mon, 4 Mar 2002 06:22:53 +0000 Subject: [PATCH] use combined srcs --- pandatool/src/xfile/Sources.pp | 21 +++++++++++---------- pandatool/src/xfile/xFileMesh.cxx | 6 +++--- pandatool/src/xfile/xfile_composite1.cxx | 12 ++++++++++++ 3 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 pandatool/src/xfile/xfile_composite1.cxx diff --git a/pandatool/src/xfile/Sources.pp b/pandatool/src/xfile/Sources.pp index c1d93d2331..80ed7df7b5 100644 --- a/pandatool/src/xfile/Sources.pp +++ b/pandatool/src/xfile/Sources.pp @@ -12,16 +12,17 @@ #define WIN_SYS_LIBS \ d3dxof.lib dxguid.lib - + + #define COMBINED_SOURCES $[TARGET]_composite1.cxx + #define SOURCES \ - config_xfile.cxx config_xfile.h \ - xFileFace.cxx xFileFace.h \ - xFileMaker.cxx xFileMaker.h \ - xFileMaterial.cxx xFileMaterial.h \ - xFileMesh.cxx xFileMesh.h \ - xFileNormal.cxx xFileNormal.h \ - xFileTemplates.cxx xFileTemplates.h \ - xFileToEggConverter.cxx xFileToEggConverter.h \ - xFileVertex.cxx xFileVertex.h + config_xfile.h xFileFace.h xFileMaker.h xFileMaterial.h \ + xFileMesh.h xFileNormal.h xFileTemplates.h \ + xFileToEggConverter.h xFileVertex.h + + #define INCLUDED_SOURCES \ + config_xfile.cxx xFileFace.cxx xFileMaker.cxx xFileMaterial.cxx \ + xFileMesh.cxx xFileNormal.cxx xFileTemplates.cxx \ + xFileToEggConverter.cxx xFileVertex.cxx #end ss_lib_target diff --git a/pandatool/src/xfile/xFileMesh.cxx b/pandatool/src/xfile/xFileMesh.cxx index 64046c7c9f..7ec9ec1271 100644 --- a/pandatool/src/xfile/xFileMesh.cxx +++ b/pandatool/src/xfile/xFileMesh.cxx @@ -623,7 +623,7 @@ read_color_data(const Datagram &raw_data) { int num_colors = di.get_int32(); int i; for (i = 0; i < num_colors; i++) { - int vertex_index = di.get_int32(); + unsigned int vertex_index = di.get_int32(); if (vertex_index < 0 || vertex_index >= _vertices.size()) { cerr << "Vertex index out of range in MeshVertexColors.\n"; return false; @@ -687,7 +687,7 @@ read_material_list_data(const Datagram &raw_data) { DatagramIterator di(raw_data); di.get_int32(); /* num_materials */ - int num_faces = di.get_int32(); + unsigned int num_faces = di.get_int32(); if (num_faces > _faces.size()) { cerr << "Too many faces in MaterialList.\n"; @@ -695,7 +695,7 @@ read_material_list_data(const Datagram &raw_data) { } int material_index = -1; - int i = 0; + unsigned int i = 0; while (i < num_faces) { XFileFace *face = _faces[i]; material_index = di.get_int32(); diff --git a/pandatool/src/xfile/xfile_composite1.cxx b/pandatool/src/xfile/xfile_composite1.cxx new file mode 100644 index 0000000000..2b1d8bac57 --- /dev/null +++ b/pandatool/src/xfile/xfile_composite1.cxx @@ -0,0 +1,12 @@ + +#include "config_xfile.cxx" +#include "xFileFace.cxx" +#include "xFileMaker.cxx" +#include "xFileMaterial.cxx" +#include "xFileMesh.cxx" +#include "xFileNormal.cxx" +#include "xFileTemplates.cxx" +#include "xFileToEggConverter.cxx" +#include "xFileVertex.cxx" + +