//
// cocos2d::CCGridBase::set2DProjection from 0xd4eebc to 0xd4ef68 (172 bytes)
//
// 2 xrefs:
// > cocos2d::CCGridBase::beforeDraw @ 0xd4ef88
// > ??> @ 0xcffa0
//
// This function is hookable on this platform (idp: arm, 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 13:07:39 +0000
//
__int64 __fastcall cocos2d::CCGridBase::set2DProjection(cocos2d::CCGridBase *this)
{
cocos2d::CCDirector *v1; // x0
__int64 v2; // x0
__int64 v3; // x0
cocos2d *v4; // x0
float v6[2]; // [xsp+20h] [xbp+20h] BYREF
_BYTE v7[64]; // [xsp+28h] [xbp+28h] BYREF
v1 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(_stack_chk_guard);
cocos2d::CCDirector::getWinSizeInPixels(v6, v1);
glViewport();
v2 = kmGLMatrixMode(5889);
kmGLLoadIdentity(v2);
kmMat4OrthographicProjection(v7, 0.0, v6[0], 0.0, v6[1], -1.0, 1.0);
kmGLMultMatrix(v7);
v3 = kmGLMatrixMode(5888);
kmGLLoadIdentity(v3);
cocos2d::ccSetProjectionMatrixDirty(v4);
return _stack_chk_guard;
}