Game For ECE 2035

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

Files at this revision

API Documentation at this revision

Comitter:
nasiromar
Date:
Fri Dec 03 19:12:50 2021 +0000
Parent:
17:4abe3fba3471
Commit message:
New Update;

Changed in this revision

actions.cpp Show annotated file Show diff for this revision Revisions of this file
wave_player.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 4abe3fba3471 -r 760dd68e939e actions.cpp
--- a/actions.cpp	Fri Dec 03 11:05:03 2021 +0000
+++ b/actions.cpp	Fri Dec 03 19:12:50 2021 +0000
@@ -60,20 +60,20 @@
 void walk_npc()
 {
 
-   if(currentMap == 0 && npc_x != 6){
+    if(currentMap == 0 && npc_x != 6) {
         map_erase(npc_x,npc_y);
 
 
-        if ( npc_y == 5){
+        if ( npc_y == 5) {
             walkXpos = 1;
-            }
-        if ( walkXpos == 1){
+        }
+        if ( walkXpos == 1) {
             npc_x--;
             add_npc(npc_x,npc_y);
-            }
-        
-        
-            }
+        }
+
+
+    }
 
 }
 
@@ -109,19 +109,19 @@
     char line3[] = "Dragon and";
     char line4[] = "completed your";
     horizontal_speech1(line3,line4);
-    
+
     char line5[] = "Quest..";
     char line6[] = "Job Well Done";
     horizontal_speech1(line5,line6);
-    
+
     char line7[] = "Collect Your";
     char line8[] = "Winnings";
     horizontal_speech1(line7,line8);
-    
+
     char line9[] = "Thanks For";
     char line10[] = "Playing My";
     horizontal_speech1(line9,line10);
-    
+
     char line11[] = "Game ;)";
     char line12[] = "-Holiday";
     horizontal_speech1(line11,line12);
@@ -139,7 +139,8 @@
 }
 
 
-void merch_speech1(){
+void merch_speech1()
+{
     char line1[] = "Welcome To";
     char line2[] = "The Shop";
     horizontal_speech1(line1,line2);
@@ -147,9 +148,10 @@
     char line3[] = "Take a look";
     char line4[] = "My Friend";
     horizontal_speech1(line3,line4);
-    }
-    
-    void merch_speech2(){
+}
+
+void merch_speech2()
+{
     char line1[] = "Thank You";
     char line2[] = "For Shopping";
     horizontal_speech1(line1,line2);
@@ -157,9 +159,9 @@
     char line3[] = "Be sure to";
     char line4[] = "Return :)";
     horizontal_speech1(line3,line4);
-    }
-    
-    void cantbuy()
+}
+
+void cantbuy()
 {
     char line1[] = "Not Enough";
     char line2[] = "Funds";
@@ -216,7 +218,8 @@
     horizontal_speech1(line3,line4);
 }
 
-void fire_dmg(){
+void fire_dmg()
+{
     char line1[] = "*Burn Burn*";
     char line2[] = "*Crackle*";
     horizontal_speech1(line1,line2);
@@ -224,27 +227,29 @@
     char line3[] = "Fire Damage:";
     char line4[] = "HP: -2";
     horizontal_speech1(line3,line4);
-    }
-    
-void eye_dmg(){
+}
+
+void eye_dmg()
+{
     char line1[] = "*shake shake*";
     char line2[] = "Recoiled";
     horizontal_speech1(line1,line2);
-    
+
     char line3[] = "Eye Screeched!";
     char line4[] = "The sound hurts";
     horizontal_speech1(line3,line4);
-    
+
     char line5[] = "HP Damage:";
     char line6[] = "HP: -15";
     horizontal_speech1(line5,line6);
-    }
-    
-void gob_dmg(){
+}
+
+void gob_dmg()
+{
     char line1[] = "*shake shake*";
     char line2[] = "Recoiled";
     horizontal_speech1(line1,line2);
-    
+
     char line3[] = "Goblin Attacked";
     char line4[] = "Took Damage";
     horizontal_speech1(line3,line4);
@@ -252,11 +257,12 @@
     char line5[] = "HP Damage:";
     char line6[] = "HP: -12";
     horizontal_speech1(line5,line6);
-    }
-    
+}
+
 
-    
-    void potion(){
+
+void potion()
+{
     char line1[] = "Potion:";
     char line2[] = "Selected";
     horizontal_speech1(line1,line2);
@@ -264,7 +270,7 @@
     char line3[] = "MP increase";
     char line4[] = "MP: +5";
     horizontal_speech1(line3,line4);
-    }
+}
 
 
 void npc_speech1()
@@ -371,7 +377,7 @@
 void init_dung()
 {
     Map* dung = set_active_map(1);
-    
+
     add_castle(0,              0,              HORIZONTAL, map_width());
     add_castle(0,              map_height()-1, HORIZONTAL, map_width());
     add_castle(0,              0,              VERTICAL,   map_height());
@@ -390,9 +396,9 @@
     add_dragon(15,9);
 
     add_goblin(5,7,ENEMY2);
-    
+
     add_goblin(10,10,ENEMY1);
-    
+
     add_eye(15,15);
 
     print_map();
diff -r 4abe3fba3471 -r 760dd68e939e wave_player.lib
--- a/wave_player.lib	Fri Dec 03 11:05:03 2021 +0000
+++ b/wave_player.lib	Fri Dec 03 19:12:50 2021 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/sravet/code/wave_player/#249439124994
+https://os.mbed.com/users/nasiromar/code/wave_player/#249439124994