MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / fillColorChannel

Method fillColorChannel

Source/BaseGameLayer.cpp:413–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413void BaseGameLayer::fillColorChannel(std::span<std::string_view> colorString, int id)
414{
415 for (size_t j = 0; j < colorString.size() - 1; j += 2)
416 {
417 switch (GameToolbox::stoi(colorString[j]))
418 {
419 case 1:
420 _colorChannels.insert({id, SpriteColor(ax::Color3B(GameToolbox::stof(colorString[j + 1]), 0, 0), 255, 0)});
421 break;
422 case 2:
423 _colorChannels.at(id)._color.g = GameToolbox::stof(colorString[j + 1]);
424 break;
425 case 3:
426 _colorChannels.at(id)._color.b = GameToolbox::stof(colorString[j + 1]);
427 break;
428 }
429 }
430}
431
432int BaseGameLayer::sectionForPos(float x)
433{

Callers

nothing calls this directly

Calls 3

Color3BClass · 0.85
sizeMethod · 0.80
SpriteColorClass · 0.70

Tested by

no test coverage detected