aboutsummaryrefslogtreecommitdiffstats
path: root/06-brain2
diff options
context:
space:
mode:
Diffstat (limited to '06-brain2')
-rw-r--r--06-brain2/src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/06-brain2/src/main.c b/06-brain2/src/main.c
index 5e1f387..4640638 100644
--- a/06-brain2/src/main.c
+++ b/06-brain2/src/main.c
@@ -76,6 +76,7 @@ int main(int argc, char **argv)
reset:
memset(bits1, 0, sizeof(bits1));
+ memset(bits2, 0, sizeof(bits1));
while(true) {
al_wait_for_event(eq, &e);
@@ -86,7 +87,7 @@ reset:
goto done;
case ALLEGRO_EVENT_MOUSE_BUTTON_DOWN:
- bits1[e.mouse.y / DISP_SCALE][e.mouse.x / DISP_SCALE] = 1;
+ bits1[e.mouse.y / DISP_SCALE][e.mouse.x / DISP_SCALE] = 3;
mouse_down = true;
break;
@@ -107,6 +108,7 @@ reset:
case ALLEGRO_KEY_2:
memset(bits1, 0, sizeof(bits1));
+ memset(bits2, 0, sizeof(bits2));
for (x = 0; x < SEED_BITS; x++) {
bits1[randombytes_random() % BUF_H][randombytes_random() % BUF_W] = 3;
}
@@ -131,7 +133,7 @@ reset:
if (mouse_down) {
al_get_mouse_state(&ms);
- bits1[ms.y / DISP_SCALE][ms.x / DISP_SCALE] = 1;
+ bits1[ms.y / DISP_SCALE][ms.x / DISP_SCALE] = 3;
}
/* step */