//
// cocos2d::CCDirector::setViewport from 0x100478660 to 0x1004786aa (74 bytes)
//
// 5 xrefs:
// > cocos2d::CCRenderTexture::end @ 0x1006c8b45
// > cocos2d::CCRenderTexture::clear @ 0x1006c8c11
// > cocos2d::CCRenderTexture::clearDepth @ 0x1006c8cc7
// > cocos2d::CCRenderTexture::draw @ 0x1006c8ef0
// > cocos2d::CCRenderTexture::newCCImage @ 0x1006c9156
//
// 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 12:30:36 +0000
//
__int64 __fastcall cocos2d::CCDirector::setViewport(__int64 a1)
{
__int64 result; // rax
__int64 v2; // [rsp-18h] [rbp-18h] BYREF
if ( *(_QWORD *)(a1 + 192) )
{
v2 = result;
sub_100278630(&v2, (_QWORD *)(a1 + 320));
return (*(__int64 (__fastcall **)(_QWORD, double, double, float, float))(**(_QWORD **)(a1 + 192) + 104LL))(
*(_QWORD *)(a1 + 192),
0.0,
0.0,
*(float *)&v2,
*((float *)&v2 + 1));
}
return result;
}