Fixed annoying redraw bug (with a wait - sigh...)

This commit is contained in:
Adam Greenwood-Byrne 2021-03-04 21:47:00 +00:00
parent 875cf7b403
commit c0fffd881b

View file

@ -156,7 +156,7 @@ void moveObject(volatile struct Object *object, int x, int y)
const int ballradius = 15; const int ballradius = 15;
const int paddlewidth = 80; const int paddlewidth = 80;
volatile unsigned char dir; volatile unsigned char dir = 50;
volatile unsigned int numobjs; volatile unsigned int numobjs;
volatile struct Object *objects = (struct Object *)HEAP_ADDRESS; volatile struct Object *objects = (struct Object *)HEAP_ADDRESS;
@ -168,7 +168,6 @@ volatile struct Object *endgame;
void breakout_init() void breakout_init()
{ {
numobjs = 0; numobjs = 0;
dir = 50;
initBricks(); initBricks();
initBall(); initBall();
@ -243,6 +242,8 @@ void breakout()
// Clear endgame state // Clear endgame state
updateEndgame(0, 0); updateEndgame(0, 0);
wait_msec(0x100000); // Wait 1 second
} }
void main() void main()