//
// cocos2d::CCGridBase::set2DProjection from 0x7ce5f4 to 0x7ce67c (136 bytes)
//
// 1 xrefs:
// > cocos2d::CCGridBase::beforeDraw @ 0x7ce694
//
// 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 12:00:33 +0000
//
int __fastcall cocos2d::CCGridBase::set2DProjection(cocos2d::CCGridBase *this)
{
float *v1; // r0
int v2; // r0
int v3; // r0
cocos2d *v4; // r0
int v6; // [sp+14h] [bp-50h] BYREF
float v7; // [sp+18h] [bp-4Ch]
_BYTE v8[64]; // [sp+1Ch] [bp-48h] BYREF
v1 = (float *)cocos2d::CCDirector::sharedDirector(this);
cocos2d::CCDirector::getWinSizeInPixels((cocos2d::CCDirector *)&v6, v1);
glViewport(0, 0, (int)*(float *)&v6, (int)v7);
v2 = kmGLMatrixMode(5889);
kmGLLoadIdentity(v2);
kmMat4OrthographicProjection((int)v8, 0, v6, 0, v7, -1.0, 1.0);
kmGLMultMatrix(v8);
v3 = kmGLMatrixMode(5888);
v4 = (cocos2d *)kmGLLoadIdentity(v3);
return cocos2d::ccSetProjectionMatrixDirty(v4);
}