//
// MapSelectLayer::ccTouchMoved from 0x97fe48 to 0x97ffec (420 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'MapSelectLayer::ccTouchMoved @ 0x97fffc
// > ??> @ 0x95f70
// > ??> @ 0x11c3a88
//
// 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)
{
GJBigSprite *m_bigSprite; // x24
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x27
__int64 v6; // x0
double v7; // d8
double v8; // d0
float v9; // s0
float v10; // s0
float v11; // s1
float x; // s0
float v13; // s1
float y; // s0
float v15; // s1
cocos2d::CCPoint v16; // [xsp+68h] [xbp+68h] BYREF
__int64 v17; // [xsp+70h] [xbp+70h] BYREF
__int64 v18; // [xsp+78h] [xbp+78h] BYREF
_BYTE v19[8]; // [xsp+80h] [xbp+80h] BYREF
cocos2d::CCPoint v20; // 0:kr08_8.8
cocos2d::CCPoint ConstrainedMapPos; // 0:kr10_8.8
cocos2d::CCPoint v22; // 0:s0.4,4:s1.4
if ( a1->m_inTouch )
{
cocos2d::CCTouch::getLocation(a2);
v20 = cocos2d::CCNode::convertToNodeSpace(a1, &v16);
cocos2d::CCPoint::operator=(&v16, v20.x, v20.y);
cocos2d::CCPoint::operator-(&v17, &v16, &a1->m_lastTouchPos);
m_bigSprite = a1->m_bigSprite;
setPosition = m_bigSprite->setPosition;
v6 = (__int64)m_bigSprite->getPosition(m_bigSprite);
cocos2d::CCPoint::operator+(&v18, v6, &v17);
ConstrainedMapPos = MapSelectLayer::getConstrainedMapPos(a1, v22);
((void (__fastcall *)(GJBigSprite *, _BYTE *, float, float))setPosition)(
m_bigSprite,
v19,
ConstrainedMapPos.x,
ConstrainedMapPos.y);
GJBigSprite::updateSpriteVisibility(a1->m_bigSprite);
v7 = sub_97D408();
v8 = v7 - a1->m_lastTouchTime;
if ( v8 > 0.0 )
{
v9 = 1.0 / (v8 * 60.0);
cocos2d::CCPoint::operator*(&v17, v9);
cocos2d::CCPoint::operator=(&a1->m_mapPos, v10, v11);
x = a1->m_mapPos.x;
v13 = 10.0;
if ( x > 10.0 || (v13 = -10.0, x < -10.0) )
a1->m_mapPos.x = v13;
y = a1->m_mapPos.y;
v15 = 10.0;
if ( y > 10.0 || (v15 = -10.0, y < -10.0) )
a1->m_mapPos.y = v15;
cocos2d::CCPoint::operator=(&a1->m_lastTouchPos, y, v15);
a1->m_lastTouchTime = v7;
}
}
}