{"type": "func", "start": 4295147116, "end": 4295147528, "name": "GJGroundLayer::createLine", "pseudocode": "// \n// GJGroundLayer::createLine from 0x10002be6c to 0x10002c008 (412 bytes)\n// \n// 1 xrefs:\n// > GJGroundLayer::init @ 0x10002ba88\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 __fastcall GJGroundLayer::createLine(GJGroundLayer *a1, int a2)\n{\n  cocos2d::CCSprite *m_lineSprite; // x0\n  int v5; // w8\n  float v6; // s8\n  cocos2d::CCDirector *v7; // x0\n  int v8; // w8\n  cocos2d::CCString *v9; // x0\n  const char *CString; // x0\n  cocos2d::CCSprite *v11; // x0\n  __n128 v12; // q0\n  cocos2d::CCSprite *v13; // x20\n  __n128 v14; // q1\n  __n128 v15; // q0\n  cocos2d::CCSprite *v16; // x20\n  __n128 v17; // q1\n  int v18; // [xsp+10h] [xbp-30h] BYREF\n  float v19; // [xsp+18h] [xbp-28h]\n\n  m_lineSprite = a1->m_lineSprite;\n  if ( m_lineSprite )\n  {\n    ((void (__fastcall *)(cocos2d::CCSprite *))m_lineSprite->removeFromParent)(m_lineSprite);\n    a1->m_lineSprite = nullptr;\n  }\n  if ( a2 <= 1 )\n    v5 = 1;\n  else\n    v5 = a2;\n  if ( a2 <= 1 )\n    v6 = 0.5;\n  else\n    v6 = 0.2;\n  if ( v5 >= 3 )\n    v5 = 3;\n  a1->m_lineType = v5;\n  v7 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(v7);\n  v8 = 1;\n  if ( a1->m_lineType != 1 )\n    v8 = 2;\n  v9 = (cocos2d::CCString *)sub_100268F4C(\"floorLine_%02d_001.png\", v8);\n  CString = cocos2d::CCString::getCString(v9);\n  v11 = cocos2d::CCSprite::createWithSpriteFrameName(CString);\n  a1->m_lineSprite = v11;\n  v12 = ((__n128 (__fastcall *)(GJGroundLayer *, cocos2d::CCSprite *, __int64))a1->addChild_0)(a1, v11, 5);\n  v13 = a1->m_lineSprite;\n  v12.n128_f32[0] = v19 * 0.5;\n  v14.n128_f32[0] = v6;\n  sub_100022980(v12, v14, &v18);\n  v15 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))v13->setPosition)(v13, &v18);\n  v16 = a1->m_lineSprite;\n  v15.n128_u32[0] = 0.5;\n  v17.n128_u32[0] = 1.0;\n  sub_100022980(v15, v17, &v18);\n  ((void (__fastcall *)(cocos2d::CCSprite *, int *))v16->setAnchorPoint)(v16, &v18);\n  ((void (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_lineSprite->setTag)(a1->m_lineSprite, 2);\n  if ( a1->m_blendLine )\n    ((void (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_lineSprite->setBlendFunc)(a1->m_lineSprite, 0x100000302LL);\n  if ( a1->m_lineType >= 2 )\n  {\n    ((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_lineSprite->setScaleX)(\n      a1->m_lineSprite,\n      (float)(v19 + 10.0) / a1->m_lineSprite->m_obRect.size.width);\n    if ( a1->m_lineType == 3 )\n      ((void (__fastcall *)(cocos2d::CCSprite *, float))a1->m_lineSprite->setScaleY)(a1->m_lineSprite, 2.0);\n  }\n}", "assembly": "; \n; GJGroundLayer::createLine from 0x10002be6c to 0x10002c008 (412 bytes)\n; \n; 1 xrefs:\n; > GJGroundLayer::init @ 0x10002ba88\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\nSUB             SP, SP, #0x50                                          ; +0x0, 0x10002be6c\nSTP             D9, D8, [SP,#0x40+var_20]                              ; +0x4, 0x10002be70\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0x8, 0x10002be74\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0xc, 0x10002be78\nADD             X29, SP, #0x40                                         ; +0x10, 0x10002be7c\nMOV             X20, X1                                                ; +0x14, 0x10002be80\nMOV             X19, X0                                                ; +0x18, 0x10002be84\nLDR             X0, [X0,#0x1B0]                                        ; +0x1c, 0x10002be88\nCBZ             X0, loc_10002BEA0                                      ; +0x20, 0x10002be8c\nLDR             X8, [X0]                                               ; +0x24, 0x10002be90\nLDR             X8, [X8,#0x1F8]                                        ; +0x28, 0x10002be94\nBLR             X8                                                     ; +0x2c, 0x10002be98\nSTR             XZR, [X19,#0x1B0]                                      ; +0x30, 0x10002be9c\nCMP             W20, #1                                                ; +0x34, 0x10002bea0\nCSINC           W8, W20, WZR, GT                                       ; +0x38, 0x10002bea4\nADRP            X9, #dword_10063536C@PAGE                              ; +0x3c, 0x10002bea8\nLDR             S0, [X9,#dword_10063536C@PAGEOFF]                      ; +0x40, 0x10002beac\nFMOV            S9, #0.5                                               ; +0x44, 0x10002beb0\nFCSEL           S8, S0, S9, GT                                         ; +0x48, 0x10002beb4\nCMP             W8, #3                                                 ; +0x4c, 0x10002beb8\nMOV             W9, #3                                                 ; +0x50, 0x10002bebc\nCSEL            W8, W8, W9, LT                                         ; +0x54, 0x10002bec0\nSTR             W8, [X19,#0x1C0]                                       ; +0x58, 0x10002bec4\nBL              cocos2d__CCDirector__sharedDirector                    ; +0x5c, 0x10002bec8\nADD             X8, SP, #0x40+var_28                                   ; +0x60, 0x10002becc\nBL              cocos2d__CCDirector__getWinSize                        ; +0x64, 0x10002bed0\nLDR             W8, [X19,#0x1C0]                                       ; +0x68, 0x10002bed4\nCMP             W8, #1                                                 ; +0x6c, 0x10002bed8\nMOV             W8, #1                                                 ; +0x70, 0x10002bedc\nCINC            X8, X8, NE                                             ; +0x74, 0x10002bee0\nSTR             X8, [SP,#0x40+var_40]                                  ; +0x78, 0x10002bee4\nADRL            X0, aFloorline02d00; \"floorLine_%02d_001.png\"          ; +0x7c, 0x10002bee8\nBL              sub_100268F4C                                          ; +0x84, 0x10002bef0\nBL              cocos2d__CCString__getCString                          ; +0x88, 0x10002bef4\nBL              cocos2d__CCSprite__createWithSpriteFrameName           ; +0x8c, 0x10002bef8\nMOV             X1, X0                                                 ; +0x90, 0x10002befc\nSTR             X0, [X19,#0x1B0]                                       ; +0x94, 0x10002bf00\nLDR             X8, [X19]                                              ; +0x98, 0x10002bf04\nLDR             X8, [X8,#0x1C0]                                        ; +0x9c, 0x10002bf08\nMOV             X0, X19                                                ; +0xa0, 0x10002bf0c\nMOV             W2, #5                                                 ; +0xa4, 0x10002bf10\nBLR             X8                                                     ; +0xa8, 0x10002bf14\nLDR             X20, [X19,#0x1B0]                                      ; +0xac, 0x10002bf18\nLDR             S0, [SP,#0x40+var_28]                                  ; +0xb0, 0x10002bf1c\nFMUL            S0, S0, S9                                             ; +0xb4, 0x10002bf20\nADD             X0, SP, #0x40+var_30                                   ; +0xb8, 0x10002bf24\nFMOV            S1, S8                                                 ; +0xbc, 0x10002bf28\nBL              sub_100022980                                          ; +0xc0, 0x10002bf2c\nLDR             X8, [X20]                                              ; +0xc4, 0x10002bf30\nLDR             X8, [X8,#0xB8]                                         ; +0xc8, 0x10002bf34\nADD             X1, SP, #0x40+var_30                                   ; +0xcc, 0x10002bf38\nMOV             X0, X20                                                ; +0xd0, 0x10002bf3c\nBLR             X8                                                     ; +0xd4, 0x10002bf40\nLDR             X20, [X19,#0x1B0]                                      ; +0xd8, 0x10002bf44\nADD             X0, SP, #0x40+var_30                                   ; +0xdc, 0x10002bf48\nFMOV            S0, #0.5                                               ; +0xe0, 0x10002bf4c\nFMOV            S1, #1.0                                               ; +0xe4, 0x10002bf50\nBL              sub_100022980                                          ; +0xe8, 0x10002bf54\nLDR             X8, [X20]                                              ; +0xec, 0x10002bf58\nLDR             X8, [X8,#0x118]                                        ; +0xf0, 0x10002bf5c\nADD             X1, SP, #0x40+var_30                                   ; +0xf4, 0x10002bf60\nMOV             X0, X20                                                ; +0xf8, 0x10002bf64\nBLR             X8                                                     ; +0xfc, 0x10002bf68\nLDR             X0, [X19,#0x1B0]                                       ; +0x100, 0x10002bf6c\nLDR             X8, [X0]                                               ; +0x104, 0x10002bf70\nLDR             X8, [X8,#0x48]                                         ; +0x108, 0x10002bf74\nMOV             W1, #2                                                 ; +0x10c, 0x10002bf78\nBLR             X8                                                     ; +0x110, 0x10002bf7c\nLDRB            W8, [X19,#0x1B9]                                       ; +0x114, 0x10002bf80\nCMP             W8, #1                                                 ; +0x118, 0x10002bf84\nB.NE            loc_10002BFA4                                          ; +0x11c, 0x10002bf88\nLDR             X0, [X19,#0x1B0]                                       ; +0x120, 0x10002bf8c\nLDR             X8, [X0]                                               ; +0x124, 0x10002bf90\nLDR             X8, [X8,#0x428]                                        ; +0x128, 0x10002bf94\nMOV             X1, #0x100000302                                       ; +0x12c, 0x10002bf98\nBLR             X8                                                     ; +0x134, 0x10002bfa0\nLDR             W8, [X19,#0x1C0]                                       ; +0x138, 0x10002bfa4\nCMP             W8, #2                                                 ; +0x13c, 0x10002bfa8\nB.LT            loc_10002BFF4                                          ; +0x140, 0x10002bfac\nLDR             X0, [X19,#0x1B0]                                       ; +0x144, 0x10002bfb0\nLDR             S0, [SP,#0x40+var_28]                                  ; +0x148, 0x10002bfb4\nFMOV            S1, #10.0                                              ; +0x14c, 0x10002bfb8\nFADD            S0, S0, S1                                             ; +0x150, 0x10002bfbc\nLDR             S1, [X0,#0x1B0]                                        ; +0x154, 0x10002bfc0\nFDIV            S0, S0, S1                                             ; +0x158, 0x10002bfc4\nLDR             X8, [X0]                                               ; +0x15c, 0x10002bfc8\nLDR             X8, [X8,#0x80]                                         ; +0x160, 0x10002bfcc\nBLR             X8                                                     ; +0x164, 0x10002bfd0\nLDR             W8, [X19,#0x1C0]                                       ; +0x168, 0x10002bfd4\nCMP             W8, #3                                                 ; +0x16c, 0x10002bfd8\nB.NE            loc_10002BFF4                                          ; +0x170, 0x10002bfdc\nLDR             X0, [X19,#0x1B0]                                       ; +0x174, 0x10002bfe0\nLDR             X8, [X0]                                               ; +0x178, 0x10002bfe4\nLDR             X8, [X8,#0x90]                                         ; +0x17c, 0x10002bfe8\nFMOV            S0, #2.0                                               ; +0x180, 0x10002bfec\nBLR             X8                                                     ; +0x184, 0x10002bff0\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x188, 0x10002bff4\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0x18c, 0x10002bff8\nLDP             D9, D8, [SP,#0x40+var_20]                              ; +0x190, 0x10002bffc\nADD             SP, SP, #0x50 ; 'P'                                    ; +0x194, 0x10002c000\nRET                                                                    ; +0x198, 0x10002c004", "xrefs": ["GJGroundLayer::init @ 0x10002ba88"], "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"}