2022-07-07 23:06:28 +02:00
|
|
|
function draw_animated_bg(startx)
|
2023-10-07 19:12:53 +02:00
|
|
|
if (amplitude <= 0) return
|
|
|
|
startx = startx or 0
|
|
|
|
fillp(0b0101101001011010)
|
2022-07-07 23:06:28 +02:00
|
|
|
|
2023-10-07 19:12:53 +02:00
|
|
|
local color = 1
|
|
|
|
-- vertical lines
|
|
|
|
local t = t() + 10
|
|
|
|
for i = startx - 1, 127, 9 do
|
|
|
|
local a = sin(i * t / 512) * amplitude + 64
|
|
|
|
local b = cos(i * t / 256) * amplitude + 64
|
|
|
|
line(
|
|
|
|
i,
|
|
|
|
a,
|
|
|
|
i,
|
|
|
|
b,
|
|
|
|
color
|
|
|
|
)
|
|
|
|
end
|
2022-07-07 23:06:28 +02:00
|
|
|
|
2023-10-07 19:12:53 +02:00
|
|
|
-- horizontal lines
|
|
|
|
for i = startx - 1, 127, 9 do
|
|
|
|
local a = sin(i * t / 512) * amplitude + 64
|
|
|
|
local b = cos(i * t / 256) * amplitude + 64
|
|
|
|
line(
|
|
|
|
a,
|
|
|
|
i,
|
|
|
|
b,
|
|
|
|
i,
|
|
|
|
color
|
|
|
|
)
|
|
|
|
end
|
2022-07-12 21:47:10 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function draw_bg_menu()
|
2022-07-08 22:47:26 +02:00
|
|
|
end
|