// // LevelTools::posForTimeInternal from 0x41ef70 to 0x41f394 (1060 bytes) // // 4 xrefs: // > LevelTools::posForTime @ 0x41f3b4 // > DrawGridLayer::update @ 0x45ea40 // > DrawGridLayer::draw @ 0x465076 // > DrawGridLayer::draw @ 0x4658a0 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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:48:00 +0000 // LevelTools *__fastcall LevelTools::posForTimeInternal( LevelTools *this, float a2, cocos2d::CCArray *a3, LevelTools *a4, bool a5, bool a6, bool a7, int *a8, int a9) { float v12; // s22 float v13; // s19 _DWORD *v14; // r3 float v15; // s16 int v16; // r4 float v17; // s15 float v18; // s24 float v19; // s17 float v20; // s13 int v21; // r5 float v22; // s18 float v23; // s17 float v24; // s21 float v25; // s21 float v26; // s16 int v27; // r1 float v28; // s15 int v29; // r2 bool v30; // r2 int v31; // r2 int v32; // r2 int *v34; // [sp+0h] [bp-5Ch] unsigned int v35; // [sp+4h] [bp-58h] float v36; // [sp+2Ch] [bp-30h] BYREF float v37; // [sp+30h] [bp-2Ch] float v38; // [sp+34h] [bp-28h] BYREF float v39; // [sp+38h] [bp-24h] _BYTE v40[8]; // [sp+3Ch] [bp-20h] BYREF float v41[2]; // [sp+44h] [bp-18h] BYREF float v42[2]; // [sp+4Ch] [bp-10h] BYREF if ( a5 ) v12 = 311.58; else v12 = COERCE_FLOAT(LevelTools::valueForSpeedMod(a4, (int)&_stack_chk_guard)); if ( a3 && cocos2d::CCArray::count(a3) && !a5 ) { v13 = 1.0; flt_D1E008 = 1.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v36, (const cocos2d::CCPoint *)&unk_D2B7A4); *a8 = 0; v14 = *((_DWORD **)a3 + 13); byte_D2B7A1 = 0; byte_D2B7A0 = 0; if ( *v14 ) { v35 = v14[3] + 4 * (*v14 + 0x3FFFFFFF); v15 = 0.0; v34 = (int *)v14[3]; while ( (unsigned int)v34 <= v35 ) { v16 = *v34++; if ( !v16 ) break; v18 = v12 * v13; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, (const cocos2d::CCPoint *)(v16 + 1600)); if ( v41[0] <= 0.0 ) { v19 = 0.0; } else { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, (const cocos2d::CCPoint *)(v16 + 1600)); v19 = v42[0]; } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, (const cocos2d::CCPoint *)(v16 + 1600)); if ( v41[1] <= 0.0 ) { v20 = 0.0; } else { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, (const cocos2d::CCPoint *)(v16 + 1600)); v20 = v42[1]; } v21 = (unsigned __int8)byte_D2B7A0; v22 = v19 - v36; v23 = v20 - v37; if ( byte_D2B7A1 ) { if ( byte_D2B7A0 ) { if ( v23 <= 0.0 ) v23 = 0.0; } else if ( v22 >= 0.0 ) { v22 = 0.0; } } else if ( byte_D2B7A0 ) { if ( v23 >= 0.0 ) v23 = 0.0; } else if ( v22 <= 0.0 ) { v22 = 0.0; } if ( *(_DWORD *)(v16 + 1592) != *a8 ) { v23 = 0.0; v22 = 0.0; } if ( byte_D2B7A0 ) v24 = v23; else v24 = v22; v25 = v15 + (float)(fabsf(v24) / v18); if ( v25 >= a2 ) { v26 = (float)(a2 - v15) * v18; if ( byte_D2B7A0 != byte_D2B7A1 ) v26 = -v26; if ( byte_D2B7A0 ) { v37 = v37 + v26; if ( a6 ) v36 = 0.0; } else { v36 = v36 + v26; if ( a6 ) v37 = 0.0; } goto LABEL_19; } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v38, (const cocos2d::CCPoint *)&unk_D2B7A4); switch ( *(_WORD *)(v16 + 1598) ) { case 0xFFFB: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v40, (const cocos2d::CCPoint *)(v16 + 1700)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, (const cocos2d::CCPoint *)(v16 + 1600)); cocos2d::CCPoint::operator-(v42, v40, v41); cocos2d::CCPoint::operator=(&v38, v42); if ( *(_BYTE *)(v16 + 1689) ) v38 = 0.0; if ( *(_BYTE *)(v16 + 1690) ) v39 = 0.0; break; case 0xFFFC: if ( !*(_BYTE *)(v16 + 1669) ) { v29 = *(_DWORD *)(v16 + 1648); v30 = v29 == 3 || v29 == 4; byte_D2B7A0 = v30; v31 = *(_DWORD *)(v16 + 1652); if ( v31 != 1 ) LOBYTE(v31) = v31 == 3; byte_D2B7A1 = v31; } if ( *(_BYTE *)(v16 + 1668) ) { *a8 = *(_DWORD *)(v16 + 1672); *(_BYTE *)(v16 + 1642) = 1; } break; case 0xFFFD: break; case 0xFFFE: v28 = *(float *)(v16 + 1580); flt_D1E008 = v28; if ( !a7 ) v13 = v28; break; case 0xFFFF: byte_D2B7A1 ^= 1u; break; default: v12 = COERCE_FLOAT(LevelTools::valueForSpeedMod((LevelTools *)*(__int16 *)(v16 + 1598), v27)); break; } v32 = (unsigned __int8)byte_D2B7A0 ^ v21; if ( v21 && !v32 || (v36 = v36 + v22, v21) || v32 ) v37 = v37 + v23; v15 = v25; v36 = v36 + v38; v37 = v37 + v39; } } else { v15 = 0.0; } v17 = (float)((float)(a2 - v15) * v12) * v13; if ( byte_D2B7A1 != byte_D2B7A0 ) v17 = -v17; if ( byte_D2B7A0 ) { v37 = v37 + v17; if ( a6 ) v36 = 0.0; } else { v36 = v36 + v17; if ( a6 ) v37 = 0.0; } LABEL_19: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v42, v36, v37); cocos2d::CCPoint::operator=(v41, v42); cocos2d::CCPoint::CCPoint(this, (const cocos2d::CCPoint *)v41); } else { cocos2d::CCPoint::CCPoint(this, a2 * v12, 0.0); } return this; }
GD Web Decomp Icon

GD Web Decomp

Raw Source