//
// GJGameLevel::levelHasDiamonds from 0x14026aef0 to 0x14026af69 (121 bytes)
//
// 5 xrefs:
// > LevelInfoLayer::setupLevelInfo @ 0x14042062d
// > LevelInfoLayer::updateLabelValues @ 0x140425c4a
// > PlayLayer::levelComplete @ 0x140506cc6
// > PlayLayer::destroyPlayer @ 0x140512d33
// > ??> @ 0x14091ca18
//
// 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:28:51 +0000
//
// Hidden C++ exception states: #wind=1
bool __fastcall GJGameLevel::levelHasDiamonds(__int64 a1)
{
int v1; // ebx
__int64 v2; // rcx
void *v4; // [rsp+30h] [rbp+8h]
if ( *(_BYTE *)(a1 + 721) )
return 1;
v1 = *(_DWORD *)(a1 + 992) - *(_DWORD *)(a1 + 996);
if ( v1 <= 0 )
return 0;
v2 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v4 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v4);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v2 = qword_14090BFE0;
}
return !(unsigned __int8)GameStatsManager::isDailyRecall(v2, (unsigned int)v1);
}