Guest User

Untitled

a guest
Oct 20th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. const WINDOW_WIDTH: float :: 600.0
  2. const WINDOW_HEIGHT: float :: 800.0
  3.  
  4. ; メインコード
  5.  
  6. var wndMain: wnd@Wnd
  7. var drawMain: wnd@Draw
  8.  
  9. func main()
  10. do @wndMain :: wnd@makeWnd(
  11. |null, %fix, @WINDOW_WIDTH $ int, @WINDOW_HEIGHT $ int,
  12. |"kuin_issue_20181020")
  13. do @drawMain :: wnd@makeDraw(@wndMain,
  14. |0, 0, @WINDOW_WIDTH $ int, @WINDOW_HEIGHT $ int,
  15. |%scale, %scale, false)
  16.  
  17. while(wnd@act())
  18. ; 背景の描画
  19. do draw@rect(0.0, 0.0, @WINDOW_WIDTH, @WINDOW_HEIGHT, 0xFFFFFFFF)
  20.  
  21. ; 五角形の描画
  22. do draw@poly(
  23. |[0.0, 300.0, 600.0, 600.0, 0.0, 0.0],
  24. |[600.0, 600.0 * (1.0 - 0.5 * lib@sqrt(3.0)),
  25. |600.0, 800.0, 800.0, 600.0],
  26. |[0xFF000000].repeat(6))
  27.  
  28. ; レンダリング
  29. do draw@render(60)
  30. end while
  31. end func
Add Comment
Please, Sign In to add comment