Add sheets packer tool for CTimeDateSeasonManager

This commit is contained in:
kaetemi 2014-02-19 00:07:22 +01:00
parent 30030220c1
commit 2555e93771
3 changed files with 14 additions and 4 deletions

View file

@ -42,9 +42,12 @@ std::map< NLMISC::CSheetId, CStaticLightCycle > CTimeDateSeasonManager::_StaticL
void CTimeDateSeasonManager::init( uint32 /* startDay */, float /* startTime */) void CTimeDateSeasonManager::init( uint32 /* startDay */, float /* startTime */)
{ {
// load light cycle sheet // load light cycle sheet
string lightCycleFile = IService::getInstance()->WriteFilesDirectory; packSheets(IService::getInstance()->WriteFilesDirectory);
lightCycleFile = lightCycleFile + string("light_cycles.packed_sheets"); }
loadForm( "light_cycle", lightCycleFile, _StaticLightCyclesHours );
void CTimeDateSeasonManager::packSheets(const std::string &writeDirectory)
{
loadForm("light_cycle", writeDirectory + "light_cycles.packed_sheets", _StaticLightCyclesHours);
} }

View file

@ -36,6 +36,7 @@ class CTimeDateSeasonManager
public: public:
// init RyzomTime, date, weather // init RyzomTime, date, weather
static void init( uint32 startDay = RYZOM_START_DAY, float startTime = RYZOM_START_HOUR ); static void init( uint32 startDay = RYZOM_START_DAY, float startTime = RYZOM_START_HOUR );
static void packSheets(const std::string &writeDirectory);
// tick update => update ryzom time // tick update => update ryzom time
static void tickUpdate(); static void tickUpdate();

View file

@ -37,6 +37,7 @@
#include <gpm_service/sheets.h> #include <gpm_service/sheets.h>
#include <server_share/continent_container.h> #include <server_share/continent_container.h>
#include <entities_game_service/egs_sheets/egs_sheets.h> #include <entities_game_service/egs_sheets/egs_sheets.h>
#include <game_share/time_weather_season/time_date_season_manager.h>
// Project includes // Project includes
// ... // ...
@ -68,7 +69,7 @@ int main(int nNbArg, char **ppArgs)
// verify all params // verify all params
if (nNbArg < 6) if (nNbArg < 6)
{ {
// >sheets_packer_shard.exe L:\leveldesign L:\leveldesign\DFN R:\code\ryzom\server\data_shard\mirror_sheets T:\export\common\leveldesign\visual_slot_tab T:\test_shard // sheets_packer_shard.exe L:\leveldesign L:\leveldesign\DFN R:\code\ryzom\server\data_shard\mirror_sheets T:\export\common\leveldesign\visual_slot_tab T:\test_shard
nlinfo("ERROR : Wrong number of arguments\n"); nlinfo("ERROR : Wrong number of arguments\n");
nlinfo("USAGE : sheets_packer_shard <leveldesign> <dfn> <datasets> <tab> <build_packed_sheets>\n"); nlinfo("USAGE : sheets_packer_shard <leveldesign> <dfn> <datasets> <tab> <build_packed_sheets>\n");
nlinfo("<tab> : Directory containing visual_slots.tab"); nlinfo("<tab> : Directory containing visual_slots.tab");
@ -154,6 +155,11 @@ int main(int nNbArg, char **ppArgs)
{ {
CSheets::init(); CSheets::init();
} }
// CTimeDateSeasonManager
{
CTimeDateSeasonManager::packSheets(s_WriteDirectory);
}
// and that's all folks // and that's all folks
return EXIT_SUCCESS; return EXIT_SUCCESS;