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
Diff: Level1/Level1.cpp
- Revision:
- 41:0cf320f73424
- Parent:
- 40:913339e324b8
--- a/Level1/Level1.cpp Mon Apr 15 02:01:41 2019 +0000
+++ b/Level1/Level1.cpp Tue Apr 16 02:01:53 2019 +0000
@@ -19,7 +19,7 @@
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);
+ lcd.drawRect(53,9,32,2,FILL_BLACK);
}
@@ -32,9 +32,10 @@
trap2.ty[0] = 6;
trap3.tx[0] = 75;
trap3.ty[0] = 6;
- trap4.tx[0] = 23;
- trap4.ty[0] = 6;
-
+ trap4.tx[0] = 0;
+ trap4.ty[0] = 0;
+ trap5.tx[0] = 25;
+ trap5.ty[0] = 36;
}
void Level1::key_pos1()
@@ -55,35 +56,59 @@
{
sol1.bx[0] = 49;
sol1.by[0] = 36;
+
sol2.bx[0] = 42;
sol2.by[0] = 22;
- sof1.sx[0] = 55;
+ sol3.bx[0] = -10;
+ sol3.by[0] = -10;
+
+ sol4.bx[0] = -10;
+ sol4.by[0] = -10;
+
+ sol5.bx[0] = -10;
+ sol5.by[0] = -10;
+}
+
+void Level1::soft_pos1()
+{
+ sof1.sx1[0] = 55;
sof1.sy[0] = 36;
- sof1.sz[0] = 10;
+ sof1.sx2[0] = 65;
- sof2.sx[0] = 27;
+ sof2.sx1[0] = 27;
sof2.sy[0] = 9;
- sof2.sz[0] = 12;
+ sof2.sx2[0] = 39;
+
+ sof3.sx1[0] = 46;
+ sof3.sy[0] = 9;
+ sof3.sx2[0] = 52;
- sof3.sx[0] = 44;
- sof3.sy[0] = 9;
- sof3.sz[0] = 14;
+ sof4.sx1[0] = 0;
+ sof4.sy[0] = 0;
+ sof4.sx2[0] = 0;
+
+ sof4.sx1[0] = 0;
+ sof4.sy[0] = 0;
+ sof4.sx2[0] = 0;
}
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;
+
+ enem3.ex[0] = -10;
+ enem3.ey[0] = -10;
+ enem3.d[0] = 0;
+ enem3.v[0] = 0;
}
void Level1::level_exits(N5110 &lcd)
@@ -93,6 +118,12 @@
exit1.lx[1] = 70;
exit1.ly[1] = 41;
+
+ exit1.lx[2] = 70;
+ exit1.ly[2] = 41;
+
+ exit1.lx[3] = 70;
+ exit1.ly[3] = 41;
}
void Level1::key_pos2()
@@ -119,6 +150,8 @@
trap3.ty[1] = 6;
trap4.tx[1] = 23;
trap4.ty[1] = 6;
+ trap5.tx[1] = -10;
+ trap5.ty[1] = -10;
}
void Level1::enem_pos2()
@@ -129,7 +162,7 @@
enem1.d[1] = 36;
enem1.v[1] = 0.5;
- enem1.f[1] = 1;
+ enem2.f[1] = 1;
enem2.ex[1] = 10;
enem2.ey[1] = 4;
enem2.d[1] = 26;
@@ -140,20 +173,41 @@
{
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;
+ sol3.bx[1] = 42;
+ sol3.by[1] = 22;
+
+ sol4.bx[1] = 42;
+ sol4.by[1] = 22;
- sof2.sx[1] = 27;
- sof2.sy[1] = 9;
- sof2.sz[1] = 12;
-
- sof3.sx[1] = 44;
- sof3.sy[1] = 9;
- sof3.sz[1] = 14;
+ sol5.bx[1] = 42;
+ sol5.by[1] = 2;
+}
+
+void Level1::soft_pos2()
+{
+ sof1.sx1[1] = 0;
+ sof1.sy[1] = 0;
+ sof1.sx2[1] = 0;
+
+ sof2.sx1[1] = 0;
+ sof2.sy[1] = 0;
+ sof2.sx2[1] = 0;
+
+ sof3.sx1[1] = 0;
+ sof3.sy[1] = 0;
+ sof3.sx2[1] = 0;
+
+ sof4.sx1[1] = 0;
+ sof4.sy[1] = 0;
+ sof4.sx2[1] = 0;
+
+ sof5.sx1[1] = 0;
+ sof5.sy[1] = 0;
+ sof5.sx2[1] = 0;
}
void Level1::level_platforms2(N5110 &lcd)