Changed date to match Khanat

This commit is contained in:
SIELA1915 2016-01-30 20:43:01 +01:00
parent c91e7626b4
commit 5c77c15107
12 changed files with 91 additions and 94 deletions

View file

@ -399,21 +399,21 @@ SystemInfoColors =
};
PrintfCommands = {
"52", "15", "55 55 0 255", "28", "uiEonSymbiose", "624",
"52", "15", "55 55 0 255", "28", "uiEon", "624",
"428", "0 0 0 255", "18", "", "624", "378",
"0 0 0 255", "14", "", "644", "278", "0 0 0 255",
"18", "", "52", "17", "255 255 255 255", "28",
"uiEonSymbiose", "622", "430", "255 255 255 255", "18", "",
"uiEon", "622", "430", "255 255 255 255", "18", "",
"622", "380", "255 255 255 255", "14", "", "642",
"280", "255 255 255 255", "18", ""
};
PrintfCommandsFreeTrial = {
"52", "15", "55 55 0 255", "28", "uiEonSymbiose", "624",
"52", "15", "55 55 0 255", "28", "uiEon", "624",
"428", "0 0 0 255", "18", "", "624", "378",
"0 0 0 255", "14", "", "644", "278", "0 0 0 255",
"18", "", "52", "17", "255 255 255 255", "28",
"uiEonSymbiose", "622", "430", "255 255 255 255", "18", "",
"uiEon", "622", "430", "255 255 255 255", "18", "",
"622", "380", "255 255 255 255", "14", "", "642",
"280", "255 255 255 255", "18", ""
};

View file

@ -55,7 +55,7 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_MAIN_ICON ICON DISCARDABLE "ryzom.ico"
IDI_MAIN_ICON ICON DISCARDABLE "khanat.ico"
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
@ -86,10 +86,10 @@ END
IDD_CRASH_INFORMATION DIALOG DISCARDABLE 0, 0, 186, 301
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
CAPTION "Ryzom information"
CAPTION "Khanat information"
FONT 8, "MS Sans Serif"
BEGIN
LTEXT "Ryzom has detected that the last game session has not quit properly. You have experienced :",
LTEXT "Khanat has detected that the last game session has not quit properly. You have experienced :",
IDC_STATIC,7,7,172,27
PUSHBUTTON "A computer freeze.",FROZEN,7,38,172,29
PUSHBUTTON "A computer self reboot.",REBOOTED,7,70,172,29
@ -182,13 +182,13 @@ BEGIN
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "Ryzom client"
VALUE "FileDescription", "Khanat client"
VALUE "FileVersion", RYZOM_VERSION
VALUE "LegalCopyright", COPYRIGHT
#ifdef _DEBUG
VALUE "OriginalFilename", "ryzom_client_d.exe"
VALUE "OriginalFilename", "khanat_client_d.exe"
#else
VALUE "OriginalFilename", "ryzom_client_r.exe"
VALUE "OriginalFilename", "khanat_client_r.exe"
#endif
VALUE "ProductName", "Ryzom Core"
VALUE "ProductVersion", NL_VERSION

View file

@ -874,12 +874,15 @@ class CAHGuildSheetOpen : public IActionHandler
{
CRyzomTime rt;
rt.updateRyzomClock(rGuildMembers[i].EnterDate);
ucstring str = toString("%04d", rt.getRyzomYear()) + " ";
str += CI18N::get("uiJenaYear") + " : ";
str += CI18N::get("uiAtysianCycle") + " ";
str += toString("%01d", rt.getRyzomCycle()+1) +", ";
str += CI18N::get("ui"+MONTH::toString( (MONTH::EMonth)rt.getRyzomMonthInCurrentCycle() )) + ", ";
str += toString("%02d", rt.getRyzomDayOfMonth()+1);
ucstring str = toString("%03d", (sint)RT.getRyzomWeek()) + " ";
str += CI18N::get("ui"+WEEKDAY::toString( (WEEKDAY::EWeekDay)RT.getRyzomDayOfWeek() )) + " - ";
ucstring year = CI18N::get("uiYear");
if (year.length() == 0) {
str += toString("%04d", RT.getRyzomYear()) + " - ";
} else {
str += year + " - ";
}
str += CI18N::get("uiEon");
pViewEnterDate->setText(str);
}

View file

@ -221,12 +221,16 @@ static DECLARE_INTERFACE_USER_FCT(getDateText)
CRyzomTime rt;
string strRes;
strRes= NLMISC::toString(rt.getRyzomDayOfMonth()+1); // Start at 1
strRes= NLMISC::toString((uint32)rt.getRyzomDayOfWeek()+1); // Start at 1
strRes+= " / ";
strRes+= NLMISC::toString(rt.getRyzomMonth()+1); // Start at 1 for january
strRes+= NLMISC::toString(rt.getRyzomWeek()+1); // Start at 1 for january
strRes+= " / ";
strRes+= NLMISC::toString(rt.getRyzomYear());
ucstring year = CI18N::get("uiYear");
if (year.length() == 0) {
strRes += toString("%04d", RT.getRyzomYear());
} else {
strRes += year.toUtf8();
}
result.setString (strRes);
return true;
}

View file

@ -1477,12 +1477,23 @@ void CInterfaceManager::updateFrameEvents()
// literal version
// str = CI18N::get("uiDate");
str += toString("%02d", (sint)RT.getRyzomTime()) + CI18N::get("uiMissionTimerHour") + " - ";
/* str += toString("%02d", (sint)RT.getRyzomTime()) + CI18N::get("uiMissionTimerHour") + " - ";
str += CI18N::get("ui"+WEEKDAY::toString( (WEEKDAY::EWeekDay)RT.getRyzomDayOfWeek() )) + ", ";
str += CI18N::get("ui"+MONTH::toString( (MONTH::EMonth)RT.getRyzomMonthInCurrentCycle() )) + " ";
str += toString("%02d", RT.getRyzomDayOfMonth()+1) + ", ";
str += CI18N::get("uiAtysianCycle" + toString(RT.getRyzomCycle()+1) + "Ordinal") + " " + CI18N::get("uiAtysianCycle") + " ";
str += toString("%04d", RT.getRyzomYear());
str += toString("%04d", RT.getRyzomYear());*/
str += toString("%02d", (sint)RT.getRyzomTime()) + CI18N::get("uiMissionTimerHour") + " - ";
str += toString("%d", (sint)RT.getRyzomWeek()) + " ";
str += CI18N::get("ui"+WEEKDAY::toString( (WEEKDAY::EWeekDay)RT.getRyzomDayOfWeek() )) + " - ";
ucstring year = CI18N::get("uiYear");
if (year.length() == 0) {
str += toString("%04d", RT.getRyzomYear()) + " - ";
} else {
str += year + " - ";
}
str += CI18N::get("uiEon");
pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:time"));
if (pVT != NULL)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

After

Width:  |  Height:  |  Size: 612 KiB

View file

@ -59,12 +59,10 @@ namespace MONTH
namespace WEEKDAY
{
NL_BEGIN_STRING_CONVERSION_TABLE (EWeekDay)
NL_STRING_CONVERSION_TABLE_ENTRY(Prima)
NL_STRING_CONVERSION_TABLE_ENTRY(Dua)
NL_STRING_CONVERSION_TABLE_ENTRY(Tria)
NL_STRING_CONVERSION_TABLE_ENTRY(Quarta)
NL_STRING_CONVERSION_TABLE_ENTRY(Quinteth)
NL_STRING_CONVERSION_TABLE_ENTRY(Holeth)
NL_STRING_CONVERSION_TABLE_ENTRY(Pavdei)
NL_STRING_CONVERSION_TABLE_ENTRY(Reldei)
NL_STRING_CONVERSION_TABLE_ENTRY(Cibdei)
NL_STRING_CONVERSION_TABLE_ENTRY(Vondei)
NL_STRING_CONVERSION_TABLE_ENTRY(UNKNOWN)
NL_END_STRING_CONVERSION_TABLE(EWeekDay, ConversionType, UNKNOWN)

View file

@ -21,20 +21,18 @@
#include "nel/misc/types_nl.h"
const uint RYZOM_HOURS_IN_TICKS = 1800;
const uint RYZOM_HOURS_IN_TICKS = 9000;
const uint RYZOM_DAY_IN_HOUR = 24;
const uint RYZOM_DAY_IN_TICKS = RYZOM_HOURS_IN_TICKS * RYZOM_DAY_IN_HOUR;
const uint RYZOM_SEASON_IN_DAY = 90;
const uint RYZOM_MONTH_IN_DAY = 30;
const uint RYZOM_YEAR_IN_MONTH = 48;
const uint RYZOM_WEEK_IN_DAY = 6;
const uint RYZOM_YEAR_IN_DAY = RYZOM_MONTH_IN_DAY*RYZOM_YEAR_IN_MONTH;
const uint RYZOM_CYCLE_IN_MONTH = 12;
const uint RYZOM_YEAR_IN_WEEK = 120;
const uint RYZOM_WEEK_IN_DAY = 4;
const uint RYZOM_YEAR_IN_DAY = RYZOM_WEEK_IN_DAY*RYZOM_YEAR_IN_WEEK;
const uint RYZOM_START_YEAR = 2570-2;
const uint RYZOM_START_SPRING = 61;
const uint RYZOM_START_DAY = 1111111;
const uint RYZOM_START_HOUR = 9;
const uint RYZOM_START_YEAR = 0;
const uint RYZOM_START_SPRING = 0;
const uint RYZOM_START_DAY = 0;
const uint RYZOM_START_HOUR = 0;
#include "../season.h"
#include "static_light_cycle.h"
@ -82,13 +80,11 @@ namespace WEEKDAY
// Week day
enum EWeekDay
{
Prima = 0,
Dua,
Tria,
Quarta,
Quinteth,
Holeth,
Pavdei = 0,
Reldei,
Cibdei,
Vondei,
UNKNOWN,
NUM_WEEKDAY = UNKNOWN
};
@ -136,15 +132,14 @@ public:
_RyzomDay = 0;
_RyzomTime = 0;
_TickOffset = 0;
_RyzomTime = 0;
}
// Update ryzom clock when tick occurs, local time must be given if localUpdateRyzomClock() and getLocalRyzomTime() is used
void updateRyzomClock( uint32 gameCyle, double localTime = 0 )
{
float time = ( gameCyle + _TickOffset ) / float(RYZOM_HOURS_IN_TICKS);
_RyzomDay = (uint32) ( time / 24.0f ) - RYZOM_START_SPRING;
_RyzomTime = (float) fmod( time, 24.0f );
_RyzomDay = (uint32) ( time / RYZOM_DAY_IN_HOUR ) - RYZOM_START_SPRING;
_RyzomTime = (float) fmod( time, RYZOM_DAY_IN_HOUR );
_LocalTime = localTime;
}
@ -167,21 +162,9 @@ public:
// get Season
static inline ESeason getSeasonByDay(uint32 day) { return (ESeason) ( ( ( day % RYZOM_YEAR_IN_DAY ) / RYZOM_SEASON_IN_DAY ) % (EGSPD::CSeason::Invalid) ); }
// get ryzom month
inline uint getRyzomMonth() const { return ( _RyzomDay % RYZOM_YEAR_IN_DAY ) / RYZOM_MONTH_IN_DAY ; }
// get ryzom month in cycle
inline MONTH::EMonth getRyzomMonthInCurrentCycle() const { return (MONTH::EMonth) ( getRyzomMonth() % RYZOM_CYCLE_IN_MONTH ); }
// get ryzom cycle
inline uint32 getRyzomCycle() const { return getRyzomMonth() / RYZOM_CYCLE_IN_MONTH; }
// get ryzom day of week
inline WEEKDAY::EWeekDay getRyzomDayOfWeek() const { return (WEEKDAY::EWeekDay) ( _RyzomDay % RYZOM_WEEK_IN_DAY ); }
// get ryzom day of month
inline uint32 getRyzomDayOfMonth() const { return ( _RyzomDay % RYZOM_MONTH_IN_DAY ); }
// get ryzom day of season
inline uint32 getRyzomDayOfSeason() const { return ( _RyzomDay % RYZOM_SEASON_IN_DAY ); }

View file

@ -127,7 +127,6 @@ bool CFaunaGenericPlace::getActive() const
std::vector<std::string> dayIntervals;
NLMISC::explode(_DayInterval, std::string(","), dayIntervals, true);
std::string season = EGSPD::CSeason::toString(rt.getRyzomSeason());
std::string month = MONTH::toString((MONTH::EMonth) rt.getRyzomMonth());
std::string weekday = WEEKDAY::toString((WEEKDAY::EWeekDay) rt.getRyzomDay());
bool found = false;
for (uint k = 0; k < dayIntervals.size(); ++k)
@ -147,15 +146,6 @@ bool CFaunaGenericPlace::getActive() const
{
goodToken = true;
}
if (NLMISC::nlstricmp(dayIntervals[k], month) == 0)
{
found = true;
break;
}
if (MONTH::toMonth(dayIntervals[k]) != MONTH::UNKNOWN)
{
goodToken = true;
}
if (NLMISC::nlstricmp(dayIntervals[k], weekday) == 0)
{
found = true;

View file

@ -3063,17 +3063,21 @@ static void displayTime(const CRyzomTime &rt, NLMISC::CLog &log)
std::string result;
result = NLMISC::toString("hh:mm = %d:%d; ", (int) floorf(rt.getRyzomTime()) , (int) floorf(60.f * fmodf(rt.getRyzomTime(), 1.f)));
log.displayNL(result.c_str());
uint32 month = rt.getRyzomMonth();
MONTH::EMonth monthInCycle = rt.getRyzomMonthInCurrentCycle();
std::string monthName = MONTH::toString((MONTH::EMonth) monthInCycle);
uint32 dayOfMonth = rt.getRyzomDayOfMonth();
std::string dayName = WEEKDAY::toString((WEEKDAY::EWeekDay) rt.getRyzomDayOfWeek());
result = NLMISC::toString("mm:dd:yy = %d:%d:%d (%s:%s)",
(int) (month + 1),
(int) (dayOfMonth + 1),
(int) rt.getRyzomYear(),
monthName.c_str(),
dayName.c_str());
std::string week = toString("%03d", rt.getRyzomWeek());
std::string dayName = CI18N::get("ui"+WEEKDAY::toString((WEEKDAY::EWeekDay) rt.getRyzomDayOfWeek())).toUtf8();
std::string year;
std::string eon = CI18N::get("uiEon").toUtf8();
ucstring yearBool = CI18N::get("uiYear");
if (yearBool.length() == 0) {
year = toString("%04d", rt.getRyzomYear());
} else {
year = yearBool.toUtf8();
}
result = NLMISC::toString("week:day:year:eon = %s:%s:%s:%s",
week,
dayName,
year,
eon);
log.displayNL(result.c_str());
log.displayNL("day of year = %d/%d", (int) (rt.getRyzomDayOfYear() + 1), (int) RYZOM_YEAR_IN_DAY);
log.displayNL("season = %d/4 (%s)", (int) rt.getRyzomSeason() + 1, EGSPD::CSeason::toString(rt.getRyzomSeason()).c_str());

View file

@ -830,11 +830,11 @@ public:
break;
case tm_monthday:
{
uint32 dom = CTimeInterface::getRyzomTime().getRyzomDayOfMonth();
/*uint32 dom = CTimeInterface::getRyzomTime().getRyzomDayOfMonth();
while (dom < _DayNumber)
dom += RYZOM_MONTH_IN_DAY;
_Min = _Max = timeTicks + dom * RYZOM_DAY_IN_TICKS;
_Min = _Max = timeTicks + dom * RYZOM_DAY_IN_TICKS;*/
}
break;
case tm_seasonday:

View file

@ -3364,17 +3364,21 @@ void getRyzomDateStr__s(CStateInstance* entity, CScriptStack& stack)
const CRyzomTime &rt = CTimeInterface::getRyzomTime();
result = NLMISC::toString("%d:%d:00", (int) floorf(rt.getRyzomTime()) , (int) floorf(60.f * fmodf(rt.getRyzomTime(), 1.f)));
uint32 month = rt.getRyzomMonth();
MONTH::EMonth monthInCycle = rt.getRyzomMonthInCurrentCycle();
std::string monthName = MONTH::toString((MONTH::EMonth) monthInCycle);
uint32 dayOfMonth = rt.getRyzomDayOfMonth();
std::string dayName = WEEKDAY::toString((WEEKDAY::EWeekDay) rt.getRyzomDayOfWeek());
result += NLMISC::toString(" / %s %d %s(%d) %d",
dayName.c_str(),
(int) (dayOfMonth + 1),
monthName.c_str(),
(int) (month + 1),
(int) rt.getRyzomYear());
std::string week = toString("%03d", rt.getRyzomWeek());
std::string dayName = CI18N::get("ui"+WEEKDAY::toString((WEEKDAY::EWeekDay) rt.getRyzomDayOfWeek())).toUtf8();
std::string year;
std::string eon = CI18N::get("uiEon").toUtf8();
ucstring yearBool = CI18N::get("uiYear");
if (yearBool.length() == 0) {
year = toString("%04d", rt.getRyzomYear());
} else {
year = yearBool.toUtf8();
}
result += NLMISC::toString(" / %s %s - %s - %s",
week,
dayName,
year,
eon);
stack.push( result );
}