2013-03-09 09:35:43 -05:00
|
|
|
|
2012-06-14 09:06:06 -04:00
|
|
|
#pragma once
|
|
|
|
|
2013-03-09 09:35:43 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// tolua_begin
|
|
|
|
class cSign
|
|
|
|
{
|
2012-06-14 09:06:06 -04:00
|
|
|
public:
|
2013-03-09 09:35:43 -05:00
|
|
|
static char RotationToMetaData(double a_Rotation)
|
|
|
|
{
|
|
|
|
a_Rotation += 180 + (180 / 16); // So it's not aligned with axis
|
|
|
|
if (a_Rotation > 360)
|
|
|
|
{
|
|
|
|
a_Rotation -= 360;
|
|
|
|
}
|
2012-06-14 09:06:06 -04:00
|
|
|
|
2013-03-09 09:35:43 -05:00
|
|
|
a_Rotation = (a_Rotation / 360) * 16;
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
return ((char)a_Rotation) % 16;
|
2013-03-09 09:35:43 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static char DirectionToMetaData(char a_Direction)
|
|
|
|
{
|
|
|
|
switch (a_Direction)
|
2012-06-14 09:06:06 -04:00
|
|
|
{
|
2013-03-09 09:35:43 -05:00
|
|
|
case 0x2: return 0x2;
|
|
|
|
case 0x3: return 0x3;
|
|
|
|
case 0x4: return 0x4;
|
|
|
|
case 0x5: return 0x5;
|
|
|
|
default:
|
|
|
|
break;
|
2012-06-14 09:06:06 -04:00
|
|
|
};
|
|
|
|
return 0x2;
|
|
|
|
}
|
2013-03-09 09:35:43 -05:00
|
|
|
} ;
|
|
|
|
// tolua_end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|