//
// GJGameState::controlTweenAction from 0x880794 to 0x88086c (216 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::controlTriggersWithControlID @ 0x898f08
// > GJBaseGameLayer::controlTriggersInGroup @ 0x8993bc
// > ??> @ 0x50c40
//
// 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
//
void GJGameState::controlTweenAction(GJGameState *a1, int a2, int a3, GJActionCommand a4)
{
__int64 M_nxt; // x3
__int64 *p_m_tweenActions; // x23
std::_Hashtable, std::allocator>, std::__detail::_Select1st, std::equal_to, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits>::size_type v10; // x1
__int64 *i; // x2
M_nxt = (__int64)a1->m_tweenActions._M_h._M_before_begin._M_nxt;
p_m_tweenActions = (__int64 *)&a1->m_tweenActions;
while ( M_nxt )
{
if ( a3 == -1 )
{
if ( *(_DWORD *)(M_nxt + 44) != a2 )
goto LABEL_5;
}
else if ( *(_DWORD *)(M_nxt + 48) != a3 )
{
goto LABEL_5;
}
switch ( a4 )
{
case Stop:
v10 = *(int *)(M_nxt + 8) % a1->m_tweenActions._M_h._M_bucket_count;
for ( i = (__int64 *)a1->m_tweenActions._M_h._M_buckets[v10]; M_nxt != *i; i = (__int64 *)*i )
;
M_nxt = std::_Hashtable,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits>::_M_erase(
p_m_tweenActions,
v10,
i,
(__int64 *)M_nxt);
continue;
case Pause:
*(_BYTE *)(M_nxt + 41) = 1;
M_nxt = *(_QWORD *)M_nxt;
continue;
case Resume:
*(_BYTE *)(M_nxt + 41) = 0;
M_nxt = *(_QWORD *)M_nxt;
continue;
}
LABEL_5:
M_nxt = *(_QWORD *)M_nxt;
}
}