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: mbed N5110 ShiftReg PinDetect
Diff: Resources.h
- Revision:
- 17:d6a3b29cab31
- Parent:
- 16:caf613d5b85e
--- a/Resources.h Sun May 10 13:14:33 2015 +0000 +++ b/Resources.h Mon May 11 03:52:18 2015 +0000 @@ -1,19 +1,12 @@ #ifndef RESOURCES_H #define RESOURCES_H -// Resource files - sprites/images stored as arrays +/// @file Resources.h +/// Resource files - sprites/images stored as arrays /// Images: Arrays consisting of 1 (opaque) or 0 (blank). namespace Image { - const int Square5[5][5] = { - {1, 1, 1, 1, 1}, - {1, 0, 0, 0, 1}, - {1, 0, 0, 0, 1}, - {1, 0, 0, 0, 1}, - {1, 1, 1, 1, 1} - }; - // Player sprite const int Player[5][5] = { {0, 0, 1, 1, 0}, @@ -23,13 +16,13 @@ {0, 1, 0, 0, 1} }; - const int Cross3[3][3] = { - {0,1,0}, - {1,1,1}, - {0,1,0} + const int Pattern3[3][3] = { + {1,0,1}, + {0,1,1}, + {1,1,1} }; - const int Enemy2[4][3] = { + const int EnemyJumper[4][3] = { {1,1,1}, {0,1,0}, {1,1,1}, @@ -44,21 +37,96 @@ {1,1,0,1,1} }; - const int Enemy3[5][6] = { + const int EnemyRunner[5][6] = { {0,1,1,0,0,0}, {1,1,1,0,0,1}, {1,1,1,1,1,0}, {0,1,1,1,1,0}, {0,1,0,0,1,0} }; - +} + +namespace Number +{ /// Contains numbers from 0-9. Each number has the size 3 x 5 pixels - const int Numbers[5][30] = { - {1,1,1,0,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1}, - {1,0,1,1,1,0,0,0,1,0,0,1,1,0,1,1,0,0,1,0,0,0,0,1,1,0,1,1,0,1}, - {1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1}, - {1,0,1,0,1,0,1,0,0,0,0,1,0,0,1,0,0,1,1,0,1,0,0,1,1,0,1,0,0,1}, - {1,1,1,0,1,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,1,1,0,0,1} + const int Zero[5][3] = { + {1,1,1}, + {1,0,1}, + {1,0,1}, + {1,0,1}, + {1,1,1} + }; + + const int One[5][3] = { + {0,1,0}, + {1,1,0}, + {0,1,0}, + {0,1,0}, + {0,1,0} + }; + + const int Two[5][3] = { + {1,1,1}, + {0,0,1}, + {1,1,1}, + {1,0,0}, + {1,1,1} + }; + + const int Three[5][3] = { + {1,1,1}, + {0,0,1}, + {1,1,1}, + {0,0,1}, + {1,1,1} + }; + + const int Four[5][3] = { + {1,0,1}, + {1,0,1}, + {1,1,1}, + {0,0,1}, + {0,0,1} + }; + + const int Five[5][3] = { + {1,1,1}, + {1,0,0}, + {1,1,1}, + {0,0,1}, + {1,1,1} + }; + + const int Six[5][3] = { + {1,1,1}, + {1,0,0}, + {1,1,1}, + {1,0,1}, + {1,1,1} + }; + + const int Seven[5][3] = { + {1,1,1}, + {0,0,1}, + {0,0,1}, + {0,0,1}, + {0,0,1} + }; + + const int Eight[5][3] = { + {1,1,1}, + {1,0,1}, + {1,1,1}, + {1,0,1}, + {1,1,1} + }; + + const int Nine[5][3] = { + {1,1,1}, + {1,0,1}, + {1,1,1}, + {0,0,1}, + {0,0,1} }; }