//
// EditorUI::updateZoom from 0x1401b4c70 to 0x1401b4f72 (770 bytes)
//
// 3 xrefs:
// > EditorUI::updateZoom_1 @ 0x1401b4c55
// > EditorUI::ccTouchMoved @ 0x1401c07b7
// > ??> @ 0x14091a144
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:27:57 +0000
//
// Hidden C++ exception states: #wind=1
struct cocos2d::CCAction *__fastcall EditorUI::updateZoom(__int64 a1, float a2, __int64 a3)
{
_QWORD *v5; // rcx
__int64 v6; // rdi
__int64 v7; // rax
__int64 v8; // rax
__int64 v9; // rax
__int64 v10; // rax
struct cocos2d::CCAction *result; // rax
__int64 v12; // rcx
__int64 v13; // rdx
struct cocos2d::CCAction *v14; // rbx
struct cocos2d::CCFiniteTimeAction *v15; // rbx
struct cocos2d::CCFadeTo *v16; // rax
struct cocos2d::CCAction *v17; // rbx
void *v18; // [rsp+20h] [rbp-98h] BYREF
_BYTE v19[8]; // [rsp+28h] [rbp-90h] BYREF
_BYTE v20[8]; // [rsp+30h] [rbp-88h] BYREF
_BYTE v21[8]; // [rsp+38h] [rbp-80h] BYREF
char Buffer[32]; // [rsp+40h] [rbp-78h] BYREF
v5 = *(_QWORD **)(a1 + 1512);
v6 = v5[537];
v7 = (*(__int64 (__fastcall **)(_QWORD *))(*v5 + 504LL))(v5);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 168LL))(v7);
v8 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1512) + 504LL))(*(_QWORD *)(a1 + 1512));
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 160LL))(v8);
cocos2d::CCNode::convertToNodeSpace(v6, v19, a3);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 160LL))(v6);
cocos2d::CCNode::convertToWorldSpace(v6, v20, v19);
cocos2d::CCPoint::operator-(a3, v21, v20);
v9 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 200LL))(v6);
cocos2d::CCPoint::operator+(v9, &v18, v21);
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v6 + 184LL))(v6, &v18);
EditorUI::constrainGameLayerPosition(a1);
v10 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1512) + 504LL))(*(_QWORD *)(a1 + 1512));
(*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 160LL))(v10);
EditorUI::updateSlider(a1);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 808) + 160LL))(*(_QWORD *)(a1 + 808));
result = (struct cocos2d::CCAction *)GJTransformControl::scaleButtons(*(_QWORD *)(a1 + 840));
if ( *(_QWORD *)(a1 + 1600) )
{
v12 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v18 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v18);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v12 = qword_14090BFD0;
}
result = (struct cocos2d::CCAction *)GameManager::getGameVariable(v12, "0195");
if ( !(_BYTE)result )
{
sub_1401A8CE0(Buffer, "Zoom: %.02f", a2);
(**(void (__fastcall ***)(__int64, char *))(*(_QWORD *)(a1 + 1600) + 360LL))(
*(_QWORD *)(a1 + 1600) + 360LL,
Buffer);
LOBYTE(v13) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 1600) + 336LL))(*(_QWORD *)(a1 + 1600), v13);
if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)(*(_QWORD *)(a1 + 1600) + 368LL) + 32LL))(*(_QWORD *)(a1 + 1600) + 368LL) != 0xFF
&& !cocos2d::CCNode::getActionByTag(*(cocos2d::CCNode **)(a1 + 1600), 129) )
{
v14 = cocos2d::CCFadeTo::create(0.1, 0xFFu);
(*(void (__fastcall **)(struct cocos2d::CCAction *, __int64))(*(_QWORD *)v14 + 64LL))(v14, 129);
cocos2d::CCNode::runAction(*(cocos2d::CCNode **)(a1 + 1600), v14);
}
cocos2d::CCNode::stopActionByTag(*(cocos2d::CCNode **)(a1 + 1600), 130);
v15 = cocos2d::CCDelayTime::create(0.89999998);
v16 = cocos2d::CCFadeTo::create(0.30000001, 0);
v17 = cocos2d::CCSequence::create(v15, v16, 0);
(*(void (__fastcall **)(struct cocos2d::CCAction *, __int64))(*(_QWORD *)v17 + 64LL))(v17, 130);
return cocos2d::CCNode::runAction(*(cocos2d::CCNode **)(a1 + 1600), v17);
}
}
return result;
}