Created
August 25, 2015 14:17
-
-
Save mj-hd/cc7dd63b3f9d0a81b8f7 to your computer and use it in GitHub Desktop.
Checker Pattern
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
#include "hsp3dish.as" | |
#const CELL_SIZE 50 | |
// 初期化 | |
screen 0, 640, 480 | |
dim col, 2, 3 | |
col(0, 0) = 0:col(0,1) = 0:col(0,2) = 0 | |
col(1, 0) = 255:col(1,1) = 255:col(1,2) = 255 | |
*main | |
// 画面の書き換えを止める | |
redraw 0 | |
repeat ginfo_winx / CELL_SIZE + (ginfo_winx\CELL_SIZE != 0) | |
x = cnt | |
repeat ginfo_winy / CELL_SIZE + (ginfo_winy\CELL_SIZE != 0) | |
y = cnt | |
state = (x + y) \ 2 | |
color col(state, 0), col(state, 1), col(state, 2) | |
boxf x*CELL_SIZE, y*CELL_SIZE, (x+1)*CELL_SIZE, (y+1)*CELL_SIZE | |
loop | |
loop | |
// 画面の書き換えを反映 | |
redraw 1 | |
// 33ミリ秒待つ | |
await 33 | |
// *mainまで戻る | |
goto *main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment