Game For ECE 2035
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
Diff: speech.cpp
- Revision:
- 14:7225da81314a
- Parent:
- 6:c9695079521d
diff -r 798a4dd14c7e -r 7225da81314a speech.cpp --- a/speech.cpp Thu Dec 02 20:16:28 2021 +0000 +++ b/speech.cpp Fri Dec 03 08:45:49 2021 +0000 @@ -145,7 +145,7 @@ } } -void vertical_speech_bubble_wait() +void vertical_speech_bubble_wait1() { GameInputs inputs = read_inputs(); @@ -159,6 +159,20 @@ } } +void vertical_speech_bubble_wait2() +{ + GameInputs inputs = read_inputs(); + + int money; + + while(inputs.b2&&inputs.b1&&inputs.b3){ + wait(.1); + inputs = read_inputs(); + money = store(); + + } +} + void horizontal_speech1(const char* line1, const char* line2) { @@ -179,13 +193,23 @@ } //const char* line1, const char* line2 -void vertical_speech(const char* line1, const char* line2, const char* line3) +void vertical_speech1(const char* line1, const char* line2, const char* line3) { draw_vertical_speech_bubble(); draw_vertical_speech_line(line1, TOP); draw_vertical_speech_line(line2, MID1); draw_vertical_speech_line(line3, BOTTOM); - vertical_speech_bubble_wait(); + vertical_speech_bubble_wait1(); + erase_vertical_speech_bubble(); +} + +void vertical_speech2(const char* line1, const char* line2, const char* line3) +{ + draw_vertical_speech_bubble(); + draw_vertical_speech_line(line1, TOP); + draw_vertical_speech_line(line2, MID1); + draw_vertical_speech_line(line3, BOTTOM); + vertical_speech_bubble_wait2(); erase_vertical_speech_bubble(); }