Tools: Added an experimental tool (still WIP) to replace the current mmaps generator
This commit is contained in:
1 parent
bb6ce2b2c9
commit
50f833a008
42 files changed
+2441
-1
No files matched your search
@@ -0,0 +1,21 @@
|
||||
#include "ObjectDataHandler.h"
|
||||
#include "Chunk.h"
|
||||
#include "ADT.h"
|
||||
#include "ChunkedData.h"
|
||||
|
||||
void ObjectDataHandler::ProcessMapChunk( MapChunk* chunk )
|
||||
{
|
||||
if (!Source->HasObjectData)
|
||||
return;
|
||||
// fuck it blizzard, why is this crap necessary?
|
||||
int32 firstIndex = Source->ObjectData->GetFirstIndex("MCNK");
|
||||
if (firstIndex == -1)
|
||||
return;
|
||||
if (firstIndex + chunk->Index > Source->ObjectData->Chunks.size())
|
||||
return;
|
||||
Chunk* ourChunk = Source->ObjectData->Chunks[firstIndex + chunk->Index];
|
||||
if (ourChunk->Length == 0)
|
||||
return;
|
||||
ChunkedData* subChunks = new ChunkedData(ourChunk->GetStream(), ourChunk->Length, 2);
|
||||
ProcessInternal(subChunks);
|
||||
}
|
||||
Reference in new issue
Block a user