diff options
author | admin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-10-31 19:49:07 +0100 |
---|---|---|
committer | admin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-10-31 19:49:07 +0100 |
commit | 1979404815cb3f302683383970d3688da4903778 (patch) | |
tree | b9648654e986ba7bc1779a66e234caf8924e57c5 /converter | |
parent | denotch map convert successfully created a pak file from an mcr file. Still need to check if it's valid. (diff) | |
download | cuberite-1979404815cb3f302683383970d3688da4903778.tar cuberite-1979404815cb3f302683383970d3688da4903778.tar.gz cuberite-1979404815cb3f302683383970d3688da4903778.tar.bz2 cuberite-1979404815cb3f302683383970d3688da4903778.tar.lz cuberite-1979404815cb3f302683383970d3688da4903778.tar.xz cuberite-1979404815cb3f302683383970d3688da4903778.tar.zst cuberite-1979404815cb3f302683383970d3688da4903778.zip |
Diffstat (limited to 'converter')
-rw-r--r-- | converter/cConvert.cpp | 15 | ||||
-rwxr-xr-x | converter/denotch | bin | 216850 -> 216850 bytes |
2 files changed, 8 insertions, 7 deletions
diff --git a/converter/cConvert.cpp b/converter/cConvert.cpp index e05599a28..a608d6a61 100644 --- a/converter/cConvert.cpp +++ b/converter/cConvert.cpp @@ -39,11 +39,11 @@ int main () { char* t_FakeHeader; t_FakeHeader = new char[1*1024*1024]; //1MB Temp FakeHeader array - int t_FakeHeaderSz = 0; //Size of data in array + int t_FakeHeaderSz = -1; //Size of data in array char* t_CompChunk; t_CompChunk = new char[5*1024*1024]; //5MB Temp Compressed Chunk Data array - int t_CompChunkSz = 0; //Size of data in array + int t_CompChunkSz = -1; //Size of data in array char PakVersion = 1; char ChunkVersion = 1; @@ -172,8 +172,8 @@ int main () { for(unsigned int i = 0; i < sizeof(int); i++) { - t_FakeHeader[t_FakeHeaderSz+1] = xtemppos[i]; - t_FakeHeaderSz ++; + t_FakeHeader[t_FakeHeaderSz+1] = xtemppos[i]; + t_FakeHeaderSz ++; } for(unsigned int i = 0; i < sizeof(int); i++) { t_FakeHeader[t_FakeHeaderSz+1] = ztemppos[i]; @@ -222,7 +222,7 @@ int main () { } - //printf("Coord(X,Z): %i,%i\n", NBTData->GetInteger("xPos"), NBTData->GetInteger("zPos") ); + printf("Coord(X,Z):ChunkSize: %i,%i:%i\n", NBTData->GetInteger("xPos"), NBTData->GetInteger("zPos"), (int)CompressedSize ); NBTData->CloseCompound();// Close the compounds after you're done NBTData->CloseCompound(); @@ -245,8 +245,9 @@ int main () { } fwrite( &PakVersion, sizeof(PakVersion), 1, wf ); fwrite( &ChunkVersion, sizeof(ChunkVersion), 1, wf ); - fwrite( t_FakeHeader, t_FakeHeaderSz, 1, wf ); - fwrite( t_CompChunk, t_CompChunkSz, 1, wf ); + fwrite( &NumChunks, sizeof(NumChunks), 1, wf ); + fwrite( t_FakeHeader, t_FakeHeaderSz+1, 1, wf ); + fwrite( t_CompChunk, t_CompChunkSz+1, 1, wf ); delete [] t_FakeHeader; delete [] t_CompChunk; diff --git a/converter/denotch b/converter/denotch Binary files differindex 42444793e..7637b9d6c 100755 --- a/converter/denotch +++ b/converter/denotch |