From dba37c852242fa5f8d08c5f27ded6a2c3bb9b98c Mon Sep 17 00:00:00 2001 From: Adam Greenwood-Byrne Date: Tue, 9 Feb 2021 16:40:33 +0000 Subject: [PATCH] Fixed some weird compilation issues --- part6-breakout/kernel.c | 2 +- part8-breakout-ble/kernel.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/part6-breakout/kernel.c b/part6-breakout/kernel.c index 1a6e4ae..6c972e9 100644 --- a/part6-breakout/kernel.c +++ b/part6-breakout/kernel.c @@ -89,7 +89,7 @@ void initBricks() int brickwidth = 32; int brickheight = 8; int brickspacer = 20; - int brickcols[5] = { 0x11, 0x22, 0xEE, 0x44, 0x66 }; + static int brickcols[] = { 0x11, 0x22, 0xEE, 0x44, 0x66 }; int ybrick = MARGIN + brickheight; diff --git a/part8-breakout-ble/kernel.c b/part8-breakout-ble/kernel.c index c2c76f3..8a0ee7a 100644 --- a/part8-breakout-ble/kernel.c +++ b/part8-breakout-ble/kernel.c @@ -182,11 +182,10 @@ enum { OBJ_BALL = 3 }; -//#define OBJS_ADDRESS 0x02200000 // Somewhere safe to store a lot of data +#define OBJS_ADDRESS 0x02200000 // Somewhere safe to store a lot of data unsigned int numobjs = 0; -struct Object objects[(ROWS * COLS) + (2 * NUM_LIVES)]; -//struct Object *objects = (struct Object *)OBJS_ADDRESS; +struct Object *objects = (struct Object *)OBJS_ADDRESS; struct Object *ball; struct Object *paddle; int paddlewidth = 80;