Exemplo n.º 1
0
int MorphEffect::DrawEffectBackground(const Effect *e, int x1, int y1, int x2, int y2, DrawGLUtils::xlVertexColorAccumulator &backgrounds) {
    int head_duration = e->GetSettings().GetInt("E_SLIDER_MorphDuration", 20);
    xlColor start_h;
    xlColor end_h;
    xlColor start_t;
    xlColor end_t;
    GetMorphEffectColors(e, start_h, end_h, start_t, end_t);
    int x_mid = (int)((float)(x2-x1) * (float)head_duration / 100.0) + x1;
    backgrounds.AddHBlendedRectangle(start_h, end_h, x1, y1+1, x_mid, y2-1);
    if(e->GetPaletteSize() <= 4) {
        backgrounds.AddHBlendedRectangle(start_t, end_t, x_mid, y1+4, x2, y2-4);
    }
    else {
        backgrounds.AddHBlendedRectangle(e->GetPalette(), x_mid, y1+4, x2, y2-4, 2);
    }
    return 0;

}
Exemplo n.º 2
0
int ShockwaveEffect::DrawEffectBackground(const Effect *e, int x1, int y1, int x2, int y2,
                                          DrawGLUtils::xlVertexColorAccumulator &backgrounds) {
    backgrounds.AddHBlendedRectangle(e->GetPalette(), x1, y1, x2, y2);
    return 2;
}