Ikenna Adrian Ozoemena 201157039
Dependencies: mbed
Diff: Lore/Lore.cpp
- Revision:
- 39:7824f9080f59
- Child:
- 40:90c7a893d513
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Lore/Lore.cpp Mon May 06 16:49:53 2019 +0000 @@ -0,0 +1,67 @@ +#include "Lore.h" +const int seeker[7][9] = { + {1,1,0,0,0,0,0,1,1}, + {1,0,1,0,0,0,1,0,1}, + {1,0,0,1,1,1,0,0,1}, + {0,1,0,0,0,0,0,1,0}, + {0,0,1,0,0,0,1,0,0}, + {0,0,1,1,0,1,1,0,0}, + {0,0,0,0,1,0,0,0,0}, +}; +const int shooter[10][11] = { + {0,0,1,0,0,0,0,0,1,0,0}, + {0,1,0,1,0,0,0,1,0,1,0}, + {1,0,0,1,0,1,0,1,0,0,1}, + {1,0,0,1,1,0,1,1,0,0,1}, + {0,1,0,0,0,0,0,0,0,1,0}, + {0,1,0,0,1,1,1,0,0,1,0}, + {0,0,1,0,0,1,0,0,1,0,0}, + {0,0,0,1,0,0,0,1,0,0,0}, + {0,0,0,0,1,0,1,0,0,0,0}, + {0,0,0,0,0,1,0,0,0,0,0}, +}; + +// Constructor +Lore::Lore() +{ + +} +// Destructor +Lore::~Lore() +{ + +} +void Lore::display(N5110 &lcd) +{ + lcd.clear(); + lcd.refresh(); + // lcd.drawRect(0,0,84,48,FILL_TRANSPARENT); + seekerl(lcd); + lcd.refresh(); + wait(5); + +} + +void Lore::seekerl(N5110 &lcd) +{ + // _enemy.draw_seeker(lcd); + lcd.drawSprite(42,0,7,9,(int *)seeker); + lcd.printString(" Seekers ",2,3); + lcd.printString(" explode ",2,4); + lcd.printString(" on impact ",2,5); +} +void Lore::shooter(N5110 &lcd) +{ + lcd.printString("Shooters will align ",2,2); + lcd.printString("next to you before",2,3); + lcd.printString("they fire",2,4); +} + + + +/* +string pie = "pie"; + char buffer[10]; + sprintf(buffer,"%s",pie); + lcd.printString(buffer,2,0); +*/ \ No newline at end of file