{"type": "func", "start": 4683728, "end": 4684012, "name": "GJBaseGameLayer::applyShake", "pseudocode": "// \n// GJBaseGameLayer::applyShake from 0x4777d0 to 0x4778ec (284 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::updateCamera @ 0x4873ce\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid GJBaseGameLayer::applyShake(GJBaseGameLayer *a1, cocos2d::CCPoint *a2)\n{\n  cocos2d::CCPoint *p_m_unkPoint34; // r7\n  float *p_y; // r6\n  double m_unkUint64_1; // d7\n  double m_totalTime; // d6\n  float m_unkUint16; // s11\n  float v9; // s14\n  float v10; // s16\n  float v11; // s17\n  float v12; // s17\n  int v13; // r0\n  float m_unkUint15; // s15\n  float v15; // s14\n\n  p_m_unkPoint34 = &a1->m_gameState.m_unkPoint34;\n  p_y = &a1->m_gameState.m_unkPoint34.y;\n  m_unkUint64_1 = a1->m_gameState.m_unkUint64_1;\n  m_totalTime = a1->m_gameState.m_totalTime;\n  if ( m_unkUint64_1 < 0.0\n    || (m_unkUint16 = a1->m_gameState.m_unkUint16, m_unkUint16 <= 0.0)\n    || (v9 = m_totalTime - m_unkUint64_1, v9 > m_unkUint16) )\n  {\n    a1->m_gameState.m_unkUint64_1 = m_totalTime;\n    if ( a1->m_staticCameraShake )\n    {\n      v10 = 1.0;\n      if ( (float)((float)rand() * 4.6566e-10) > 0.5 )\n        v11 = 1.0;\n      else\n        v11 = -1.0;\n      if ( (float)((float)rand() * 4.6566e-10) <= 0.5 )\n        v10 = -1.0;\n    }\n    else\n    {\n      v12 = (float)rand();\n      v13 = rand();\n      v11 = (float)((float)(v12 * 4.6566e-10) + (float)(v12 * 4.6566e-10)) - 1.0;\n      v10 = (float)((float)((float)v13 * 4.6566e-10) + (float)((float)v13 * 4.6566e-10)) - 1.0;\n    }\n    m_unkUint15 = a1->m_gameState.m_unkUint15;\n    p_m_unkPoint34->x = v11 * m_unkUint15;\n    *p_y = v10 * m_unkUint15;\n  }\n  v15 = *p_y;\n  a2->x = a2->x + p_m_unkPoint34->x;\n  a2->y = a2->y + v15;\n}", "assembly": "; \n; GJBaseGameLayer::applyShake from 0x4777d0 to 0x4778ec (284 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::updateCamera @ 0x4873ce\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH            {R3-R7,LR}                                             ; +0x0, 0x4777d0\nADD.W           R3, R0, #0x430                                         ; +0x2, 0x4777d2\nVPUSH           {D8-D10}                                               ; +0x6, 0x4777d6\nMOV             R4, R0                                                 ; +0xa, 0x4777da\nMOV             R5, R1                                                 ; +0xc, 0x4777dc\nADD.W           R7, R0, #0x438                                         ; +0xe, 0x4777de\nADDW            R6, R0, #0x43C                                         ; +0x12, 0x4777e2\nVLDR            D7, [R3]                                               ; +0x16, 0x4777e6\nVLDR            D6, [R0,#0x320]                                        ; +0x1a, 0x4777ea\nVCMPE.F64       D7, #0.0                                               ; +0x1e, 0x4777ee\nVMRS            APSR_nzcv, FPSCR                                       ; +0x22, 0x4777f2\nBMI             loc_47781C                                             ; +0x26, 0x4777f6\nADDW            R2, R0, #0x42C                                         ; +0x28, 0x4777f8\nVLDR            S11, [R2]                                              ; +0x2c, 0x4777fc\nVCMPE.F32       S11, #0.0                                              ; +0x30, 0x477800\nVMRS            APSR_nzcv, FPSCR                                       ; +0x34, 0x477804\nBLS             loc_47781C                                             ; +0x38, 0x477808\nVSUB.F64        D7, D6, D7                                             ; +0x3a, 0x47780a\nVCVT.F32.F64    S14, D7                                                ; +0x3e, 0x47780e\nVCMPE.F32       S14, S11                                               ; +0x42, 0x477812\nVMRS            APSR_nzcv, FPSCR                                       ; +0x46, 0x477816\nBLE             loc_4778C6                                             ; +0x4a, 0x47781a\nVSTR            D6, [R3]                                               ; +0x4c, 0x47781c\nMOVW            R3, #0x2B04                                            ; +0x50, 0x477820\nLDRB            R3, [R4,R3]                                            ; +0x54, 0x477824\nVLDR            S18, =4.6566e-10                                       ; +0x56, 0x477826\nCBZ             R3, loc_47787A                                         ; +0x5a, 0x47782a\nBLX             rand                                                   ; +0x5c, 0x47782c\nVMOV.F32        S20, #0.5                                              ; +0x60, 0x477830\nVMOV.F32        S16, #1.0                                              ; +0x64, 0x477834\nVMOV.F32        S19, #-1.0                                             ; +0x68, 0x477838\nVMOV            S15, R0                                                ; +0x6c, 0x47783c\nVCVT.F32.S32    S15, S15                                               ; +0x70, 0x477840\nVMUL.F32        S15, S15, S18                                          ; +0x74, 0x477844\nVCMPE.F32       S15, S20                                               ; +0x78, 0x477848\nVMRS            APSR_nzcv, FPSCR                                       ; +0x7c, 0x47784c\nITE LE                                                                 ; +0x80, 0x477850\nVMOVLE.F32      S17, S19                                               ; +0x82, 0x477852\nVMOVGT.F32      S17, S16                                               ; +0x86, 0x477856\nBLX             rand                                                   ; +0x8a, 0x47785a\nVMOV            S15, R0                                                ; +0x8e, 0x47785e\nVCVT.F32.S32    S14, S15                                               ; +0x92, 0x477862\nVMUL.F32        S18, S14, S18                                          ; +0x96, 0x477866\nVCMPE.F32       S18, S20                                               ; +0x9a, 0x47786a\nVMRS            APSR_nzcv, FPSCR                                       ; +0x9e, 0x47786e\nIT LE                                                                  ; +0xa2, 0x477872\nVMOVLE.F32      S16, S19                                               ; +0xa4, 0x477874\nB               loc_4778AE                                             ; +0xa8, 0x477878\nBLX             rand                                                   ; +0xaa, 0x47787a\nVMOV.F32        S16, #1.0                                              ; +0xae, 0x47787e\nVMOV            S15, R0                                                ; +0xb2, 0x477882\nVCVT.F32.S32    S17, S15                                               ; +0xb6, 0x477886\nBLX             rand                                                   ; +0xba, 0x47788a\nVMUL.F32        S17, S17, S18                                          ; +0xbe, 0x47788e\nVADD.F32        S17, S17, S17                                          ; +0xc2, 0x477892\nVSUB.F32        S17, S17, S16                                          ; +0xc6, 0x477896\nVMOV            S15, R0                                                ; +0xca, 0x47789a\nVCVT.F32.S32    S15, S15                                               ; +0xce, 0x47789e\nVMUL.F32        S15, S15, S18                                          ; +0xd2, 0x4778a2\nVADD.F32        S15, S15, S15                                          ; +0xd6, 0x4778a6\nVSUB.F32        S16, S15, S16                                          ; +0xda, 0x4778aa\nADD.W           R4, R4, #0x428                                         ; +0xde, 0x4778ae\nVLDR            S15, [R4]                                              ; +0xe2, 0x4778b2\nVMUL.F32        S17, S17, S15                                          ; +0xe6, 0x4778b6\nVMUL.F32        S16, S16, S15                                          ; +0xea, 0x4778ba\nVSTR            S17, [R7]                                              ; +0xee, 0x4778be\nVSTR            S16, [R6]                                              ; +0xf2, 0x4778c2\nVPOP            {D8-D10}                                               ; +0xf6, 0x4778c6\nVLDR            S14, [R7]                                              ; +0xfa, 0x4778ca\nVLDR            S15, [R5]                                              ; +0xfe, 0x4778ce\nVADD.F32        S15, S15, S14                                          ; +0x102, 0x4778d2\nVLDR            S14, [R6]                                              ; +0x106, 0x4778d6\nVSTR            S15, [R5]                                              ; +0x10a, 0x4778da\nVLDR            S15, [R5,#4]                                           ; +0x10e, 0x4778de\nVADD.F32        S15, S15, S14                                          ; +0x112, 0x4778e2\nVSTR            S15, [R5,#4]                                           ; +0x116, 0x4778e6\nPOP             {R3-R7,PC}                                             ; +0x11a, 0x4778ea", "xrefs": ["GJBaseGameLayer::updateCamera @ 0x4873ce"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}