//
// GameObject::getColorFrame from 0x1005a9590 to 0x1005a9682 (242 bytes)
//
// 57 xrefs:
// > GameObject::playDestroyObjectAnim @ 0x10025f250
// > GameObject::perspectiveColorFrame @ 0x100444428
// > GameObject::setupCustomSprites @ 0x100444597
// > GameObject::setupCustomSprites @ 0x10044469f
// > GameObject::setupCustomSprites @ 0x100445158
// > GameObject::setupCustomSprites @ 0x100445195
// > GameObject::setupCustomSprites @ 0x100445461
// > GameObject::setupCustomSprites @ 0x1004456b0
// > GameObject::setupCustomSprites @ 0x100445887
// > GameObject::setupCustomSprites @ 0x100445954
// > GameObject::setupCustomSprites @ 0x100446263
// > GameObject::setupCustomSprites @ 0x100446316
// > GameObject::setupCustomSprites @ 0x100446671
// > GameObject::setupCustomSprites @ 0x1004467eb
// > GameObject::setupCustomSprites @ 0x100448abc
// > GameObject::setupCustomSprites @ 0x1004490df
// > GameObject::setupCustomSprites @ 0x100449692
// > GameObject::setupCustomSprites @ 0x10044afcd
// > GameObject::setupCustomSprites @ 0x10044b1a6
// > GameObject::setupCustomSprites @ 0x10044b240
// > GameObject::setupCustomSprites @ 0x10044bb8b
// > GameObject::setupCustomSprites @ 0x10044bc25
// > GameObject::setupCustomSprites @ 0x10044cb52
// > GameObject::setupCustomSprites @ 0x10044cf32
// > GameObject::setupCustomSprites @ 0x10044cfd7
// > GameObject::setupCustomSprites @ 0x10044d1ed
// > GameObject::setupCustomSprites @ 0x10044d8d9
// > GameObject::setupCustomSprites @ 0x10044e259
// > GameObject::setupCustomSprites @ 0x10044f83f
// > GameObject::setupCustomSprites @ 0x10044fd46
// > GameObject::setupCustomSprites @ 0x10044fe13
// > GameObject::setupCustomSprites @ 0x10044ff0b
// > GameObject::setupCustomSprites @ 0x100450003
// > GameObject::setupCustomSprites @ 0x10045116e
// > GameObject::setupCustomSprites @ 0x1004568b9
// > GameObject::setupCustomSprites @ 0x10045699a
// > GameObject::setupCustomSprites @ 0x100459194
// > GameObject::setupCustomSprites @ 0x100459300
// > GameObject::setupCustomSprites @ 0x100459388
// > GameObject::setupCustomSprites @ 0x100459410
// > GameObject::setupCustomSprites @ 0x1004599eb
// > GameObject::setupCustomSprites @ 0x10045a4d5
// > GameObject::setupCustomSprites @ 0x10045a539
// > GameObject::setupCustomSprites @ 0x10045a607
// > GameObject::setupCustomSprites @ 0x10045a700
// > GameObject::setupCustomSprites @ 0x10045a7f9
// > GameObject::setupCustomSprites @ 0x10045b87d
// > GameObject::setupCustomSprites @ 0x10045b939
// > GameObject::setupCustomSprites @ 0x10045bad7
// > GameObject::setupCustomSprites @ 0x10045bc9a
// > GameObject::setupCustomSprites @ 0x10045bea6
// > GameObject::setupCustomSprites @ 0x10045c16c
// > GameObject::setupCustomSprites @ 0x10045cbe7
// > GameObject::addColorSprite @ 0x1005a4ae9
// > GameObject::addColorSprite @ 0x1005a4e88
// > GameObject::addColorSprite @ 0x1005a4f57
// > GameObject::addColorSprite @ 0x1005a501f
//
// 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
//
size_t *__fastcall GameObject::getColorFrame(size_t *a1, double a2, __int64 a3, __int64 a4)
{
const char *v4; // rdx
const char *data; // r14
size_t v6; // rax
size_t v7; // r15
_BYTE *v8; // r12
size_t v10; // r13
std::string v11[2]; // [rsp+0h] [rbp-40h] BYREF
if ( (*(_BYTE *)a4 & 1) != 0 )
v4 = *(const char **)(a4 + 16);
else
v4 = (const char *)(a4 + 1);
sub_1005A4350(v11, v4, (std::string *)"_001.png", "_color_001.png", a2);
if ( (*(_BYTE *)&v11[0].__r_.__value_.__s.0 & 1) != 0 )
data = v11[0].__r_.__value_.__l.__data_;
else
data = v11[0].__r_.__value_.__s.__data_;
v6 = strlen(data);
if ( v6 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(a2);
v7 = v6;
if ( v6 >= 0x17 )
{
v10 = 26;
if ( (v6 | 7) != 0x17 )
v10 = (v6 | 7) + 1;
v8 = operator new(v10);
a1[2] = (size_t)v8;
*a1 = v10 | 1;
a1[1] = v7;
LABEL_16:
memmove(v8, data, v7);
v8[v7] = 0;
if ( (*(_BYTE *)&v11[0].__r_.__value_.__s.0 & 1) == 0 )
return a1;
goto LABEL_11;
}
*(_BYTE *)a1 = 2 * v6;
v8 = (char *)a1 + 1;
if ( v6 )
goto LABEL_16;
*v8 = 0;
if ( (*(_BYTE *)&v11[0].__r_.__value_.__s.0 & 1) != 0 )
LABEL_11:
operator delete(v11[0].__r_.__value_.__l.__data_);
return a1;
}