//
// CustomizeObjectLayer::onNextColorChannel from 0x983db0 to 0x983e44 (148 bytes)
//
// 3 xrefs:
// > ??> @ 0x57958
// > CustomizeObjectLayer::init @ 0x98635c
// > ??> @ 0x1541ff0
//
// This function is hookable on this platform (idp: arm, 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 12:57:52 +0000
//
__int64 __fastcall CustomizeObjectLayer::onNextColorChannel(CustomizeObjectLayer *this, cocos2d::CCObject *a2)
{
__int64 v3; // x0
unsigned int NextColorChannel; // w20
int v5; // w21
ButtonSprite *ButtonByTag; // x0
v3 = GameManager::sharedState(this);
NextColorChannel = LevelEditorLayer::getNextColorChannel(*(LevelEditorLayer **)(v3 + 552));
v5 = NextColorChannel;
if ( NextColorChannel - 10 <= 0x3DD )
{
*((_DWORD *)this + 187) = NextColorChannel;
*((_BYTE *)this + 922) = 1;
v5 = 1008;
CustomizeObjectLayer::updateCustomColorLabels((ButtonSprite **)this);
*((_BYTE *)this + 922) = 0;
}
CustomizeObjectLayer::updateSelected(this, NextColorChannel);
ButtonByTag = (ButtonSprite *)CustomizeObjectLayer::getButtonByTag((cocos2d::CCArray **)this, v5);
CustomizeObjectLayer::highlightSelected((cocos2d::CCArray **)this, ButtonByTag);
CustomizeObjectLayer::updateColorSprite(this);
return CustomizeObjectLayer::updateChannelLabel(this, (GJSpecialColorSelect *)NextColorChannel);
}