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-15
- Revision:
- 40:913339e324b8
- Parent:
- 38:55bb9da08a52
- Child:
- 41:0cf320f73424
File content as of revision 40:913339e324b8:
#include "Level1.h"
Level1::Level1()
{
}
Level1::~Level1()
{
}
void Level1::level_platforms1(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::trap_pos1()
{
    trap1.tx[0] = 25;
    trap1.ty[0] = 44;
    trap2.tx[0] = 58;
    trap2.ty[0] = 6;
    trap3.tx[0] = 75;
    trap3.ty[0] = 6;
    trap4.tx[0] = 23;
    trap4.ty[0] = 6;
}
void Level1::key_pos1()
{
    key1.kx[0] = 79;
    key1.ky[0] = 12;
    key2.kx[0] = 36;
    key2.ky[0] = 22;
    key3.kx[0] = 40;
    key3.ky[0] = 6;
    key4.kx[0] = 62;
    key4.ky[0] = 6;
    key5.kx[0] = 75;
    key5.ky[0] = 0;
}
void Level1::block_pos1()
{
    sol1.bx[0] = 49;
    sol1.by[0] = 36;
    sol2.bx[0] = 42;
    sol2.by[0] = 22;
    
    sof1.sx[0] = 55;
    sof1.sy[0] = 36;
    sof1.sz[0] = 10;
    
    sof2.sx[0] = 27;
    sof2.sy[0] = 9;
    sof2.sz[0] = 12;
    
    sof3.sx[0] = 44;
    sof3.sy[0] = 9;
    sof3.sz[0] = 14;
}
void Level1::enem_pos1()
{
    enem1.f[0] = 0;
    enem1.ex[0] = 22;
    enem1.ey[0] = 20;
    enem1.d[0] = 36;
    enem1.v[0] = 0.5;
    
    enem1.f[0] = 1;
    enem2.ex[0] = 0;
    enem2.ey[0] = 4;
    enem2.d[0] = 26;
    enem2.v[0] = 1;
}
void Level1::level_exits(N5110 &lcd)
{   
    exit1.lx[0] = 78;
    exit1.ly[0] = 41;
    
    exit1.lx[1] = 70;
    exit1.ly[1] = 41;
}
void Level1::key_pos2()
{
    key1.kx[1] = 10;
    key1.ky[1] = 44;
    key2.kx[1] = 18;
    key2.ky[1] = 44;
    key3.kx[1] = 22;
    key3.ky[1] = 44;
    key4.kx[1] = 26;
    key4.ky[1] = 44;
    key5.kx[1] = 30;
    key5.ky[1] = 44;
}
void Level1::trap_pos2()
{
    trap1.tx[1] = 25;
    trap1.ty[1] = 44;
    trap2.tx[1] = 58;
    trap2.ty[1] = 6;
    trap3.tx[1] = 75;
    trap3.ty[1] = 6;
    trap4.tx[1] = 23;
    trap4.ty[1] = 6;
}
void Level1::enem_pos2()
{
    enem1.f[1] = 0;
    enem1.ex[1] = 22;
    enem1.ey[1] = 20;
    enem1.d[1] = 36;
    enem1.v[1] = 0.5;
    
    enem1.f[1] = 1;
    enem2.ex[1] = 10;
    enem2.ey[1] = 4;
    enem2.d[1] = 26;
    enem2.v[1] = 1;
}
void Level1::block_pos2()
{
    sol1.bx[1] = 49;
    sol1.by[1] = 36;
    sol2.bx[1] = 42;
    sol2.by[1] = 22;
    
    sof1.sx[1] = 55;
    sof1.sy[1] = 36;
    sof1.sz[1] = 10;
    
    sof2.sx[1] = 27;
    sof2.sy[1] = 9;
    sof2.sz[1] = 12;
    
    sof3.sx[1] = 44;
    sof3.sy[1] = 9;
    sof3.sz[1] = 14;
}
void Level1::level_platforms2(N5110 &lcd)
{
    lcd.drawLine(0,47,83,47,1);
}