summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-09-25 20:45:37 -0400
committerSam Anthony <sam@samanthony.xyz>2024-09-25 20:45:37 -0400
commit4b094722234cc7d65f57763bdc83149135e6755e (patch)
tree7fadf3dd7e1e0bd579c9675be17f96d99e25e635
parent0b62e7d4bd1cd5676c448c0878186958edd7a879 (diff)
downloadballs-4b094722234cc7d65f57763bdc83149135e6755e.zip
reduce buffer size
-rw-r--r--balls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/balls.c b/balls.c
index 1fcb5df..7ceedee 100644
--- a/balls.c
+++ b/balls.c
@@ -26,9 +26,9 @@ enum {
FPS = 60,
NS_PER_SEC = 1000000000,
FRAME_TIME = NS_PER_SEC / FPS,
- TICK_BUFSIZE = 4,
+ TICK_BUFSIZE = 1,
- POS_BUFSIZE = 4,
+ BALL_BUFSIZE = 1,
};
typedef struct {
@@ -156,7 +156,7 @@ spawnballs(int n) {
for (j = 0; j < n; j++) {
if (j == i)
continue;
- if ((cs[i][j] = chancreate(sizeof(Ball), POS_BUFSIZE)) == nil)
+ if ((cs[i][j] = chancreate(sizeof(Ball), BALL_BUFSIZE)) == nil)
sysfatal("failed to create channel");
}
}