blob: 90ef8b8f84b7151739b94090691ca4c6e9f36712 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
(defun main int)
(InitWindow 800 800 "test_test")
(SetTargetFPS 30)
(let img:Image (LoadImage "dvd.png"))
(let tex:Texture (LoadTextureFromImage img))
(UnloadImage img)
(let x:int (randint 1 9))
(let y:int (randint 1 9))
(let xd:int (randint 1 5))
(let yd:int (randint 1 5))
(for i:int 0 (= (WindowShouldClose) 0) 0)
(BeginDrawing)
(ClearBackground RAYWHITE)
(DrawTexture tex x y WHITE)
(EndDrawing)
(set x (+ x xd))
(set y (+ y yd))
(if (> x 750))
(set xd -xd)
(elif (< x 0))
(set xd -xd)
(endif)
(if (> y 750))
(set yd -yd)
(elif (< y 0))
(set yd -yd)
(endif)
(endfor)
(CloseWindow)
(endfun)
|