//
// SmartTemplateCell::updateBGColor from 0x33a3c0 to 0x33a464 (164 bytes)
//
// 2 xrefs:
// > CustomListView::reloadAll @ 0x33a5ca
// > CustomListView::loadCell @ 0x33bd88
//
// 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 SmartTemplateCell::updateBGColor(SmartTemplateCell *a1, int a2)
{
char v3; // r7
cocos2d::CCLayerColor *m_backgroundLayer; // r0
void (__fastcall *setColor)(cocos2d::CCLayerColor *__hidden, const cocos2d::ccColor3B *); // r3
int v6; // r2
_DWORD v7[3]; // [sp+0h] [bp-Ch] BYREF
v7[0] = a1;
v7[1] = a2;
v3 = a2;
if ( GameLevelManager::sharedState()->m_smartTemplate
&& GameLevelManager::sharedState()->m_smartTemplate->m_nameIndex == a1->m_smartTemplate->m_nameIndex )
{
m_backgroundLayer = a1->m_backgroundLayer;
setColor = m_backgroundLayer->setColor;
LOWORD(v7[0]) = -26906;
v6 = 10;
}
else
{
m_backgroundLayer = a1->m_backgroundLayer;
setColor = m_backgroundLayer->setColor;
if ( (v3 & 1) != 0 )
{
LOWORD(v7[0]) = 29378;
v6 = 62;
}
else
{
LOWORD(v7[0]) = 22689;
v6 = 44;
}
}
BYTE2(v7[0]) = v6;
((void (__fastcall *)(cocos2d::CCLayerColor *, _DWORD *, int))setColor)(m_backgroundLayer, v7, v6);
a1->m_backgroundLayer->setOpacity(a1->m_backgroundLayer, 255);
}