//
// cocos2d::CCAccelerometer::update from 0xb0aaa8 to 0xb0ab14 (108 bytes)
//
// 2 xrefs:
// > Java_org_cocos2dx_lib_Cocos2dxAccelerometer_onSensorChanged @ 0xb0f830
// > ??> @ 0x9a470
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall cocos2d::CCAccelerometer::update(
cocos2d::CCAccelerometer *this,
float a2,
float a3,
float a4,
__int64 a5)
{
__int64 result; // x0
__int64 (__fastcall *v7)(__int64, double *); // x4
result = *(_QWORD *)&this->m_obAccelerationValue.x;
if ( result )
{
v7 = **(__int64 (__fastcall ***)(__int64, double *))result;
*(double *)&this->m_pAccelDelegate = (double)a5;
this->m_obAccelerationValue.y = -(a2 / 9.80665016);
this->m_obAccelerationValue.z = -(a3 / 9.80665016);
this->m_obAccelerationValue.timestamp = -(a4 / 9.80665016);
return v7(result, &this->m_obAccelerationValue.y);
}
return result;
}