Simple fish eat program
Dependencies: mbed mbed-rtos N5110 ShiftReg Tone
classes/FishEngine.h@14:f1552b691274, 2021-08-02 (annotated)
- Committer:
- el18a2k
- Date:
- Mon Aug 02 14:35:02 2021 +0000
- Revision:
- 14:f1552b691274
- Parent:
- 13:183bd19f3d7d
final
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el18a2k | 14:f1552b691274 | 1 | /* Fish Eat Game v2.0 |
el18a2k | 14:f1552b691274 | 2 | * Author: Andrew Knowles |
el18a2k | 14:f1552b691274 | 3 | * Date: 21/04/2021 |
el18a2k | 14:f1552b691274 | 4 | * Note: See hearder files for additional recognistion */ |
el18a2k | 14:f1552b691274 | 5 | |
el18a2k | 1:7dfa61225fcf | 6 | #ifndef FISHENGINE_H |
el18a2k | 1:7dfa61225fcf | 7 | #define FISHENGINE_H |
el18a2k | 1:7dfa61225fcf | 8 | |
el18a2k | 1:7dfa61225fcf | 9 | #include "N5110.h" |
el18a2k | 1:7dfa61225fcf | 10 | #include "Tone.h" |
el18a2k | 1:7dfa61225fcf | 11 | #include "ShiftReg.h" |
el18a2k | 2:532b0225519f | 12 | #include "Joystick.h" |
el18a2k | 1:7dfa61225fcf | 13 | |
el18a2k | 10:e221bd1ce3ec | 14 | #include "Game.h" |
el18a2k | 1:7dfa61225fcf | 15 | #include "Graphics.h" |
el18a2k | 6:7aafcaf7cbe2 | 16 | #include "Settings.h" |
el18a2k | 11:7c1e2a9303d3 | 17 | #include "HighScore.h" |
el18a2k | 1:7dfa61225fcf | 18 | |
el18a2k | 1:7dfa61225fcf | 19 | class FishEngine { |
el18a2k | 1:7dfa61225fcf | 20 | |
el18a2k | 1:7dfa61225fcf | 21 | public: |
el18a2k | 2:532b0225519f | 22 | //calls the title sequence |
el18a2k | 1:7dfa61225fcf | 23 | void titleSequence(N5110 &lcd); |
el18a2k | 2:532b0225519f | 24 | |
el18a2k | 12:20ac766b3175 | 25 | //calls the games main menu |
el18a2k | 2:532b0225519f | 26 | void mainMenu(N5110 &lcd, Tone &dac, Joystick &joystick); |
el18a2k | 2:532b0225519f | 27 | |
el18a2k | 12:20ac766b3175 | 28 | //calls game play from Game.h |
el18a2k | 13:183bd19f3d7d | 29 | void gamePlay(N5110 &lcd, Joystick &joystick); |
el18a2k | 12:20ac766b3175 | 30 | |
el18a2k | 12:20ac766b3175 | 31 | //calls display_File(lcd) from HighScore.h |
el18a2k | 11:7c1e2a9303d3 | 32 | void highScore(N5110 &lcd); |
el18a2k | 12:20ac766b3175 | 33 | |
el18a2k | 12:20ac766b3175 | 34 | //displays player instructions |
el18a2k | 4:db929dab4f13 | 35 | void Instructions(N5110 &lcd); |
el18a2k | 11:7c1e2a9303d3 | 36 | |
el18a2k | 11:7c1e2a9303d3 | 37 | private: |
el18a2k | 12:20ac766b3175 | 38 | int ButtonA; |
el18a2k | 12:20ac766b3175 | 39 | int ButtonB; |
el18a2k | 11:7c1e2a9303d3 | 40 | int playerScore; |
el18a2k | 11:7c1e2a9303d3 | 41 | int fileValue; |
el18a2k | 12:20ac766b3175 | 42 | int state; |
el18a2k | 12:20ac766b3175 | 43 | int direction; |
el18a2k | 12:20ac766b3175 | 44 | int y_pos; |
el18a2k | 1:7dfa61225fcf | 45 | }; |
el18a2k | 1:7dfa61225fcf | 46 | |
el18a2k | 1:7dfa61225fcf | 47 | #endif |