Adventure game written for ECE2035 at the Georgia Institute of Technology
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
Diff: speech.cpp
- Revision:
- 2:0876296d9473
- Parent:
- 0:35660d7952f7
- Child:
- 4:cdc54191ff07
--- a/speech.cpp Wed Apr 04 21:11:07 2018 +0000 +++ b/speech.cpp Tue Apr 17 17:17:20 2018 +0000 @@ -29,18 +29,31 @@ void draw_speech_bubble() { + uLCD.filled_rectangle(0, 128, 128, 90, 0xFFFFFF); //(x1, y1, x2, y2) where (x1, y1) is bottom left corner and (x2, y2) is upper right corner } void erase_speech_bubble() { + uLCD.filled_rectangle(0, 128, 128, 90, 0x000000); + //uLCD.filled_rectangle(0, 128, 128, 90, 0x000000); } void draw_speech_line(const char* line, int which) { + if (which == TOP){ + uLCD.locate(1,12); //TO DO: the line overlaps with second line if too long + } else if (which == BOTTOM){ + uLCD.locate(1,13); + } + // basic printf demo = 16 by 18 characters on screen + uLCD.text_mode(TRANSPARENT); + uLCD.color(BLACK); + uLCD.printf(line); } void speech_bubble_wait() { + wait(2); } void speech(const char* line1, const char* line2)