Added Yefei He's RoadRecords to the flt loader, these records will be

ignored by the loader, but will allow the loader to skip over them and
continue reading the rest of the file correctly.
This commit is contained in:
Robert Osfield
2002-07-10 09:32:44 +00:00
parent 44d0bb05e7
commit 46af97727a
5 changed files with 601 additions and 12 deletions

View File

@@ -17,6 +17,7 @@ CXXFILES =\
Record.cpp\
FaceRecord.cpp\
RecordVisitor.cpp\
RoadRecords.cpp\
GeoSetBuilder.cpp\
Registry.cpp\
FltFile.cpp\

View File

@@ -0,0 +1,61 @@
// RoadRecords.cpp
#include "flt.h"
#include "Registry.h"
#include "RoadRecords.h"
using namespace flt;
////////////////////////////////////////////////////////////////////
//
// RoadSegmentRecord
//
////////////////////////////////////////////////////////////////////
RegisterRecordProxy<RoadSegmentRecord> g_RoadSegmentProxy;
RoadSegmentRecord::RoadSegmentRecord()
{
}
// virtual
RoadSegmentRecord::~RoadSegmentRecord()
{
}
////////////////////////////////////////////////////////////////////
//
// RoadConstructionRecord
//
////////////////////////////////////////////////////////////////////
RegisterRecordProxy<RoadConstructionRecord> g_RoadConstructionProxy;
RoadConstructionRecord::RoadConstructionRecord()
{
}
// virtual
RoadConstructionRecord::~RoadConstructionRecord()
{
}
////////////////////////////////////////////////////////////////////
//
// RoadPathRecord
//
////////////////////////////////////////////////////////////////////
RegisterRecordProxy<RoadPathRecord> g_RoadPathProxy;
RoadPathRecord::RoadPathRecord()
{
}
// virtual
RoadPathRecord::~RoadPathRecord()
{
}

View File

@@ -0,0 +1,98 @@
// RoadRecords.h
#ifndef __FLT_ROAD_RECORDS_H
#define __FLT_ROAD_RECORDS_H
#include "opcodes.h"
#include "Record.h"
#include "RecordVisitor.h"
namespace flt {
////////////////////////////////////////////////////////////////////
//
// RoadSegmentRecord
//
////////////////////////////////////////////////////////////////////
class RoadSegmentRecord : public PrimNodeRecord
{
public:
RoadSegmentRecord();
virtual ~RoadSegmentRecord();
virtual Record* clone() const { return new RoadSegmentRecord(); }
virtual const char* className() const { return "RoadSegmentRecord"; }
virtual int classOpcode() const { return ROAD_SEGMENT_OP; }
virtual void accept(RecordVisitor& rv) { rv.apply(*this); }
// virtual void traverse(RecordVisitor& rv);
protected:
};
////////////////////////////////////////////////////////////////////
//
// RoadConstructionRecord
//
////////////////////////////////////////////////////////////////////
class RoadConstructionRecord : public PrimNodeRecord
{
public:
RoadConstructionRecord();
virtual ~RoadConstructionRecord();
virtual Record* clone() const { return new RoadConstructionRecord(); }
virtual const char* className() const { return "RoadConstructionRecord"; }
virtual int classOpcode() const { return ROAD_CONSTRUCTION_OP; }
virtual void accept(RecordVisitor& rv) { rv.apply(*this); }
// virtual void traverse(RecordVisitor& rv);
protected:
};
////////////////////////////////////////////////////////////////////
//
// RoadPathRecord
//
////////////////////////////////////////////////////////////////////
class RoadPathRecord : public PrimNodeRecord
{
public:
RoadPathRecord();
virtual ~RoadPathRecord();
virtual Record* clone() const { return new RoadPathRecord(); }
virtual const char* className() const { return "RoadPathRecord"; }
virtual int classOpcode() const { return ROAD_PATH_OP; }
virtual void accept(RecordVisitor& rv) { rv.apply(*this); }
// virtual void traverse(RecordVisitor& rv);
protected:
};
// Note: RoadZoneRecord is an ancillary record, so it is left undefined to
// be treated as an unknown (ancillary) record, just like the
// eyepoint trackplane record or the translate, scale, and rotate
// records, whose contents are not interpreted.
// The above three types of records are basically treated like
// unknown records except that they are primary records and can have
// substructures under them.
}; // end namespace flt
#endif // __FLT_ROAD_RECORDS_H

View File

@@ -56,9 +56,11 @@ Ignore 76-82
#define PUT_TRANSFORM_OP 82
*/
#define EYEPOINT_TRACKPLANE_OP 83
#define ROAD_SEGMENT_OP 87
#define ROAD_ZONE_OP 88
#define MORPH_VERTEX_LIST_OP 89
#define LINKAGE_PALETTE_OP 90
#define ROAD_PATH_OP 92
#define SOUND_PALETTE_OP 93
#define GENERAL_MATRIX_OP 94
#define SWITCH_OP 96
@@ -72,8 +74,11 @@ Ignore 76-82
#define LIGHT_POINT_OP 111
#define TEXTURE_MAPPING_PALETTE_OP 112
#define MATERIAL_PALETTE_OP 113
#define COLOR_NAME_PALETTE_OP 114
#define CAT_OP 115
#define CAT_DATA_OP 116
#define RESERVED_OP 124
#define ROAD_CONSTRUCTION_OP 127
#endif // __FLT_OPCODE_H