{"type": "func", "start": 4301172592, "end": 4301173025, "name": "GJGroundLayer::createLine", "pseudocode": "// \n// GJGroundLayer::createLine from 0x1005eaf70 to 0x1005eb121 (433 bytes)\n// \n// 1 xrefs:\n// > GJGroundLayer::init @ 0x1005eab02\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; // rdi\n  int v4; // ecx\n  int v5; // edx\n  cocos2d::CCString *v6; // rax\n  const char *CString; // rax\n  cocos2d::CCSprite *v8; // rax\n  cocos2d::CCSprite *v9; // r14\n  cocos2d::CCSprite *v10; // r14\n  char v11; // [rsp+0h] [rbp-30h]\n  float v12[2]; // [rsp+4h] [rbp-2Ch] BYREF\n  float v13; // [rsp+Ch] [rbp-24h] BYREF\n  float v14; // [rsp+14h] [rbp-1Ch]\n  double v15; // 0:xmm0_8.8\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  v4 = 1;\n  if ( a2 >= 2 )\n    v4 = a2;\n  v5 = 3;\n  if ( v4 < 3 )\n    v5 = v4;\n  v14 = flt_1008219C0[a2 >= 2];\n  a1->m_lineType = v5;\n  cocos2d::CCDirector::sharedDirector();\n  *(cocos2d::CCSize *)&v15 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v13);\n  v6 = (cocos2d::CCString *)sub_1007AB580(\"floorLine_%02d_001.png\", v11);\n  CString = cocos2d::CCString::getCString(v6);\n  v8 = cocos2d::CCSprite::createWithSpriteFrameName(CString);\n  a1->m_lineSprite = v8;\n  ((void (__fastcall *)(GJGroundLayer *, cocos2d::CCSprite *, __int64, double))a1->addChild_0)(a1, v8, 5, v15);\n  v9 = a1->m_lineSprite;\n  sub_10028CBE0(v12, v13 * 0.5, v14);\n  ((void (__fastcall *)(cocos2d::CCSprite *, float *))v9->setPosition)(v9, v12);\n  v10 = a1->m_lineSprite;\n  sub_10028CBE0(v12, 0.5, 1.0);\n  ((void (__fastcall *)(cocos2d::CCSprite *, float *))v10->setAnchorPoint)(v10, v12);\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)(v13 + 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 0x1005eaf70 to 0x1005eb121 (433 bytes)\n; \n; 1 xrefs:\n; > GJGroundLayer::init @ 0x1005eab02\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    rbp                                                            ; +0x0, 0x1005eaf70\nmov     rbp, rsp                                                       ; +0x1, 0x1005eaf71\npush    r15                                                            ; +0x4, 0x1005eaf74\npush    r14                                                            ; +0x6, 0x1005eaf76\npush    rbx                                                            ; +0x8, 0x1005eaf78\nsub     rsp, 18h                                                       ; +0x9, 0x1005eaf79\nmov     r14d, esi                                                      ; +0xd, 0x1005eaf7d\nmov     rbx, rdi                                                       ; +0x10, 0x1005eaf80\nmov     rdi, [rdi+1B0h]                                                ; +0x13, 0x1005eaf83\ntest    rdi, rdi                                                       ; +0x1a, 0x1005eaf8a\njz      short loc_1005EAFA3                                            ; +0x1d, 0x1005eaf8d\nmov     rax, [rdi]                                                     ; +0x1f, 0x1005eaf8f\ncall    qword ptr [rax+1F8h]                                           ; +0x22, 0x1005eaf92\nmov     qword ptr [rbx+1B0h], 0                                        ; +0x28, 0x1005eaf98\nxor     eax, eax                                                       ; +0x33, 0x1005eafa3\ncmp     r14d, 2                                                        ; +0x35, 0x1005eafa5\nsetnl   al                                                             ; +0x39, 0x1005eafa9\nmov     ecx, 1                                                         ; +0x3c, 0x1005eafac\ncmovge  ecx, r14d                                                      ; +0x41, 0x1005eafb1\ncmp     ecx, 3                                                         ; +0x45, 0x1005eafb5\nmov     edx, 3                                                         ; +0x48, 0x1005eafb8\ncmovl   edx, ecx                                                       ; +0x4d, 0x1005eafbd\nlea     rcx, flt_1008219C0                                             ; +0x50, 0x1005eafc0\nmovss   xmm0, dword ptr [rcx+rax*4]                                    ; +0x57, 0x1005eafc7\nmovss   [rbp+var_1C], xmm0                                             ; +0x5c, 0x1005eafcc\nmov     [rbx+1C0h], edx                                                ; +0x61, 0x1005eafd1\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x67, 0x1005eafd7\nlea     rdi, [rbp+var_24]                                              ; +0x6c, 0x1005eafdc\nmov     rsi, rax                                                       ; +0x70, 0x1005eafe0\ncall    cocos2d__CCDirector__getWinSize                                ; +0x73, 0x1005eafe3\nxor     esi, esi                                                       ; +0x78, 0x1005eafe8\ncmp     dword ptr [rbx+1C0h], 1                                        ; +0x7a, 0x1005eafea\nsetnz   sil                                                            ; +0x81, 0x1005eaff1\ninc     esi                                                            ; +0x85, 0x1005eaff5\nlea     rdi, aFloorline02d00; \"floorLine_%02d_001.png\"                 ; +0x87, 0x1005eaff7\nxor     eax, eax                                                       ; +0x8e, 0x1005eaffe\ncall    sub_1007AB580                                                  ; +0x90, 0x1005eb000\nmov     rdi, rax                                                       ; +0x95, 0x1005eb005\ncall    cocos2d__CCString__getCString                                  ; +0x98, 0x1005eb008\nmov     rdi, rax                                                       ; +0x9d, 0x1005eb00d\ncall    cocos2d__CCSprite__createWithSpriteFrameName                   ; +0xa0, 0x1005eb010\nmov     [rbx+1B0h], rax                                                ; +0xa5, 0x1005eb015\nmov     rcx, [rbx]                                                     ; +0xac, 0x1005eb01c\nmov     rdi, rbx                                                       ; +0xaf, 0x1005eb01f\nmov     rsi, rax                                                       ; +0xb2, 0x1005eb022\nmov     edx, 5                                                         ; +0xb5, 0x1005eb025\ncall    qword ptr [rcx+1C0h]                                           ; +0xba, 0x1005eb02a\nmov     r14, [rbx+1B0h]                                                ; +0xc0, 0x1005eb030\nmovss   xmm0, [rbp+var_24]                                             ; +0xc7, 0x1005eb037\nmulss   xmm0, cs:dword_100814FA8                                       ; +0xcc, 0x1005eb03c\nlea     r15, [rbp+var_2C]                                              ; +0xd4, 0x1005eb044\nmov     rdi, r15                                                       ; +0xd8, 0x1005eb048\nmovss   xmm1, [rbp+var_1C]                                             ; +0xdb, 0x1005eb04b\ncall    sub_10028CBE0                                                  ; +0xe0, 0x1005eb050\nmov     rax, [r14]                                                     ; +0xe5, 0x1005eb055\nmov     rdi, r14                                                       ; +0xe8, 0x1005eb058\nmov     rsi, r15                                                       ; +0xeb, 0x1005eb05b\ncall    qword ptr [rax+0B8h]                                           ; +0xee, 0x1005eb05e\nmov     r14, [rbx+1B0h]                                                ; +0xf4, 0x1005eb064\nmovss   xmm1, cs:alpha                                                 ; +0xfb, 0x1005eb06b\nmov     rdi, r15                                                       ; +0x103, 0x1005eb073\nmovss   xmm0, cs:dword_100814FA8                                       ; +0x106, 0x1005eb076\ncall    sub_10028CBE0                                                  ; +0x10e, 0x1005eb07e\nmov     rax, [r14]                                                     ; +0x113, 0x1005eb083\nmov     rdi, r14                                                       ; +0x116, 0x1005eb086\nmov     rsi, r15                                                       ; +0x119, 0x1005eb089\ncall    qword ptr [rax+118h]                                           ; +0x11c, 0x1005eb08c\nmov     rdi, [rbx+1B0h]                                                ; +0x122, 0x1005eb092\nmov     rax, [rdi]                                                     ; +0x129, 0x1005eb099\nmov     esi, 2                                                         ; +0x12c, 0x1005eb09c\ncall    qword ptr [rax+48h]                                            ; +0x131, 0x1005eb0a1\ncmp     byte ptr [rbx+1B9h], 1                                         ; +0x134, 0x1005eb0a4\njnz     short loc_1005EB0C7                                            ; +0x13b, 0x1005eb0ab\nmov     rdi, [rbx+1B0h]                                                ; +0x13d, 0x1005eb0ad\nmov     rax, [rdi]                                                     ; +0x144, 0x1005eb0b4\nmov     rsi, 100000302h                                                ; +0x147, 0x1005eb0b7\ncall    qword ptr [rax+428h]                                           ; +0x151, 0x1005eb0c1\ncmp     dword ptr [rbx+1C0h], 2                                        ; +0x157, 0x1005eb0c7\njl      short loc_1005EB116                                            ; +0x15e, 0x1005eb0ce\nmovss   xmm0, [rbp+var_24]                                             ; +0x160, 0x1005eb0d0\naddss   xmm0, cs:dword_100814FEC                                       ; +0x165, 0x1005eb0d5\nmov     rdi, [rbx+1B0h]                                                ; +0x16d, 0x1005eb0dd\ndivss   xmm0, dword ptr [rdi+1B0h]                                     ; +0x174, 0x1005eb0e4\nmov     rax, [rdi]                                                     ; +0x17c, 0x1005eb0ec\ncall    qword ptr [rax+80h]                                            ; +0x17f, 0x1005eb0ef\ncmp     dword ptr [rbx+1C0h], 3                                        ; +0x185, 0x1005eb0f5\njnz     short loc_1005EB116                                            ; +0x18c, 0x1005eb0fc\nmov     rdi, [rbx+1B0h]                                                ; +0x18e, 0x1005eb0fe\nmov     rax, [rdi]                                                     ; +0x195, 0x1005eb105\nmovss   xmm0, cs:width                                                 ; +0x198, 0x1005eb108\ncall    qword ptr [rax+90h]                                            ; +0x1a0, 0x1005eb110\nadd     rsp, 18h                                                       ; +0x1a6, 0x1005eb116\npop     rbx                                                            ; +0x1aa, 0x1005eb11a\npop     r14                                                            ; +0x1ab, 0x1005eb11b\npop     r15                                                            ; +0x1ad, 0x1005eb11d\npop     rbp                                                            ; +0x1af, 0x1005eb11f\nretn                                                                   ; +0x1b0, 0x1005eb120", "xrefs": ["GJGroundLayer::init @ 0x1005eab02"], "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"}