// // KeybindingsLayer::buildControllerGlyph from 0x1403d6350 to 0x1403d674c (1020 bytes) // // 6 xrefs: // > KeybindingsLayer::buildContentForTab @ 0x1403d70c9 // > ControllerInputNode::refreshVisuals @ 0x14044824d // > @ 0x1408c3984 // > @ 0x1408c39e0 // > @ 0x1409249ec // > @ 0x1409249f8 // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:31:37 +0000 // struct cocos2d::CCSprite *__fastcall KeybindingsLayer::buildControllerGlyph(int a1, bool *a2) { bool v2; // al int v3; // edx struct cocos2d::CCSprite *result; // rax float v5; // xmm8_4 float v6; // xmm9_4 const char *v7; // rcx struct cocos2d::CCSprite *v8; // rdi struct cocos2d::CCSprite *v9; // rsi const struct cocos2d::CCSize *v10; // rax float v11; // xmm6_4 __int64 v12; // rbx __int64 v13; // rax float v14; // [rsp+78h] [rbp+10h] BYREF float v15; // [rsp+7Ch] [rbp+14h] char v16; // [rsp+80h] [rbp+18h] BYREF v2 = (unsigned int)(a1 - 1001) <= 0x2B && (a1 & 1) == 0; *a2 = v2; v3 = a1 - 1; if ( !v2 ) v3 = a1; switch ( v3 ) { case 1001: result = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_A_001.png"); break; case 1003: result = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_B_001.png"); break; case 1005: result = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_Y_001.png"); break; case 1007: result = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_X_001.png"); break; case 1009: result = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_Start_001.png"); break; case 1011: result = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_Back_001.png"); break; case 1013: result = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_RB_001.png"); break; case 1015: result = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_LB_001.png"); break; case 1017: result = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_RT_001.png"); break; case 1019: result = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_LT_001.png"); break; case 1021: result = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_DPad_Up_001.png"); break; case 1023: result = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_DPad_Down_001.png"); break; case 1025: result = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_DPad_Left_001.png"); break; case 1027: result = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_DPad_Right_001.png"); break; default: v5 = 0.0; v6 = 0.0; switch ( v3 ) { case 1029: v7 = "controllerBtn_LThumb_001.png"; goto LABEL_25; case 1031: v7 = "controllerBtn_LThumb_001.png"; goto LABEL_33; case 1033: v5 = -1.0; v7 = "controllerBtn_LThumb_001.png"; goto LABEL_34; case 1035: v7 = "controllerBtn_LThumb_001.png"; goto LABEL_27; case 1037: v7 = "controllerBtn_RThumb_001.png"; LABEL_25: v6 = 1.0; goto LABEL_34; case 1039: v7 = "controllerBtn_RThumb_001.png"; LABEL_33: v6 = -1.0; goto LABEL_34; case 1041: v5 = -1.0; v7 = "controllerBtn_RThumb_001.png"; goto LABEL_34; case 1043: v7 = "controllerBtn_RThumb_001.png"; LABEL_27: v5 = 1.0; LABEL_34: v8 = cocos2d::CCSprite::createWithSpriteFrameName(v7); if ( !v8 ) goto LABEL_38; v9 = cocos2d::CCSprite::createWithSpriteFrameName("edit_leftBtn_001.png"); if ( v9 ) { v10 = (const struct cocos2d::CCSize *)(*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v8 + 320LL))(v8); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v14, v10); v11 = (float)((float)(v15 * 2.0) / 26.0) + (float)(v14 * 0.30000001); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v9 + 352LL))(v9); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v9 + 160LL))(v9); v12 = *(_QWORD *)v9; cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v16, (float)(v11 * v5) + (float)(v14 * 0.5), (float)(v11 * v6) + (float)(v15 * 0.5)); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v12 + 184))(v9, v13); (*(void (__fastcall **)(struct cocos2d::CCSprite *, struct cocos2d::CCSprite *, __int64))(*(_QWORD *)v8 + 456LL))( v8, v9, 1); } result = v8; break; default: LABEL_38: result = nullptr; break; } break; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source