refactor(Tools): restyle tools with astyle (#3465)
This commit is contained in:
parent
be09e03756
commit
b00a86f6ab
51 changed files with 1004 additions and 936 deletions
|
|
@ -137,7 +137,7 @@ void ExtractGameobjectModels()
|
|||
fwrite(&numVerts, sizeof(uint32), 1, output);
|
||||
uint32 numGroups = 1;
|
||||
fwrite(&numGroups, sizeof(uint32), 1, output);
|
||||
fwrite(Nop, 4 * 3 , 1, output); // rootwmoid, flags, groupid
|
||||
fwrite(Nop, 4 * 3, 1, output); // rootwmoid, flags, groupid
|
||||
fwrite(Nop, sizeof(float), 3 * 2, output);//bbox, only needed for WMO currently
|
||||
fwrite(Nop, 4, 1, output);// liquidflags
|
||||
fwrite("GRP ", 4, 1, output);
|
||||
|
|
@ -171,7 +171,7 @@ void ExtractGameobjectModels()
|
|||
wsize = sizeof(int) + sizeof(float) * 3 * numVerts;
|
||||
fwrite(&wsize, sizeof(int), 1, output);
|
||||
fwrite(&numVerts, sizeof(int), 1, output);
|
||||
float* vertices = new float[numVerts*3];
|
||||
float* vertices = new float[numVerts * 3];
|
||||
|
||||
if (numVerts > 0)
|
||||
{
|
||||
|
|
@ -213,7 +213,7 @@ void ExtractGameobjectModels()
|
|||
fwrite(&model.Header.CountGroups, sizeof(uint32), 1, output);
|
||||
fwrite(&model.Header.WmoId, sizeof(uint32), 1, output);
|
||||
|
||||
const char grp[] = { 'G' , 'R' , 'P', ' ' };
|
||||
const char grp[] = { 'G', 'R', 'P', ' ' };
|
||||
for (std::vector<WorldModelGroup>::iterator itr2 = model.Groups.begin(); itr2 != model.Groups.end(); ++itr2)
|
||||
{
|
||||
const WMOGroupHeader& header = itr2->Header;
|
||||
|
|
@ -227,7 +227,7 @@ void ExtractGameobjectModels()
|
|||
fwrite(grp, sizeof(char), sizeof(grp), output);
|
||||
uint32 k = 0;
|
||||
uint32 mobaBatch = itr2->MOBALength / 12;
|
||||
uint32* MobaEx = new uint32[mobaBatch*4];
|
||||
uint32* MobaEx = new uint32[mobaBatch * 4];
|
||||
|
||||
for(uint32 i = 8; i < itr2->MOBALength; i += 12)
|
||||
MobaEx[k++] = itr2->MOBA[i];
|
||||
|
|
@ -279,7 +279,7 @@ bool HandleArgs(int argc, char** argv, uint32& threads, std::set<uint32>& mapLis
|
|||
mapList.insert(atoi(token));
|
||||
token = strtok(nullptr, ",");
|
||||
}
|
||||
|
||||
|
||||
free(copy);
|
||||
|
||||
printf("Extracting only provided list of maps (%u).\n", uint32(mapList.size()));
|
||||
|
|
@ -437,7 +437,7 @@ int main(int argc, char* argv[])
|
|||
LoadTile(navMesh, buff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
navMeshQuery->init(navMesh, 2048);
|
||||
|
||||
float nearestPt[3];
|
||||
|
|
@ -454,9 +454,9 @@ int main(int argc, char* argv[])
|
|||
int hops;
|
||||
dtPolyRef* hopBuffer = new dtPolyRef[8192];
|
||||
dtStatus status = navMeshQuery->findPath(m_startRef, m_endRef, m_spos, m_epos, &m_filter, hopBuffer, &hops, 8192);
|
||||
|
||||
|
||||
int resultHopCount;
|
||||
float* straightPath = new float[2048*3];
|
||||
float* straightPath = new float[2048 * 3];
|
||||
unsigned char* pathFlags = new unsigned char[2048];
|
||||
dtPolyRef* pathRefs = new dtPolyRef[2048];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue