mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-26 02:40:54 +00:00
Add sheets packer tool for shard GPMS and CContinentContainer
This commit is contained in:
parent
990f7febf7
commit
3ca87bf1ca
4 changed files with 32 additions and 3 deletions
|
@ -47,7 +47,7 @@ CContinentContainer::CContinentContainer()
|
|||
}
|
||||
|
||||
//
|
||||
void CContinentContainer::init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const string packedSheetsDirectory, double cellSize, bool loadPacsPrims)
|
||||
void CContinentContainer::init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const string &packedSheetsDirectory, double cellSize, bool loadPacsPrims)
|
||||
{
|
||||
_GridWidth = gridWidth;
|
||||
_GridHeight = gridHeight;
|
||||
|
@ -56,6 +56,12 @@ void CContinentContainer::init(uint gridWidth, uint gridHeight, double primitive
|
|||
_CellSize = cellSize;
|
||||
_LoadPacsPrims = loadPacsPrims;
|
||||
|
||||
buildSheets(packedSheetsDirectory);
|
||||
}
|
||||
|
||||
//
|
||||
void CContinentContainer::buildSheets(const string &packedSheetsDirectory)
|
||||
{
|
||||
std::vector<std::string> filters;
|
||||
filters.push_back("continent");
|
||||
loadForm(filters, packedSheetsDirectory+"continents.packed_sheets", _SheetMap);
|
||||
|
|
|
@ -161,7 +161,10 @@ public:
|
|||
CContinentContainer();
|
||||
|
||||
/// Init whole continent container
|
||||
void init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const std::string packedSheetsDirectory, double cellSize=0.0, bool loadPacsPrims = true);
|
||||
void init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const std::string &packedSheetsDirectory, double cellSize=0.0, bool loadPacsPrims = true);
|
||||
|
||||
/// Build sheets
|
||||
void buildSheets(const std::string &packedSheetsDirectory);
|
||||
|
||||
/// Init pacs prims
|
||||
void initPacsPrim(const std::string &path = std::string("landscape_col_prim_pacs_list.txt"));
|
||||
|
|
|
@ -2,11 +2,14 @@ FILE(GLOB SRC *.cpp *.h)
|
|||
|
||||
ADD_EXECUTABLE(sheets_packer_shard ${SRC}
|
||||
${CMAKE_SOURCE_DIR}/ryzom/server/src/input_output_service/string_manager_sheet.cpp
|
||||
${CMAKE_SOURCE_DIR}/ryzom/server/src/input_output_service/string_manager.h)
|
||||
${CMAKE_SOURCE_DIR}/ryzom/server/src/input_output_service/string_manager.h
|
||||
${CMAKE_SOURCE_DIR}/ryzom/server/src/gpm_service/sheets.cpp
|
||||
${CMAKE_SOURCE_DIR}/ryzom/server/src/gpm_service/sheets.h)
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/ryzom/common/src ${CMAKE_SOURCE_DIR}/ryzom/server/src)
|
||||
TARGET_LINK_LIBRARIES(sheets_packer_shard
|
||||
ryzom_gameshare
|
||||
ryzom_servershare
|
||||
nelmisc
|
||||
nelgeorges
|
||||
nelnet
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
#include <nel/georges/load_form.h>
|
||||
#include <game_share/data_set_base.h>
|
||||
#include <input_output_service/string_manager.h>
|
||||
#include <gpm_service/sheets.h>
|
||||
#include <server_share/continent_container.h>
|
||||
|
||||
// Project includes
|
||||
// ...
|
||||
|
@ -108,6 +110,21 @@ int main(int nNbArg, char **ppArgs)
|
|||
exts.push_back("race_stats");
|
||||
loadForm(exts, exportDir + "/ios_sheets.packed_sheets", container);
|
||||
}
|
||||
|
||||
// GPMS
|
||||
{
|
||||
std::map<NLMISC::CSheetId, CSheets::CSheet> container;
|
||||
std::vector<std::string> filters;
|
||||
filters.push_back("creature");
|
||||
filters.push_back("player");
|
||||
loadForm(filters, exportDir + "/gpms.packed_sheets", container);
|
||||
}
|
||||
|
||||
// CContinentContainer
|
||||
{
|
||||
CContinentContainer continents;
|
||||
continents.buildSheets(exportDir + "/");
|
||||
}
|
||||
|
||||
// and that's all folks
|
||||
return EXIT_SUCCESS;
|
||||
|
|
Loading…
Reference in a new issue