// // GJBaseGameLayer::applyShake from 0x8674c0 to 0x86760c (332 bytes) // // 2 xrefs: // > GJBaseGameLayer::updateCamera @ 0x87e874 // > @ 0xa07e8 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void GJBaseGameLayer::applyShake(GJBaseGameLayer *a1, cocos2d::CCPoint *a2) { double m_unkUint64_1; // d0 double m_totalTime; // d1 float m_unkUint16; // s2 float v6; // s0 float v7; // s8 int v8; // w0 float v9; // s0 float m_unkUint15; // s1 float x; // s2 float y; // s0 float v13; // s0 int v14; // w0 int v15; // w0 cocos2d::CCPoint *v16; // [xsp+48h] [xbp+48h] m_unkUint64_1 = a1->m_gameState.m_unkUint64_1; m_totalTime = a1->m_gameState.m_totalTime; if ( m_unkUint64_1 >= 0.0 ) { m_unkUint16 = a1->m_gameState.m_unkUint16; if ( m_unkUint16 > 0.0 ) { v6 = m_totalTime - m_unkUint64_1; if ( v6 <= m_unkUint16 ) { x = a1->m_gameState.m_unkPoint34.x; y = a1->m_gameState.m_unkPoint34.y; goto LABEL_7; } } } v16 = a2; a1->m_gameState.m_unkUint64_1 = m_totalTime; if ( a1->m_staticCameraShake ) { if ( (float)((float)rand() * 4.6566e-10) > 0.5 ) { v7 = 1.0; v15 = rand(); a2 = v16; if ( (float)((float)v15 * 4.6566e-10) <= 0.5 ) goto LABEL_10; } else { v7 = -1.0; v14 = rand(); a2 = v16; if ( (float)((float)v14 * 4.6566e-10) <= 0.5 ) { LABEL_10: v9 = -1.0; goto LABEL_6; } } v9 = 1.0; goto LABEL_6; } v7 = (float)((float)((float)rand() * 4.6566e-10) * 2.0) + -1.0; v8 = rand(); a2 = v16; v9 = (float)((float)((float)v8 * 4.6566e-10) * 2.0) + -1.0; LABEL_6: m_unkUint15 = a1->m_gameState.m_unkUint15; x = m_unkUint15 * v7; y = v9 * m_unkUint15; a1->m_gameState.m_unkPoint34.x = m_unkUint15 * v7; a1->m_gameState.m_unkPoint34.y = y; LABEL_7: v13 = a2->y + y; a2->x = a2->x + x; a2->y = v13; }
GD Web Decomp Icon

GD Web Decomp

Raw Source