// // GameObject::createWithKey from 0x100254250 to 0x1002549c4 (1908 bytes) // // 6 xrefs: // > PlayLayer::setupHasCompleted @ 0x10011710c // > GJBaseGameLayer::createPlayerCollisionBlock @ 0x1001eaa84 // > GameObject::objectFromVector @ 0x10025e180 // > LevelEditorLayer::createObject @ 0x10035a0d8 // > LevelEditorLayer::copyObjectState @ 0x1003639e8 // > EditorUI::getCreateBtn @ 0x1003ea278 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // GameObject *__fastcall GameObject::createWithKey(int a1) { ObjectToolbox *v2; // x0 const char *v3; // x0 char v4; // w8 __int64 v5; // x8 GameObject *result; // x0 char v7; // w8 unsigned int v8; // w8 __int64 v9; // x8 __int64 v10; // x8 __int64 v11; // x8 char v12; // w8 char v13; // w8 int v14; // w8 bool v15; // w1 cocos2d::CCTextureCache *v16; // x20 GameManager *v17; // x21 GameManager *v18; // x0 const char *FontTexture; // x0 cocos2d::CCTexture2D *v20; // x0 v2 = ObjectToolbox::sharedState(); v3 = ObjectToolbox::intKeyToFrame(v2, a1); if ( !a1 || !*v3 ) return nullptr; if ( a1 > 2222 ) { if ( a1 > 4210 ) { if ( (unsigned int)(a1 - 4401) < 0x8B ) goto LABEL_19; if ( a1 == 4211 || a1 == 4300 ) goto LABEL_111; goto LABEL_127; } if ( a1 > 3118 ) { if ( a1 > 3599 ) { switch ( a1 ) { case 3600: result = EndTriggerGameObject::create(); goto LABEL_112; case 3601: case 3606: case 3609: case 3612: case 3618: case 3640: case 3662: goto LABEL_19; case 3602: case 3603: result = SFXTriggerGameObject::create(v3); goto LABEL_112; case 3604: result = EventLinkTrigger::create(); goto LABEL_112; case 3605: LABEL_130: result = SongTriggerGameObject::create(v3); goto LABEL_112; case 3607: result = SequenceTriggerGameObject::create(); goto LABEL_112; case 3608: result = SpawnParticleGameObject::create(); goto LABEL_112; case 3613: result = UISettingsGameObject::create(); goto LABEL_112; case 3614: case 3615: case 3617: result = TimerTriggerGameObject::create(v3); goto LABEL_112; case 3619: case 3620: case 3641: result = ItemTriggerGameObject::create(v3); goto LABEL_112; case 3642: result = AudioLineGuideGameObject::create(); goto LABEL_112; case 3643: LABEL_52: result = RingObject::create(v3); result->m_classType = Effect; goto LABEL_113; case 3645: LABEL_131: result = ForceBlockGameObject::create(v3); goto LABEL_112; case 3655: result = ObjectControlGameObject::create(); goto LABEL_112; case 3660: case 3661: result = AdvancedFollowEditObject::create(v3); goto LABEL_112; default: goto LABEL_127; } } if ( a1 > 3481 ) { if ( (unsigned int)(a1 - 3482) <= 0xB && ((1 << (a1 + 102)) & 0xC07) != 0 ) goto LABEL_111; } else if ( (unsigned int)(a1 - 3119) < 3 || (unsigned int)(a1 - 3303) < 2 || a1 == 3219 ) { goto LABEL_111; } goto LABEL_127; } if ( a1 <= 2693 ) { if ( (unsigned int)(a1 - 2605) <= 0x19 && ((1 << (a1 - 45)) & 0x3000001) != 0 || a1 == 2223 || a1 == 2246 ) goto LABEL_111; goto LABEL_127; } switch ( a1 ) { case 2864: case 2865: case 2867: case 2868: case 2869: case 2870: case 2871: case 2872: case 2873: case 2874: case 2875: case 2876: case 2877: case 2878: case 2879: case 2880: case 2881: case 2882: case 2883: case 2884: case 2885: case 2886: case 2887: case 2888: case 2889: case 2890: case 2891: case 2892: case 2893: case 2894: case 3000: case 3001: case 3002: goto LABEL_111; case 2866: case 2901: case 2926: case 2999: case 3005: goto LABEL_19; case 2895: case 2896: case 2897: result = SmartGameObject::create(v3); break; case 2898: case 2906: case 2908: case 2918: case 2927: case 2928: case 2929: case 2930: case 2931: case 2932: case 2933: case 2934: case 2935: case 2936: case 2937: case 2938: case 2939: case 2940: case 2941: case 2942: case 2943: case 2944: case 2945: case 2946: case 2947: case 2948: case 2949: case 2950: case 2951: case 2952: case 2953: case 2954: case 2955: case 2956: case 2957: case 2958: case 2959: case 2960: case 2961: case 2962: case 2963: case 2964: case 2965: case 2966: case 2967: case 2968: case 2969: case 2970: case 2971: case 2972: case 2973: case 2974: case 2975: case 2976: case 2977: case 2978: case 2979: case 2980: case 2981: case 2982: case 2983: case 2984: case 2985: case 2986: case 2987: case 2988: case 2989: case 2990: case 2991: case 2992: case 2993: case 2994: case 2995: case 2996: case 2997: case 2998: case 3003: case 3025: case 3026: case 3028: goto LABEL_127; case 2899: result = GameOptionsTrigger::create(v3); break; case 2900: result = RotateGameplayGameObject::create(); break; case 2902: case 3027: goto LABEL_115; case 2903: result = GradientTriggerObject::create(); break; case 2904: case 2905: case 2907: case 2909: case 2910: case 2911: case 2912: case 2913: case 2914: case 2915: case 2916: case 2917: case 2919: case 2920: case 2921: case 2922: case 2923: case 2924: result = ShaderGameObject::create(v3); break; case 2925: LABEL_108: result = CameraTriggerGameObject::create(v3); break; case 3004: goto LABEL_99; case 3006: case 3007: case 3008: case 3009: case 3010: case 3011: case 3012: case 3013: case 3014: case 3015: case 3017: case 3018: case 3019: case 3020: case 3021: case 3023: case 3024: goto LABEL_64; case 3016: result = AdvancedFollowTriggerObject::create(v3); break; case 3022: v15 = 1; goto LABEL_116; case 3029: case 3030: case 3031: result = ArtTriggerGameObject::create(v3); break; case 3032: result = KeyframeGameObject::create(); break; case 3033: result = KeyframeAnimTriggerObject::create(); break; default: if ( a1 != 2694 ) goto LABEL_127; goto LABEL_111; } goto LABEL_112; } if ( a1 > 1515 ) { if ( a1 > 1911 ) { switch ( a1 ) { case 1931: case 1933: case 1935: case 2066: goto LABEL_19; case 1932: result = PlayerControlGameObject::create(); goto LABEL_112; case 1934: goto LABEL_130; case 1936: case 1937: case 1938: case 1939: case 2020: case 2021: case 2022: case 2023: case 2024: case 2025: case 2026: case 2027: case 2028: case 2029: case 2030: case 2031: case 2032: case 2033: case 2034: case 2035: case 2036: case 2037: case 2038: case 2039: case 2040: case 2041: case 2042: case 2043: case 2044: case 2045: case 2048: case 2049: case 2050: case 2051: case 2052: case 2053: case 2054: goto LABEL_111; case 1940: case 1941: case 1942: case 1943: case 1944: case 1945: case 1946: case 1947: case 1948: case 1949: case 1950: case 1951: case 1952: case 1953: case 1954: case 1955: case 1956: case 1957: case 1958: case 1959: case 1960: case 1961: case 1962: case 1963: case 1964: case 1965: case 1966: case 1967: case 1968: case 1969: case 1970: case 1971: case 1972: case 1973: case 1974: case 1975: case 1976: case 1977: case 1978: case 1979: case 1980: case 1981: case 1982: case 1983: case 1984: case 1985: case 1986: case 1987: case 1988: case 1989: case 1990: case 1991: case 1992: case 1993: case 1994: case 1995: case 1996: case 1997: case 1998: case 1999: case 2000: case 2001: case 2002: case 2003: case 2004: case 2005: case 2006: case 2007: case 2008: case 2009: case 2010: case 2011: case 2013: case 2014: case 2017: case 2018: case 2019: case 2056: case 2057: case 2058: case 2059: case 2060: case 2061: goto LABEL_127; case 2012: goto LABEL_94; case 2015: case 2016: case 2062: goto LABEL_108; case 2046: case 2047: case 2055: result = SpecialAnimGameObject::create(v3); goto LABEL_112; case 2063: result = CheckpointGameObject::create(); goto LABEL_112; case 2064: goto LABEL_115; case 2065: result = ParticleGameObject::create(); goto LABEL_112; case 2067: result = TransformTriggerGameObject::create(v3); goto LABEL_112; case 2068: result = RandTriggerGameObject::create(); goto LABEL_112; case 2069: goto LABEL_131; default: if ( (unsigned int)(a1 - 1912) > 5 ) goto LABEL_127; v14 = 1 << (a1 - 120); if ( (v14 & 0x23) != 0 ) goto LABEL_19; if ( (v14 & 0x14) != 0 ) goto LABEL_108; goto LABEL_64; } } if ( a1 <= 1696 ) { switch ( a1 ) { case 1582: case 1583: case 1591: case 1592: case 1593: case 1618: case 1619: case 1620: goto LABEL_111; case 1584: goto LABEL_94; case 1585: case 1587: case 1589: case 1595: case 1598: case 1612: case 1613: case 1614: goto LABEL_19; case 1586: case 1588: case 1590: case 1596: case 1597: case 1599: case 1600: case 1601: case 1602: case 1603: case 1604: case 1605: case 1606: case 1607: case 1608: case 1609: case 1610: case 1617: goto LABEL_127; case 1594: goto LABEL_52; case 1611: goto LABEL_122; case 1615: result = LabelGameObject::create(); goto LABEL_112; case 1616: result = TriggerControlGameObject::create(v3); goto LABEL_112; default: if ( (unsigned int)(a1 - 1516) > 0xC ) goto LABEL_127; if ( ((1 << (a1 + 20)) & 0x1FED) != 0 ) goto LABEL_111; if ( a1 != 1520 ) goto LABEL_127; goto LABEL_19; } } v4 = a1 - 19; if ( (unsigned int)(a1 - 1811) <= 0x31 ) { if ( ((1LL << v4) & 0x2FFC0F0F00000LL) != 0 ) goto LABEL_111; if ( ((1LL << v4) & 0x10000000401BELL) != 0 ) goto LABEL_19; if ( ((1LL << v4) & 0x41) != 0 ) { LABEL_122: result = CountTriggerGameObject::create(v3); goto LABEL_112; } } v5 = (unsigned int)(a1 - 1697); if ( (unsigned int)v5 <= 0x3A ) { if ( ((1LL << ((unsigned __int8)a1 + 95)) & 0x8000E000003F07LL) == 0 ) { if ( ((1LL << ((unsigned __int8)a1 + 95)) & 0x40000000000080LL) != 0 ) { result = DashRingObject::create(v3); goto LABEL_112; } if ( v5 != 58 ) goto LABEL_127; LABEL_19: result = EffectGameObject::create(v3); goto LABEL_112; } LABEL_111: result = EnhancedGameObject::create(v3); goto LABEL_112; } LABEL_127: result = GameObject::createWithFrame(v3); goto LABEL_112; } if ( a1 <= 374 ) { if ( a1 <= 136 ) { if ( a1 > 44 ) { v11 = (unsigned int)(a1 - 67); if ( (unsigned int)v11 <= 0x2C ) { if ( ((1LL << ((unsigned __int8)a1 - 67)) & 0xC07C0000LL) != 0 ) goto LABEL_111; if ( ((1LL << ((unsigned __int8)a1 - 67)) & 0x104500000001LL) != 0 ) goto LABEL_19; if ( v11 == 17 ) goto LABEL_99; } if ( (unsigned int)(a1 - 55) >= 5 ) { if ( (unsigned int)(a1 - 45) < 3 ) goto LABEL_19; goto LABEL_127; } } else { if ( a1 > 28 ) { if ( a1 <= 31 ) { if ( (unsigned int)(a1 - 29) >= 2 ) { result = StartPosObject::create(); goto LABEL_112; } goto LABEL_19; } if ( (unsigned int)(a1 - 32) < 2 || a1 == 35 ) goto LABEL_19; if ( a1 != 36 ) goto LABEL_127; goto LABEL_99; } if ( (unsigned int)(a1 - 22) >= 7 ) { if ( (unsigned int)(a1 - 10) < 4 ) goto LABEL_19; goto LABEL_127; } } LABEL_64: result = EnterEffectObject::create(v3); goto LABEL_112; } if ( a1 > 199 ) { if ( (unsigned int)(a1 - 200) < 4 ) goto LABEL_19; if ( (unsigned int)(a1 - 222) < 3 ) goto LABEL_111; v8 = a1 - 286; goto LABEL_89; } v10 = (unsigned int)(a1 - 137); if ( (unsigned int)v10 > 0x33 ) goto LABEL_127; if ( ((1LL << ((unsigned __int8)a1 + 119)) & 0xFF800000E0007LL) != 0 ) goto LABEL_111; if ( ((1LL << ((unsigned __int8)a1 + 119)) & 0x28) != 0 ) goto LABEL_19; if ( v10 != 4 ) goto LABEL_127; LABEL_99: result = RingObject::create(v3); goto LABEL_112; } if ( a1 > 996 ) { if ( a1 > 1267 ) { if ( a1 > 1345 ) { if ( a1 != 1346 ) { if ( a1 == 1347 ) goto LABEL_19; goto LABEL_127; } goto LABEL_150; } v12 = a1 + 5; if ( (unsigned int)(a1 - 1275) > 0x3B ) goto LABEL_79; if ( ((1LL << v12) & 0xB40000000000001LL) != 0 ) goto LABEL_19; if ( ((1LL << v12) & 0x30000000000000LL) != 0 ) goto LABEL_94; if ( ((1LL << v12) & 0x480000000000000LL) == 0 ) { LABEL_79: if ( a1 == 1268 ) { result = SpawnTriggerGameObject::create(); goto LABEL_112; } goto LABEL_127; } } else { v9 = (unsigned int)(a1 - 1006); if ( (unsigned int)v9 > 0x37 ) goto LABEL_49; if ( ((1LL << ((unsigned __int8)a1 + 18)) & 0xFFF0000000E000LL) != 0 ) goto LABEL_111; if ( ((1LL << ((unsigned __int8)a1 + 18)) & 0x80000000003LL) != 0 ) goto LABEL_19; if ( v9 != 16 ) { LABEL_49: if ( (unsigned int)(a1 - 997) < 4 ) goto LABEL_111; goto LABEL_127; } } goto LABEL_99; } if ( a1 <= 739 ) { if ( (unsigned int)(a1 - 375) <= 0x18 && ((1 << (a1 - 119)) & 0x1F8000F) != 0 || (unsigned int)(a1 - 675) < 6 ) goto LABEL_111; if ( a1 == 660 ) goto LABEL_19; goto LABEL_127; } if ( a1 > 900 ) { v13 = a1 + 109; if ( (unsigned int)(a1 - 915) <= 9 ) { if ( ((1 << v13) & 0x360) != 0 ) goto LABEL_111; if ( ((1 << v13) & 0x18) != 0 ) { LABEL_94: result = AnimatedGameObject::create(a1); goto LABEL_112; } if ( a1 == 915 ) goto LABEL_19; } if ( a1 != 901 ) { if ( a1 != 914 ) goto LABEL_127; v16 = cocos2d::CCTextureCache::sharedTextureCache(); v17 = GameManager::sharedState(); v18 = GameManager::sharedState(); FontTexture = GameManager::getFontTexture(v17, v18->m_loadedFont); v20 = cocos2d::CCTextureCache::addImage(v16, FontTexture, 0); result = TextGameObject::create(v20); goto LABEL_112; } LABEL_150: result = EnhancedTriggerObject::create(v3); goto LABEL_112; } v7 = a1 + 28; if ( (unsigned int)(a1 - 740) > 9 ) goto LABEL_32; if ( ((1 << v7) & 7) != 0 ) goto LABEL_111; if ( ((1 << v7) & 0x30) != 0 ) goto LABEL_19; if ( ((1 << v7) & 0x280) == 0 ) { LABEL_32: v8 = a1 - 899; LABEL_89: if ( v8 < 2 ) goto LABEL_19; goto LABEL_127; } LABEL_115: v15 = 0; LABEL_116: result = TeleportPortalObject::create(v3, v15); LABEL_112: if ( result ) { LABEL_113: result->m_objectID = a1; if ( result->m_unk390 == 7 ) result->m_unk390 = result->m_objectType; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source