diff options
author | admin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-10-31 03:56:12 +0100 |
---|---|---|
committer | admin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-10-31 03:56:12 +0100 |
commit | 20d391764c9d6921a92d21f03805ad06a9574540 (patch) | |
tree | a58a4efe4f4ec3e852c358706a4683a3664ed705 | |
parent | More changes to the denotch map converter. Added some tags. Still debugging some parsing issues. (diff) | |
download | cuberite-20d391764c9d6921a92d21f03805ad06a9574540.tar cuberite-20d391764c9d6921a92d21f03805ad06a9574540.tar.gz cuberite-20d391764c9d6921a92d21f03805ad06a9574540.tar.bz2 cuberite-20d391764c9d6921a92d21f03805ad06a9574540.tar.lz cuberite-20d391764c9d6921a92d21f03805ad06a9574540.tar.xz cuberite-20d391764c9d6921a92d21f03805ad06a9574540.tar.zst cuberite-20d391764c9d6921a92d21f03805ad06a9574540.zip |
-rw-r--r-- | converter/cConvert.cpp | 4 | ||||
-rw-r--r-- | converter/cNBTData.cpp | 16 | ||||
-rwxr-xr-x | converter/denotch | bin | 212251 -> 212251 bytes |
3 files changed, 17 insertions, 3 deletions
diff --git a/converter/cConvert.cpp b/converter/cConvert.cpp index b84e93424..0d1d8e1cd 100644 --- a/converter/cConvert.cpp +++ b/converter/cConvert.cpp @@ -74,7 +74,7 @@ int main () { quicksort(toffarr, 0, 1023); //sort the array from smallest to larget offset locations so we only have to read through the file once. for ( short ia = 0; ia < 1024; ia++ ) {//a region file can hold a maximum of 1024 chunks (32*32) - if (ia < 35 ) { //only run chunk # 3 + if (ia < 3500 ) { //only run chunk # 3 if (toffarr[ia] < 8192) { //offsets of less than 8192 are impossible. 0 means there is no chunk in a particular location. if (toffarr[ia] > 0) { cout << "ERROR 2s31 IN COLLECTED CHUNK OFFSETS " << toffarr[ia]; fclose(f); return false; } //values between 0 and 8192 should be impossible. //This file does not contain the max 1024 chunks, skip until we get to the first @@ -130,7 +130,7 @@ int main () { //testing of nbtparser. cNBTData* NBTData = new cNBTData(BlockData, (int)DestSize); NBTData->ParseData(); - //NBTData->PrintData(); + NBTData->PrintData(); NBTData->OpenCompound(""); NBTData->OpenCompound("Level"); // You need to open the right compounds before you can access the data in it diff --git a/converter/cNBTData.cpp b/converter/cNBTData.cpp index ed655430b..0b40f3466 100644 --- a/converter/cNBTData.cpp +++ b/converter/cNBTData.cpp @@ -46,7 +46,7 @@ cNBTData::cNBTData( char* a_Buffer, unsigned int a_BufferSize ) tm = false; //tm to true will print more information for test mode if (m_BufferSize == 82659) { - tm = true; +// tm = true; } m_CurrentCompound = this; @@ -552,12 +552,26 @@ void cNBTData::ParseList( bool a_bNamed ) OpenList( Name ); for(int i = 0; i < Length && m_Index < m_BufferSize; i++) { + + if( (int)TagType == 6 ) { + + cNBTData::ParseDouble( false ); + + } else if( (int)TagType == 5 ) { + cNBTData::ParseFloat( false ); + } else + + if( m_ParseFunctions[ TagType ] ) { (*this.*m_ParseFunctions[ TagType ] )(false); m_Index++; } } + if (tm) { + printf("List Done Name, tag, length: %s, %i, %i\n", Name.c_str(), (int)TagType, Length); + } + CloseList(); } diff --git a/converter/denotch b/converter/denotch Binary files differindex 4874c3c53..a2a1d8dc4 100755 --- a/converter/denotch +++ b/converter/denotch |