struct State {
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
    if (!isInputDirty<input_UPD>(ctx))
        return;
    auto tft = getValue<input_DEV>(ctx);
    int x0 = getValue<input_X0>(ctx);
    int y0 = getValue<input_Y0>(ctx);
    int x1 = getValue<input_X2>(ctx);
    int y1 = getValue<input_Y1>(ctx);
    int x2 = getValue<input_X2>(ctx);
    int y2 = getValue<input_Y2>(ctx);
    uint16_t colour = getValue<input_COL>(ctx);
    tft->drawTriangle(x0,y0,x1,y1,x2,y2,colour);
    emitValue<output_DONE>(ctx, 1);
}