|
@@ -134,15 +134,16 @@ public:
|
|
if(it != history.back().second.end()) {
|
|
if(it != history.back().second.end()) {
|
|
++history.back().second[s];
|
|
++history.back().second[s];
|
|
}
|
|
}
|
|
- else history.back().second[s] = 1;
|
|
|
|
|
|
+ else history.back().second[s] = 0;
|
|
|
|
|
|
history.push_back(HistoryEntry(s,PerChunkCounter()));
|
|
history.push_back(HistoryEntry(s,PerChunkCounter()));
|
|
-
|
|
|
|
|
|
+ debug_trace.push_back("PUSH " + s);
|
|
}
|
|
}
|
|
|
|
|
|
/* leave current scope */
|
|
/* leave current scope */
|
|
void pop_elem() {
|
|
void pop_elem() {
|
|
ai_assert(history.size());
|
|
ai_assert(history.size());
|
|
|
|
+ debug_trace.push_back("POP "+ history.back().first);
|
|
history.pop_back();
|
|
history.pop_back();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -243,18 +244,22 @@ private:
|
|
const char* last = history.back().first.c_str();
|
|
const char* last = history.back().first.c_str();
|
|
std::string pad;
|
|
std::string pad;
|
|
|
|
|
|
- for(ChunkHistory::reverse_iterator rev = ++history.rbegin(),
|
|
|
|
- end = history.rend(); rev < end; ++rev, pad += " ")
|
|
|
|
|
|
+ for(ChunkHistory::reverse_iterator rev = history.rbegin(),
|
|
|
|
+ end = history.rend(); rev != end; ++rev, pad += " ")
|
|
{
|
|
{
|
|
- ss << pad << (*rev).first << "(Index: " << (*rev).second[last]-1 << ")" << std::endl;
|
|
|
|
|
|
+ ss << pad << (*rev).first << "(Index: " << (*rev).second[last] << ")" << std::endl;
|
|
last = (*rev).first.c_str();
|
|
last = (*rev).first.c_str();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ ss << std::endl << "Debug trace: "<< std::endl;
|
|
|
|
+ for (std::vector<std::string>::const_iterator it = debug_trace.begin(); it != debug_trace.end(); ++it) {
|
|
|
|
+ ss << *it << std::endl;
|
|
|
|
+ }
|
|
return ss.str();
|
|
return ss.str();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- /* read from both streams simult.*/
|
|
|
|
|
|
+ /* read from both streams at the same time */
|
|
template <typename T> void read(T& filla,T& fille) {
|
|
template <typename T> void read(T& filla,T& fille) {
|
|
if(1 != fread(&filla,sizeof(T),1,actual)) {
|
|
if(1 != fread(&filla,sizeof(T),1,actual)) {
|
|
EOFActual();
|
|
EOFActual();
|
|
@@ -291,6 +296,8 @@ private:
|
|
typedef std::deque<HistoryEntry> ChunkHistory;
|
|
typedef std::deque<HistoryEntry> ChunkHistory;
|
|
ChunkHistory history;
|
|
ChunkHistory history;
|
|
|
|
|
|
|
|
+ std::vector<std::string> debug_trace;
|
|
|
|
+
|
|
typedef std::stack<std::pair<uint32_t,uint32_t> > LengthStack;
|
|
typedef std::stack<std::pair<uint32_t,uint32_t> > LengthStack;
|
|
LengthStack lengths;
|
|
LengthStack lengths;
|
|
|
|
|
|
@@ -739,7 +746,7 @@ void CompareOnTheFlyLight(comparer_context& comp) {
|
|
const aiLightSourceType type = static_cast<aiLightSourceType>(
|
|
const aiLightSourceType type = static_cast<aiLightSourceType>(
|
|
comp.cmp<uint32_t>("mType"));
|
|
comp.cmp<uint32_t>("mType"));
|
|
|
|
|
|
- if(type==aiLightSource_DIRECTIONAL) {
|
|
|
|
|
|
+ if(type!=aiLightSource_DIRECTIONAL) {
|
|
comp.cmp<float>("mAttenuationConstant");
|
|
comp.cmp<float>("mAttenuationConstant");
|
|
comp.cmp<float>("mAttenuationLinear");
|
|
comp.cmp<float>("mAttenuationLinear");
|
|
comp.cmp<float>("mAttenuationQuadratic");
|
|
comp.cmp<float>("mAttenuationQuadratic");
|