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
Level1/Level1.cpp
- Committer:
- el17arm
- Date:
- 2019-04-14
- Revision:
- 38:55bb9da08a52
- Parent:
- 37:4d525a37d5d2
- Child:
- 39:ddca28745388
- Child:
- 40:913339e324b8
File content as of revision 38:55bb9da08a52:
#include "Level1.h"
Level1::Level1()
{
}
Level1::~Level1()
{
}
void Level1::level_platforms(N5110 &lcd)
{
lcd.drawLine(0,47,83,47, 1);
lcd.drawRect(11,39, 38, 2, FILL_BLACK);
lcd.drawRect(65,36, 30, 2, FILL_BLACK);
lcd.drawRect(75,29, 8, 2, FILL_BLACK);
lcd.drawRect(22, 25, 48, 2, FILL_BLACK);
lcd.drawRect(0, 25, 12, 2, FILL_BLACK);
lcd.drawRect(0, 17, 8, 2, FILL_BLACK);
lcd.drawRect(0, 9, 27, 2, FILL_BLACK);
lcd.drawRect(39, 9, 7, 2, FILL_BLACK);
lcd.drawRect(58,9,32,2,FILL_BLACK);
}
void Level1::soft_blocks(N5110 &lcd)
{
//_sprites.soft_blocks(46, 8, lcd);
//_sprites.soft_blocks(52, 8, lcd);
//_sprites.soft_blocks(55, 36, lcd);
//_sprites.soft_blocks(33, 8, lcd);
//_sprites.soft_blocks(27, 8, lcd);
//_sprites.soft_blocks(59, 36, lcd);
}
int Level1::keys_collected()
{
int k =_sprites.keys_collected();
printf("keys = &i \n"), k;
return k;
}
bool Level1::level1_exit(N5110 &lcd)
{
if(_sprites.exit_level(78,41,lcd) == true) {
return true;
} else {
return false;
}
}
void Level1::trap_pos()
{
trap1.tx = 25;
trap1.ty = 44;
trap2.tx = 58;
trap2.ty = 6;
trap3.tx = 75;
trap3.ty = 6;
trap4.tx = 23;
trap4.ty = 6;
}
void Level1::key_pos()
{
key1.kx = 79;
key1.ky = 12;
key2.kx = 36;
key2.ky = 22;
key3.kx = 40;
key3.ky = 6;
key4.kx = 62;
key4.ky = 6;
key5.kx = 75;
key5.ky = 0;
}
void Level1::block_pos()
{
sol1.bx = 49;
sol1.by = 36;
sol2.bx = 42;
sol2.by = 22;
sof1.sx = 55;
sof1.sy = 36;
sof1.sz = 10;
sof2.sx = 27;
sof2.sy = 9;
sof2.sz = 12;
sof3.sx = 44;
sof3.sy = 9;
sof3.sz = 14;
}
void Level1::enem_pos()
{
//enem1.ex =
}