Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const WINDOW_WIDTH: float :: 600.0
- const WINDOW_HEIGHT: float :: 800.0
- ; メインコード
- var wndMain: wnd@Wnd
- var drawMain: wnd@Draw
- func main()
- do @wndMain :: wnd@makeWnd(
- |null, %fix, @WINDOW_WIDTH $ int, @WINDOW_HEIGHT $ int,
- |"kuin_issue_20181020")
- do @drawMain :: wnd@makeDraw(@wndMain,
- |0, 0, @WINDOW_WIDTH $ int, @WINDOW_HEIGHT $ int,
- |%scale, %scale, false)
- while(wnd@act())
- ; 背景の描画
- do draw@rect(0.0, 0.0, @WINDOW_WIDTH, @WINDOW_HEIGHT, 0xFFFFFFFF)
- ; 五角形の描画
- do draw@poly(
- |[0.0, 300.0, 600.0, 600.0, 0.0, 0.0],
- |[600.0, 600.0 * (1.0 - 0.5 * lib@sqrt(3.0)),
- |600.0, 800.0, 800.0, 600.0],
- |[0xFF000000].repeat(6))
- ; レンダリング
- do draw@render(60)
- end while
- end func
Add Comment
Please, Sign In to add comment