Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: STM32F3-Discovery-minimal
Fork of Space_Invaders_Demo by
Diff: bounce.c
- Revision:
- 8:34fb94209517
- Parent:
- 7:513afc954d6e
- Child:
- 10:8ffcefda667a
--- a/bounce.c Mon May 28 10:38:27 2018 +0000 +++ b/bounce.c Tue May 29 23:16:35 2018 +0000 @@ -22,9 +22,9 @@ gdiSetColour(2); gdiCircle(ballx/16,bally/16,4,0); gdiSetColour(7); - gdiCircle(ballx/16,bally/16,3,0); - gdiCircle(ballx/16,bally/16,2,0); - gdiCircle(ballx/16,bally/16,1,0); + gdiFilledCircle(ballx/16,bally/16,3,0); + // gdiCircle(ballx/16,bally/16,2,0); + // gdiCircle(ballx/16,bally/16,1,0); gdiSetColour(4); gdiRectangle(px-8,VID_VSIZE-5,px+7,VID_VSIZE-2,0); @@ -40,7 +40,7 @@ vidNextBuffer(); ReadAccelerometer( accel ); - px=VID_HSIZE/2+accel[1]/100; + px=(VID_HSIZE/2+accel[1]/100)/8+7*px/8; if(px<9) px=9; if(px>VID_HSIZE-9) px=VID_HSIZE-9; ballx+=ballvx;