Add sheets packer tool for CTimeDateSeasonManager

hg/feature/sse2
kaetemi 11 years ago
parent 30030220c1
commit 2555e93771

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

@ -36,6 +36,7 @@ class CTimeDateSeasonManager
public:
// init RyzomTime, date, weather
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
static void tickUpdate();

@ -37,6 +37,7 @@
#include <gpm_service/sheets.h>
#include <server_share/continent_container.h>
#include <entities_game_service/egs_sheets/egs_sheets.h>
#include <game_share/time_weather_season/time_date_season_manager.h>
// Project includes
// ...
@ -68,7 +69,7 @@ int main(int nNbArg, char **ppArgs)
// verify all params
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("USAGE : sheets_packer_shard <leveldesign> <dfn> <datasets> <tab> <build_packed_sheets>\n");
nlinfo("<tab> : Directory containing visual_slots.tab");
@ -154,6 +155,11 @@ int main(int nNbArg, char **ppArgs)
{
CSheets::init();
}
// CTimeDateSeasonManager
{
CTimeDateSeasonManager::packSheets(s_WriteDirectory);
}
// and that's all folks
return EXIT_SUCCESS;

Loading…
Cancel
Save