MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / Play

Method Play

sources/effects/Animation_Plasma.cpp:97–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95
96
97bool Animation_Plasma::Play(HyperImage& painter)
98{
99 bool ret = true;
100
101 auto mod = start++;
102 for (int y = 0; y < PLASMA_HEIGHT; y++)
103 for (int x = 0; x < PLASMA_WIDTH; x++) {
104 int delta = y * PLASMA_WIDTH;
105 int palIndex = int((plasma[delta + x] + mod) % PAL_LEN) * 3;
106
107 painter.setPen(ColorRgb(pal[palIndex], pal[palIndex + 1], pal[palIndex + 2]));
108 painter.drawPoint(x, y);
109 }
110 return ret;
111}
112
113
114bool Animation_Plasma::isRegistered = hyperhdr::effects::REGISTER_EFFECT(Animation_Plasma::getDefinition());

Callers

nothing calls this directly

Calls 3

ColorRgbClass · 0.85
setPenMethod · 0.80
drawPointMethod · 0.80

Tested by

no test coverage detected