-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmain.rkt
121 lines (105 loc) · 1.37 KB
/
main.rkt
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#lang racket
#|
Racket Arcade (r-cade) - a simple game engine
Copyright (c) 2020 by Jeffrey Massung
All rights reserved.
|#
(require ffi/unsafe)
(require csfml)
;; ----------------------------------------------------
(require "video.rkt")
(require "game.rkt")
(require "input.rkt")
(require "palette.rkt")
(require "font.rkt")
(require "draw.rkt")
(require "voice.rkt")
(require "sound.rkt")
(require "audio.rkt")
(require "music.rkt")
(require "anim.rkt")
(require "time.rkt")
;; ----------------------------------------------------
(provide
; game
run
quit
goto
wait
sync
frame
frametime
gametime
width
height
action
timer
; input
btn-any
btn-start
btn-select
btn-quit
btn-z
btn-x
btn-up
btn-down
btn-right
btn-left
btn-mouse
mouse-x
mouse-y
hide-mouse
show-mouse
; draw
cls
color
set-color!
draw
draw-ex
text
line
rect
circle
; font
make-font
font
font-sprite
font-advance
font-height
basic-font
tall-font
wide-font
; anim
anim-frame
anim-sprite
; voice
(struct-out voice)
basic-voice
sine-wave
sawtooth-wave
square-wave
triangle-wave
noise-wave
synth
envelope
basic-envelope
fade-in-envelope
fade-out-envelope
z-envelope
s-envelope
peak-envelope
trough-envelope
adsr-envelope
; audio
music
sound
tone
sweep
basic-note
play-sound
stop-sound
sound-volume
music-volume
play-music
stop-music
pause-music)