Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/MapGenerator.cpp
Show First 20 Lines • Show All 391 Lines • ▼ Show 20 Lines | for (ssize_t y = 0; y < tilesPerSide; ++y) | ||||
size_t offY = y % PATCH_SIZE; | size_t offY = y % PATCH_SIZE; | ||||
// m_Priority and m_Tex2Index unused | // m_Priority and m_Tex2Index unused | ||||
textureIDs.push_back(tiles[(patchY * patchesPerSide + patchX) * SQR(PATCH_SIZE) + (offY * PATCH_SIZE + offX)].m_Tex1Index); | textureIDs.push_back(tiles[(patchY * patchesPerSide + patchX) * SQR(PATCH_SIZE) + (offY * PATCH_SIZE + offX)].m_Tex1Index); | ||||
} | } | ||||
} | } | ||||
JS::RootedValue returnValue(cx); | JS::RootedValue returnValue(cx); | ||||
self->m_ScriptInterface->CreateObject( | ScriptInterface::CreateObject( | ||||
cx, | |||||
&returnValue, | &returnValue, | ||||
"height", heightmap, | "height", heightmap, | ||||
"textureNames", textureNames, | "textureNames", textureNames, | ||||
"textureIDs", textureIDs); | "textureIDs", textureIDs); | ||||
return returnValue; | return returnValue; | ||||
} | } | ||||
Show All 26 Lines |
Wildfire Games · Phabricator