summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-11-13 12:51:12 -0500
committerSam Anthony <sam@samanthony.xyz>2024-11-13 12:51:12 -0500
commitaf9123ca84fbb164cac9e87edf04c9c613011889 (patch)
treedc9a46dd8ac05be329b65b60999a64896264468c
parentdaf29651a188a06041ed6d238f7f1b7ab2f5bd9a (diff)
downloadballs-af9123ca84fbb164cac9e87edf04c9c613011889.zip
move config parameters into config.h
-rw-r--r--balls.c6
-rw-r--r--config.h9
2 files changed, 9 insertions, 6 deletions
diff --git a/balls.c b/balls.c
index ef11527..1d89f29 100644
--- a/balls.c
+++ b/balls.c
@@ -14,16 +14,10 @@
#define nelem(arr) (sizeof(arr) / sizeof(arr[0]))
-#define RMIN 0.05 /* Minimum radius. */
-#define RMAX 0.15 /* Maximum radius. */
-#define VMAX_INIT 5.0 /* Maximum initial velocity. */
-
enum {
MS_PER_S = 1000,
FRAME_TIME_MS = MS_PER_S / FPS,
};
-enum { KEY_QUIT = 'q' };
-enum { NBALLS_DEFAULT = 3 };
const Rect bounds = { {-1.0, -1.0}, {1.0, 1.0} };
diff --git a/config.h b/config.h
index 1427467..9c52339 100644
--- a/config.h
+++ b/config.h
@@ -1,10 +1,19 @@
/* #define WINDOWS 1 */
+
#define CL_TARGET_OPENCL_VERSION 110
+
#define WINDOW_TITLE "Balls"
+#define RMIN 0.05 /* Minimum radius. */
+#define RMAX 0.15 /* Maximum radius. */
+#define VMAX_INIT 5.0 /* Maximum initial velocity. */
+
enum { FPS = 60 }; /* Frames per second. */
enum window {
WIDTH = 640,
HEIGHT = 640,
};
+enum { KEY_QUIT = 'q' };
+
+enum { NBALLS_DEFAULT = 3 };
enum { CIRCLE_POINTS = 24 }; /* Number of vertices per circle. */