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.
Game/Game.cpp@1:37802772843e, 2019-03-25 (annotated)
- Committer:
- joshdavy
- Date:
- Mon Mar 25 10:48:23 2019 +0000
- Revision:
- 1:37802772843e
- Child:
- 2:b62e8be35a5d
Basic Classes defined. Simple sprite drawing.;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
joshdavy | 1:37802772843e | 1 | #include "Game.h" |
joshdavy | 1:37802772843e | 2 | // Objects |
joshdavy | 1:37802772843e | 3 | |
joshdavy | 1:37802772843e | 4 | const int player_bitmap[6][6] = { |
joshdavy | 1:37802772843e | 5 | {1,1,1,1,0,0}, |
joshdavy | 1:37802772843e | 6 | {1,0,0,1,0,0}, |
joshdavy | 1:37802772843e | 7 | {1,1,1,1,0,0}, |
joshdavy | 1:37802772843e | 8 | {0,1,1,1,1,0}, |
joshdavy | 1:37802772843e | 9 | {0,1,1,1,0,1}, |
joshdavy | 1:37802772843e | 10 | {0,1,0,1,0,0} |
joshdavy | 1:37802772843e | 11 | }; |
joshdavy | 1:37802772843e | 12 | |
joshdavy | 1:37802772843e | 13 | |
joshdavy | 1:37802772843e | 14 | Game::Game() |
joshdavy | 1:37802772843e | 15 | { |
joshdavy | 1:37802772843e | 16 | |
joshdavy | 1:37802772843e | 17 | Vector2D pos = {20,20}; |
joshdavy | 1:37802772843e | 18 | _player.init(6,6,(int *)player_bitmap,pos); |
joshdavy | 1:37802772843e | 19 | |
joshdavy | 1:37802772843e | 20 | |
joshdavy | 1:37802772843e | 21 | } |
joshdavy | 1:37802772843e | 22 | |
joshdavy | 1:37802772843e | 23 | Game::~Game() |
joshdavy | 1:37802772843e | 24 | { |
joshdavy | 1:37802772843e | 25 | |
joshdavy | 1:37802772843e | 26 | } |
joshdavy | 1:37802772843e | 27 | |
joshdavy | 1:37802772843e | 28 | void Game::read_input(Gamepad &pad) |
joshdavy | 1:37802772843e | 29 | { |
joshdavy | 1:37802772843e | 30 | |
joshdavy | 1:37802772843e | 31 | } |
joshdavy | 1:37802772843e | 32 | |
joshdavy | 1:37802772843e | 33 | void Game::update(Gamepad &pad) |
joshdavy | 1:37802772843e | 34 | { |
joshdavy | 1:37802772843e | 35 | |
joshdavy | 1:37802772843e | 36 | } |
joshdavy | 1:37802772843e | 37 | |
joshdavy | 1:37802772843e | 38 | void Game::draw(N5110 lcd) |
joshdavy | 1:37802772843e | 39 | { |
joshdavy | 1:37802772843e | 40 | _player.render(lcd); |
joshdavy | 1:37802772843e | 41 | } |
joshdavy | 1:37802772843e | 42 |