//
// MapSelectLayer::ccTouchMoved from 0x50f268 to 0x50f3aa (322 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'MapSelectLayer::ccTouchMoved @ 0x50f3c4
//
// 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
//
void MapSelectLayer::ccTouchMoved(MapSelectLayer *a1, cocos2d::CCTouch *a2, cocos2d::CCEvent *a3)
{
double v3; // d0
int v5; // r2
bool v6; // r3
GJBigSprite *m_bigSprite; // r9
int v8; // r0
cocos2d::CCPoint v9; // r2
int v10; // r0
float v11; // r1
float v12; // r2
int v13; // r3
double v14; // d7
float v15; // s15
int v16; // r2
bool v17; // r3
int v18; // r2
bool v19; // r3
float x; // s13
float y; // s14
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+4h] [bp-30h]
cocos2d::CCPoint v23; // [sp+Ch] [bp-28h] BYREF
_BYTE v24[8]; // [sp+14h] [bp-20h] BYREF
_BYTE v25[8]; // [sp+1Ch] [bp-18h] BYREF
cocos2d::CCPoint v26; // [sp+24h] [bp-10h] BYREF
if ( a1->m_inTouch )
{
cocos2d::CCTouch::getLocation(&v23, a2);
cocos2d::CCNode::convertToNodeSpace(&v26, a1, &v23);
cocos2d::CCPoint::operator=((PlayerObject *)&v23, COERCE_FLOAT(&v26), v5, v6);
cocos2d::CCPoint::operator-(v24, &v23, &a1->m_lastTouchPos);
m_bigSprite = a1->m_bigSprite;
setPosition = m_bigSprite->setPosition;
v8 = (int)m_bigSprite->getPosition(m_bigSprite);
cocos2d::CCPoint::operator+(v25, v8, v24);
LODWORD(v9.x) = v25;
MapSelectLayer::getConstrainedMapPos(&v26, a1, v9);
setPosition(m_bigSprite, &v26);
GJBigSprite::updateSpriteVisibility(a1->m_bigSprite);
sub_50D7B0(v10, v11, v12, v13);
v14 = v3 - a1->m_lastTouchTime;
if ( v14 > 0.0 )
{
v15 = 1.0 / (v14 * 60.0);
cocos2d::CCPoint::operator*(&v26, v24, LODWORD(v15));
cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_mapPos, COERCE_FLOAT(&v26), v16, v17);
x = a1->m_mapPos.x;
if ( x <= 10.0 )
{
if ( x < -10.0 )
a1->m_mapPos.x = -10.0;
}
else
{
a1->m_mapPos.x = 10.0;
}
y = a1->m_mapPos.y;
if ( y <= 10.0 )
{
if ( y < -10.0 )
a1->m_mapPos.y = -10.0;
}
else
{
v19 = 0;
a1->m_mapPos.y = 10.0;
}
cocos2d::CCPoint::operator=((PlayerObject *)&a1->m_lastTouchPos, COERCE_FLOAT(&v23), v18, v19);
a1->m_lastTouchTime = v3;
}
}
}