//
// CCTextInputNode::keyboardWillShow from 0x3dc3a4 to 0x3dc482 (222 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'CCTextInputNode::keyboardWillShow @ 0x3dc490
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:46:48 +0000
//
int __fastcall CCTextInputNode::keyboardWillShow(int a1, int a2)
{
cocos2d::CCRect *v2; // r7
int result; // r0
const cocos2d::CCPoint *v5; // r0
float v6; // s16
float v7; // s16
_BYTE v8[4]; // [sp+4h] [bp-24h] BYREF
float v9; // [sp+8h] [bp-20h]
float v10; // [sp+14h] [bp-14h] BYREF
float v11; // [sp+18h] [bp-10h]
v2 = (cocos2d::CCRect *)(a2 + 16);
result = cocos2d::CCRect::getMaxY((cocos2d::CCRect *)(a2 + 16));
CCTextInputNode::s_keyboardTop = result;
if ( !*(_BYTE *)(a1 + 434) )
{
result = *(_DWORD *)(a1 + 416);
if ( result )
{
if ( *(_BYTE *)(a1 + 344) )
{
v5 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)result + 152))(result);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v10, v5);
sub_3DC220((cocos2d::CCRect *)v8, (const cocos2d::CCPoint *)a1, &v10);
v9 = v9 - 4.0;
v6 = COERCE_FLOAT(cocos2d::CCRect::getMaxY(v2));
v7 = v6 - COERCE_FLOAT(cocos2d::CCRect::getMinY((cocos2d::CCRect *)v8));
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v10, (const cocos2d::CCRect *)v8);
if ( v7 < 0.0 )
v11 = v11 + v7;
result = cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)&v10, v2);
if ( result )
{
result = *(_DWORD *)(a1 + 420);
*(_BYTE *)(a1 + 345) = 1;
if ( result )
return (*(int (__fastcall **)(int, int, float))(*(_DWORD *)result + 12))(
result,
a1,
COERCE_FLOAT(LODWORD(v7)));
}
}
}
}
return result;
}