update testing

This commit is contained in:
SowinskiBraeden committed 2025-09-18 15:11:50 -07:00
1 parent 86c8977590
commit 3b82537781
1 file changed
+2 -2
+2 -2
View File
@@ -100,7 +100,7 @@ PARTICLE* generateParticles(int WIDTH, int HEIGHT) {
for (int i = -(blockWidth / 2); i < blockWidth / 2; i++) { for (int i = -(blockWidth / 2); i < blockWidth / 2; i++) {
for (int j = -(blockWidth / 2); j < blockWidth / 2; j++) { for (int j = -(blockWidth / 2); j < blockWidth / 2; j++) {
// printf("%d - (%d, %d)\n", index, WIDTH / 2 + i, HEIGHT / 2 + j); // printf("%d - (%d, %d)\n", index, WIDTH / 2 + i, HEIGHT / 2 + j);
PARTICLE p = {WIDTH / 2 + i, HEIGHT / 2 + j, WIDTH / 2 + i, HEIGHT / 2 + j, 0, 1}; PARTICLE p = {WIDTH / 2 + i, HEIGHT / 2 + j, WIDTH / 2 + i, HEIGHT / 2 + j, -1, 1};
particles[index] = p; particles[index] = p;
index++; index++;
} }
@@ -125,7 +125,7 @@ int main(void) {
while (1) { while (1) {
updateParticles(particles, WIDTH, HEIGHT); updateParticles(particles, WIDTH, HEIGHT);
space = create2DSpace(WIDTH, HEIGHT); // resset grid space // space = create2DSpace(WIDTH, HEIGHT); // resset grid space
update2DSpace(particles, space); update2DSpace(particles, space);
render(space, WIDTH, HEIGHT); render(space, WIDTH, HEIGHT);
usleep(0.5 * micro); usleep(0.5 * micro);