Skip to content

Instantly share code, notes, and snippets.

@skymonsters-Ks
Last active January 13, 2019 16:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skymonsters-Ks/82d50a353715cb9edec451b4f3d15290 to your computer and use it in GitHub Desktop.
Save skymonsters-Ks/82d50a353715cb9edec451b4f3d15290 to your computer and use it in GitHub Desktop.
パレットモードでパレットアニメーション (tested with HSP 3.51)
#const HUE_RANGE 192
screen 0, 640, 480, 1
mes "Initializing..."
screenW = ginfo_sx
screenH = ginfo_sy
centerX = screenW / 2
centerY = screenH / 2
redraw 0
repeat screenW : px = cnt
repeat screenH : py = cnt
x = px - centerX
y = py - centerY
d = sqrt(x * x + y * y)
palcolor d \ HUE_RANGE
pset px, py
loop
loop
acnt = 0
*mainLoop
repeat HUE_RANGE
hsvcolor cnt + acnt, 140, 255
palette cnt, ginfo_r, ginfo_g, ginfo_b
loop
acnt += 1
redraw 0
palette -1, , , , 1
redraw 1
await 15
goto *mainLoop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment