use_script("utils.lua");
use_script("rotate.lua");

local templ = vsp_from_assets("templates/oilRefinery/oilRefinery.vsp");
local templLight = vsp_from_assets("templates/oilRefinery/oilRefineryLight.vsp");

for side = 0, 3 do
    local stateName = "input" .. get_side_name(side);
    local colormap = rotate_sprite(templ, side);

    local biasmap = vsp_clone(colormap);
    local bias_values = {};
    bias_values[color_from_rgb(0xBF, 0xBF, 0xBF)] = color_from_rgb(0x00, 0x00, 0x05);
    vsp_color_remap_with_default(biasmap, bias_values, 0);

    local lightspecmap = rotate_sprite(templLight, side);

    export_frame(stateName, {
        colormap = colormap,
        biasmap = biasmap,
        lightspecmap = lightspecmap,
    })
end