mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-26 17:16:20 +00:00
Add sheets packer tool for shard GPMS and CContinentContainer
This commit is contained in:
parent
a3830705ef
commit
116e3440c8
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;
|
_GridWidth = gridWidth;
|
||||||
_GridHeight = gridHeight;
|
_GridHeight = gridHeight;
|
||||||
|
@ -56,6 +56,12 @@ void CContinentContainer::init(uint gridWidth, uint gridHeight, double primitive
|
||||||
_CellSize = cellSize;
|
_CellSize = cellSize;
|
||||||
_LoadPacsPrims = loadPacsPrims;
|
_LoadPacsPrims = loadPacsPrims;
|
||||||
|
|
||||||
|
buildSheets(packedSheetsDirectory);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void CContinentContainer::buildSheets(const string &packedSheetsDirectory)
|
||||||
|
{
|
||||||
std::vector<std::string> filters;
|
std::vector<std::string> filters;
|
||||||
filters.push_back("continent");
|
filters.push_back("continent");
|
||||||
loadForm(filters, packedSheetsDirectory+"continents.packed_sheets", _SheetMap);
|
loadForm(filters, packedSheetsDirectory+"continents.packed_sheets", _SheetMap);
|
||||||
|
|
|
@ -161,7 +161,10 @@ public:
|
||||||
CContinentContainer();
|
CContinentContainer();
|
||||||
|
|
||||||
/// Init whole continent container
|
/// 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
|
/// Init pacs prims
|
||||||
void initPacsPrim(const std::string &path = std::string("landscape_col_prim_pacs_list.txt"));
|
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}
|
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_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)
|
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/ryzom/common/src ${CMAKE_SOURCE_DIR}/ryzom/server/src)
|
||||||
TARGET_LINK_LIBRARIES(sheets_packer_shard
|
TARGET_LINK_LIBRARIES(sheets_packer_shard
|
||||||
ryzom_gameshare
|
ryzom_gameshare
|
||||||
|
ryzom_servershare
|
||||||
nelmisc
|
nelmisc
|
||||||
nelgeorges
|
nelgeorges
|
||||||
nelnet
|
nelnet
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
#include <nel/georges/load_form.h>
|
#include <nel/georges/load_form.h>
|
||||||
#include <game_share/data_set_base.h>
|
#include <game_share/data_set_base.h>
|
||||||
#include <input_output_service/string_manager.h>
|
#include <input_output_service/string_manager.h>
|
||||||
|
#include <gpm_service/sheets.h>
|
||||||
|
#include <server_share/continent_container.h>
|
||||||
|
|
||||||
// Project includes
|
// Project includes
|
||||||
// ...
|
// ...
|
||||||
|
@ -109,6 +111,21 @@ int main(int nNbArg, char **ppArgs)
|
||||||
loadForm(exts, exportDir + "/ios_sheets.packed_sheets", container);
|
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
|
// and that's all folks
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue