Last active
January 13, 2019 16:22
-
-
Save skymonsters-Ks/82d50a353715cb9edec451b4f3d15290 to your computer and use it in GitHub Desktop.
パレットモードでパレットアニメーション (tested with HSP 3.51)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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