伊地知ニジカのデスクトップ・マスコットです.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.hsp 890 B

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #include "user32.as"
  2. #packopt hide 1
  3. #packopt name "nizika-desktop"
  4. #const NIZIKA_WIDTH 300
  5. #const NIZIKA_HEIGHT 300
  6. #const NIZIKA_BASE 240
  7. #const NIZIKA_LEFT 60
  8. #const NIZIKA_RIGHT 250
  9. ; 半透明スクリーン作成
  10. SCREEN_MAIN = BgScr2 (gInfo_dispX, gInfo_dispY, SCREEN_HIDE, 0, 0)
  11. SetWindowLong hWnd, GWL_EXSTYLE, GetWindowLong (hWnd, GWL_EXSTYLE) Or WS_EX_LAYERED
  12. SetLayeredWindowAttributes hWnd, RGBCOLOUR_LIME, False, True
  13. Color COLOUR_LIME
  14. BoxF
  15. SCREEN_NIZIKA = Buffer2 ()
  16. PicLoad "assets/nizika.png"
  17. GSel SCREEN_MAIN, 2
  18. frame = 0
  19. nizikaX = Double (-NIZIKA_LEFT)
  20. nizikaY = Double (gInfo_dispY - NIZIKA_BASE)
  21. direction = 1
  22. Repeat
  23. Pos nizikaX, nizikaY
  24. GCopy SCREEN_NIZIKA, 0, NIZIKA_HEIGHT * (frame \ 24), NIZIKA_WIDTH, NIZIKA_HEIGHT
  25. nizikaX += direction * 4
  26. If nizikaX >= NIZIKA_WIDTH {
  27. direction = -direction
  28. }
  29. Await 33
  30. frame++
  31. Loop