{"type": "func", "start": 8305484, "end": 8306000, "name": "GJGroundLayer::createLine", "pseudocode": "// \n// GJGroundLayer::createLine from 0x7ebb4c to 0x7ebd50 (516 bytes)\n// \n// 2 xrefs:\n// > GJGroundLayer::init @ 0x7ebe44\n// > <???> @ 0xa9890\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 GJGroundLayer::createLine(GJGroundLayer *a1, int a2)\n{\n  cocos2d::CCSprite *m_lineSprite; // x0\n  float v4; // s1\n  cocos2d::CCDirector *v5; // x0\n  cocos2d::CCString *v6; // x0\n  const char *CString; // x0\n  cocos2d::CCSprite *v8; // x0\n  cocos2d::CCSprite *v9; // x23\n  void (__fastcall *setPosition)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24\n  cocos2d::CCSprite *v11; // x23\n  void (__fastcall *setAnchorPoint)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x24\n  double v13; // d0\n  double v14; // d1\n  int v15; // [xsp+50h] [xbp+50h]\n  float v16; // [xsp+50h] [xbp+50h]\n  float v17; // [xsp+68h] [xbp+68h]\n  cocos2d::CCPoint v18; // [xsp+70h] [xbp+70h] BYREF\n  cocos2d::CCSize WinSize; // 0:kr00_8.8\n\n  m_lineSprite = a1->m_lineSprite;\n  if ( m_lineSprite )\n  {\n    v15 = a2;\n    m_lineSprite->removeFromParent(m_lineSprite);\n    a1->m_lineSprite = nullptr;\n    a2 = v15;\n  }\n  a1->m_lineType = a2;\n  if ( a2 > 3 )\n  {\n    a1->m_lineType = (unsigned int)&dword_0 + 3;\n  }\n  else\n  {\n    if ( a2 <= 0 )\n      a2 = 1;\n    a1->m_lineType = a2;\n    if ( a2 == 1 )\n    {\n      v4 = 0.5;\n      goto LABEL_10;\n    }\n  }\n  v4 = 0.2;\nLABEL_10:\n  v16 = v4;\n  v5 = cocos2d::CCDirector::sharedDirector();\n  WinSize = cocos2d::CCDirector::getWinSize(v5);\n  *(float *)&v13 = WinSize.width;\n  *(float *)&v14 = WinSize.height;\n  if ( a1->m_lineType == 1 )\n    v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                (cocos2d::CCString *)\"floorLine_%02d_001.png\",\n                                (_BYTE *)&dword_0 + 1,\n                                v13,\n                                v14);\n  else\n    v6 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                (cocos2d::CCString *)\"floorLine_%02d_001.png\",\n                                (_BYTE *)&dword_0 + 2,\n                                v13,\n                                v14);\n  CString = cocos2d::CCString::getCString(v6);\n  v8 = cocos2d::CCSprite::createWithSpriteFrameName(CString);\n  a1->m_lineSprite = v8;\n  a1->addChild_0(a1, v8, 5);\n  v9 = a1->m_lineSprite;\n  setPosition = v9->setPosition;\n  cocos2d::CCPoint::CCPoint(&v18, v17 * 0.5, v16);\n  setPosition(v9, &v18);\n  v11 = a1->m_lineSprite;\n  setAnchorPoint = v11->setAnchorPoint;\n  cocos2d::CCPoint::CCPoint(&v18, 0.5, 1.0);\n  setAnchorPoint(v11, &v18);\n  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 > 1 )\n  {\n    a1->m_lineSprite->setScaleX(a1->m_lineSprite, (float)(v17 + 10.0) / a1->m_lineSprite->m_obRect.size.width);\n    if ( a1->m_lineType == 3 )\n      a1->m_lineSprite->setScaleY(a1->m_lineSprite, 2.0);\n  }\n}", "assembly": "; \n; GJGroundLayer::createLine from 0x7ebb4c to 0x7ebd50 (516 bytes)\n; \n; 2 xrefs:\n; > GJGroundLayer::init @ 0x7ebe44\n; > <???> @ 0xa9890\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\nSTP             X29, X30, [SP,#var_80]!                                ; +0x0, 0x7ebb4c\nMOV             X29, SP                                                ; +0x4, 0x7ebb50\nSTP             X21, X22, [SP,#0x80+var_60]                            ; +0x8, 0x7ebb54\nADRP            X21, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x7ebb58\nSTP             X19, X20, [SP,#0x80+var_70]                            ; +0x10, 0x7ebb5c\nMOV             X19, X0                                                ; +0x14, 0x7ebb60\nLDR             X0, [X0,#0x1B0]                                        ; +0x18, 0x7ebb64\nLDR             X2, [X21,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x7ebb68\nSTP             X23, X24, [SP,#0x80+var_50]                            ; +0x20, 0x7ebb6c\nSTR             D8, [SP,#0x80+var_40]                                  ; +0x24, 0x7ebb70\nLDR             X2, [X2]                                               ; +0x28, 0x7ebb74\nSTR             X2, [X29,#0x80+var_8]                                  ; +0x2c, 0x7ebb78\nCBZ             X0, loc_7EBB98                                         ; +0x30, 0x7ebb7c\nLDR             X2, [X0]                                               ; +0x34, 0x7ebb80\nSTR             X1, [X29,#0x80+var_30]                                 ; +0x38, 0x7ebb84\nLDR             X2, [X2,#0x1F8]                                        ; +0x3c, 0x7ebb88\nBLR             X2                                                     ; +0x40, 0x7ebb8c\nSTR             XZR, [X19,#0x1B0]                                      ; +0x44, 0x7ebb90\nLDR             X1, [X29,#0x80+var_30]                                 ; +0x48, 0x7ebb94\nSTR             W1, [X19,#0x1C0]                                       ; +0x4c, 0x7ebb98\nCMP             W1, #3                                                 ; +0x50, 0x7ebb9c\nB.GT            loc_7EBBC0                                             ; +0x54, 0x7ebba0\nCMP             W1, WZR                                                ; +0x58, 0x7ebba4\nCSINC           W1, W1, WZR, GT                                        ; +0x5c, 0x7ebba8\nSTR             W1, [X19,#0x1C0]                                       ; +0x60, 0x7ebbac\nCMP             W1, #1                                                 ; +0x64, 0x7ebbb0\nB.NE            loc_7EBBC8                                             ; +0x68, 0x7ebbb4\nFMOV            S1, #0.5                                               ; +0x6c, 0x7ebbb8\nB               loc_7EBBCC                                             ; +0x70, 0x7ebbbc\nMOV             W0, #(dword_0+3); this                                 ; +0x74, 0x7ebbc0\nSTR             W0, [X19,#0x1C0]                                       ; +0x78, 0x7ebbc4\nLDR             S1, =0x3E4CCCCD                                        ; +0x7c, 0x7ebbc8\nSTR             Q1, [X29,#0x80+var_30]                                 ; +0x80, 0x7ebbcc\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x84, 0x7ebbd0\nFMOV            S8, #0.5                                               ; +0x88, 0x7ebbd4\nADD             X8, X29, #0x80+var_18                                  ; +0x8c, 0x7ebbd8\nMOV             W22, #2                                                ; +0x90, 0x7ebbdc\nADD             X20, X29, #0x80+var_10                                 ; +0x94, 0x7ebbe0\nBL              _ZN7cocos2d10CCDirector10getWinSizeEv; cocos2d::CCDirector::getWinSize(void) ; +0x98, 0x7ebbe4\nLDR             W0, [X19,#0x1C0]                                       ; +0x9c, 0x7ebbe8\nCMP             W0, #1                                                 ; +0xa0, 0x7ebbec\nADRP            X0, #aFloorline02d00@PAGE; \"floorLine_%02d_001.png\"    ; +0xa4, 0x7ebbf0\nCSINC           W1, W22, WZR, NE; char *                               ; +0xa8, 0x7ebbf4\nADD             X0, X0, #aFloorline02d00@PAGEOFF; \"floorLine_%02d_001.png\" ; +0xac, 0x7ebbf8\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0xb0, 0x7ebbfc\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0xb4, 0x7ebc00\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0xb8, 0x7ebc04\nSTR             X0, [X19,#0x1B0]                                       ; +0xbc, 0x7ebc08\nLDR             X3, [X19]                                              ; +0xc0, 0x7ebc0c\nMOV             W2, #5                                                 ; +0xc4, 0x7ebc10\nMOV             X1, X0                                                 ; +0xc8, 0x7ebc14\nMOV             X0, X19                                                ; +0xcc, 0x7ebc18\nLDR             X3, [X3,#0x1C0]                                        ; +0xd0, 0x7ebc1c\nBLR             X3                                                     ; +0xd4, 0x7ebc20\nLDR             X23, [X19,#0x1B0]                                      ; +0xd8, 0x7ebc24\nLDR             S0, [X29,#0x80+var_18]                                 ; +0xdc, 0x7ebc28\nMOV             X0, X20; this                                          ; +0xe0, 0x7ebc2c\nLDR             Q1, [X29,#0x80+var_30]; float                          ; +0xe4, 0x7ebc30\nFMUL            S0, S0, S8; float                                      ; +0xe8, 0x7ebc34\nLDR             X1, [X23]                                              ; +0xec, 0x7ebc38\nLDR             X24, [X1,#0xB8]                                        ; +0xf0, 0x7ebc3c\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xf4, 0x7ebc40\nMOV             X0, X23                                                ; +0xf8, 0x7ebc44\nMOV             X1, X20                                                ; +0xfc, 0x7ebc48\nBLR             X24                                                    ; +0x100, 0x7ebc4c\nLDR             X23, [X19,#0x1B0]                                      ; +0x104, 0x7ebc50\nFMOV            S0, S8; float                                          ; +0x108, 0x7ebc54\nMOV             X0, X20; this                                          ; +0x10c, 0x7ebc58\nFMOV            S1, #1.0; float                                        ; +0x110, 0x7ebc5c\nLDR             X1, [X23]                                              ; +0x114, 0x7ebc60\nLDR             X24, [X1,#0x118]                                       ; +0x118, 0x7ebc64\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x11c, 0x7ebc68\nMOV             X0, X23                                                ; +0x120, 0x7ebc6c\nMOV             X1, X20                                                ; +0x124, 0x7ebc70\nBLR             X24                                                    ; +0x128, 0x7ebc74\nLDR             X2, [X19,#0x1B0]                                       ; +0x12c, 0x7ebc78\nMOV             W1, W22                                                ; +0x130, 0x7ebc7c\nMOV             X0, X2                                                 ; +0x134, 0x7ebc80\nLDR             X2, [X2]                                               ; +0x138, 0x7ebc84\nLDR             X2, [X2,#0x48]                                         ; +0x13c, 0x7ebc88\nBLR             X2                                                     ; +0x140, 0x7ebc8c\nLDRB            W0, [X19,#0x1B9]                                       ; +0x144, 0x7ebc90\nCBNZ            W0, loc_7EBD04                                         ; +0x148, 0x7ebc94\nLDR             W0, [X19,#0x1C0]                                       ; +0x14c, 0x7ebc98\nCMP             W0, #1                                                 ; +0x150, 0x7ebc9c\nB.LE            loc_7EBCD8                                             ; +0x154, 0x7ebca0\nFMOV            S0, #10.0                                              ; +0x158, 0x7ebca4\nLDR             X1, [X19,#0x1B0]                                       ; +0x15c, 0x7ebca8\nLDR             S1, [X29,#0x80+var_18]                                 ; +0x160, 0x7ebcac\nMOV             X0, X1                                                 ; +0x164, 0x7ebcb0\nFADD            S1, S1, S0                                             ; +0x168, 0x7ebcb4\nLDR             X2, [X1]                                               ; +0x16c, 0x7ebcb8\nLDR             S0, [X1,#0x1B0]                                        ; +0x170, 0x7ebcbc\nLDR             X1, [X2,#0x80]                                         ; +0x174, 0x7ebcc0\nFDIV            S0, S1, S0                                             ; +0x178, 0x7ebcc4\nBLR             X1                                                     ; +0x17c, 0x7ebcc8\nLDR             W0, [X19,#0x1C0]                                       ; +0x180, 0x7ebccc\nCMP             W0, #3                                                 ; +0x184, 0x7ebcd0\nB.EQ            loc_7EBD30                                             ; +0x188, 0x7ebcd4\nLDR             X21, [X21,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x18c, 0x7ebcd8\nLDR             X1, [X29,#0x80+var_8]                                  ; +0x190, 0x7ebcdc\nLDR             X0, [X21]                                              ; +0x194, 0x7ebce0\nCMP             X1, X0                                                 ; +0x198, 0x7ebce4\nB.NE            loc_7EBD4C                                             ; +0x19c, 0x7ebce8\nLDP             X19, X20, [SP,#0x80+var_70]                            ; +0x1a0, 0x7ebcec\nLDP             X21, X22, [SP,#0x80+var_60]                            ; +0x1a4, 0x7ebcf0\nLDP             X23, X24, [SP,#0x80+var_50]                            ; +0x1a8, 0x7ebcf4\nLDR             D8, [SP,#0x80+var_40]                                  ; +0x1ac, 0x7ebcf8\nLDP             X29, X30, [SP+0x80+var_80],#0x80                       ; +0x1b0, 0x7ebcfc\nRET                                                                    ; +0x1b4, 0x7ebd00\nLDR             X2, [X19,#0x1B0]                                       ; +0x1b8, 0x7ebd04\nMOV             X0, #0x302                                             ; +0x1bc, 0x7ebd08\nMOV             X1, #0                                                 ; +0x1c0, 0x7ebd0c\nMOV             X3, #1                                                 ; +0x1c4, 0x7ebd10\nBFXIL           X1, X0, #0, #0x20 ; ' '                                ; +0x1c8, 0x7ebd14\nMOV             X0, X2                                                 ; +0x1cc, 0x7ebd18\nLDR             X2, [X2]                                               ; +0x1d0, 0x7ebd1c\nBFI             X1, X3, #0x20, #0x20 ; ' '                             ; +0x1d4, 0x7ebd20\nLDR             X2, [X2,#0x428]                                        ; +0x1d8, 0x7ebd24\nBLR             X2                                                     ; +0x1dc, 0x7ebd28\nB               loc_7EBC98                                             ; +0x1e0, 0x7ebd2c\nLDR             X1, [X19,#0x1B0]                                       ; +0x1e4, 0x7ebd30\nFMOV            S0, #2.0                                               ; +0x1e8, 0x7ebd34\nMOV             X0, X1                                                 ; +0x1ec, 0x7ebd38\nLDR             X1, [X1]                                               ; +0x1f0, 0x7ebd3c\nLDR             X1, [X1,#0x90]                                         ; +0x1f4, 0x7ebd40\nBLR             X1                                                     ; +0x1f8, 0x7ebd44\nB               loc_7EBCD8                                             ; +0x1fc, 0x7ebd48\nBL              .__stack_chk_fail                                      ; +0x200, 0x7ebd4c", "xrefs": ["GJGroundLayer::init @ 0x7ebe44", "<???> @ 0xa9890"], "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"}