info = { type = "image", title = "Bull run", category = "btc", author = "BRRRO", version = "1.0", license = "MIT", desc = "A bull gallops in the orange glow", api = 33, } local HILL = { { 10.8, 46, 6, 210, 140, 70 }, { 25.2, 55, 5, 160, 100, 52 }, } local BU = { "..#.....#..", ".#########.", "###########", "###########", "#.##.##.##.", "..#....#..." } function render() local W, H, FPS = gfx.W, gfx.H, gfx.FPS local t = frame / FPS local floor, sin, abs = math.floor, math.sin, math.abs for y = 0, H - 1 do local f = y / H gfx.rect(0, y, W, 1, 255, 176 + 54 * f, 86 + 90 * f) end for yy = 6, 17 do local dy = yy - 12 local r2 = 28 - dy * dy if r2 >= 0 then local hw = floor(math.sqrt(r2)) gfx.rect(33 - hw, yy, 2 * hw + 1, 1, 255, 238, 150) end end for l = 1, 2 do local L = HILL[l] local off, base, amp = t * L[1], L[2], L[3] local x0, hp = 0, nil for x = 0, W do local h if x < W then h = base - floor(amp * abs(sin((x + off) * 0.08)) + 0.5) end if h ~= hp then if hp then gfx.rect(x0, hp, x - x0, H - hp, L[4], L[5], L[6]) end x0, hp = x, h end end end local by = 40 + floor(sin(t * 24) + 0.5) for r = 1, 6 do local row = BU[r] for c = 1, 11 do if row:sub(c, c) == "#" then gfx.px(4 + c, by + r - 1, 60, 44, 38) end end end for i = 0, 5 do local fx = floor(3 - (t * 30 + i * 3) % 12) if fx > 0 then gfx.px(fx, by + 5 - i % 2, 214, 170, 116) end end end