9 GAME_DEVICE_IPHONE1 = 0,
11 GAME_DEVICE_IPHONE3GS,
17 GAME_DEVICE_IPHONE6PLUS,
19 GAME_DEVICE_IPHONE6S_PLUS,
20 GAME_DEVICE_IPHONE_SE,
22 GAME_DEVICE_IPHONE7_PLUS,
24 GAME_DEVICE_IPHONE8_PLUS,
27 GAME_DEVICE_LAST_PHONE = GAME_DEVICE_IPHONE_X,
36 GAME_DEVICE_LAST_SMALL_DEVICE = GAME_DEVICE_IPOD6GEN,
43 GAME_DEVICE_IPADAIR_2,
44 GAME_DEVICE_IPADPRO_9_7_INCH,
45 GAME_DEVICE_IPADPRO_12_9_INCH,
48 GAME_DEVICE_LAST_FULL_SIZE_IPAD = GAME_DEVICE_IPAD5,
50 GAME_DEVICE_IPADMINI_1GEN,
51 GAME_DEVICE_IPADMINI_2,
52 GAME_DEVICE_IPADMINI_3,
53 GAME_DEVICE_IPADMINI_4,
55 GAME_DEVICE_SIMULATOR,
60 ORIENTATION_MODE_UNKNOWN,
61 ORIENTATION_MODE_PORTRAIT,
62 ORIENTATION_MODE_LANDSCAPE
67 static bool m_initialised;
68 static bool m_gpsValid;
69 static double m_altitude;
70 static double m_speed;
71 static double m_latitude;
72 static double m_longitude;
73 static double m_heading;
76 static bool m_hasRetinaDisplay;
78 static float m_deviceDpiOverPixelScale;
79 static float m_absoluteDeviceDpi;
80 static float m_nativeScale;
82 static char* m_versionString;
83 static char* m_buildString;
88 static void Initialise ();
89 static void Shutdown ();
90 static bool IsInitialised();
92 static u32 GetDevice ();
93 static bool HasRetinaDisplay ();
96 static float GetAbsoluteDeviceDpi();
97 static float GetNativeScale();
99 static bool IsDeviceSmall ();
100 static bool IsDevicePhone ();
101 static bool IsDeviceMultiCore ();
102 static bool IsDeviceMultiCore (u32 deviceType);
103 static OrientationMode GetOrientationMode ();
104 static OrientationMode DetermineOrientationMode();
106 static int GetMajorSystemVersion ();
108 static const char* GetVersionString () {
return m_versionString; }
109 static const char* GetBuildString () {
return m_buildString; }
111 static bool IsVersionGreaterThan (
const char* version);
112 static bool IsVersionLessThan (
const char* version);
114 static void LaunchBrowser (
const char* url);
115 static void LaunchEMail (
const char* mailTo);
116 static void LaunchPhone (
const char* number);
117 static void LaunchSMS (
const char* number);
119 static bool IsGPSInfoValid () {
return m_gpsValid;}
120 static void SetGPSInfo (
double altitude,
double speed,
double latitude,
double longitude);
121 static void GetGPSInfo (
double& altitude,
double& speed,
double& latitude,
double& longitude);
122 static void SetHeading (
double heading);
123 static float GetHeading ();
125 static void LongLatToMercator (
double lon,
double lat,
double& x,
double& y);
126 static void MercatorToLongLat (
double x,
double y,
double& lon,
double& lat);
128 static void LongLatOSGB36ToOSGrid (
double lon,
double lat,
double& x,
double& y);
129 static void OSGridToLongLatOSGB36 (
double x,
double y,
double& lon,
double& lat);
131 static void ConvertOSGB36ToWGS84 (
double inLon,
double inLat,
double& outLon,
double& outLat);
132 static void ConvertWGS84ToOSGB36 (
double inLon,
double inLat,
double& outLon,
double& outLat);
134 static void DetermineDeviceAndDpi (u32& out_device,
float& out_dpi);