Prints objects on to a Nokia N5110 LCD display and makes them 'fall' down the display.
Dependents: Game_Controller_Project
Objects.h@11:1995b5e6303c, 2017-04-22 (annotated)
- Committer:
- Nathanj94
- Date:
- Sat Apr 22 12:32:14 2017 +0000
- Revision:
- 11:1995b5e6303c
- Parent:
- 10:c79adb627a37
- Child:
- 12:ba07ab8cdc35
Redundancy removed and files organised ready for notes to be written
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Nathanj94 | 0:a1d36c50a0b7 | 1 | #ifndef OBJECTS_H |
Nathanj94 | 0:a1d36c50a0b7 | 2 | #define OBJECTS_H |
Nathanj94 | 0:a1d36c50a0b7 | 3 | |
Nathanj94 | 0:a1d36c50a0b7 | 4 | #include "mbed.h" |
Nathanj94 | 1:a05d10d3d33f | 5 | #include "N5110.h" |
Nathanj94 | 0:a1d36c50a0b7 | 6 | #include "Gamepad.h" |
Nathanj94 | 0:a1d36c50a0b7 | 7 | #include "Basket.h" |
Nathanj94 | 4:56ca80919a98 | 8 | #include "Fruit.h" |
Nathanj94 | 0:a1d36c50a0b7 | 9 | |
Nathanj94 | 0:a1d36c50a0b7 | 10 | class Objects |
Nathanj94 | 0:a1d36c50a0b7 | 11 | { |
Nathanj94 | 0:a1d36c50a0b7 | 12 | public: |
Nathanj94 | 0:a1d36c50a0b7 | 13 | |
Nathanj94 | 0:a1d36c50a0b7 | 14 | Objects(); |
Nathanj94 | 0:a1d36c50a0b7 | 15 | ~Objects(); |
Nathanj94 | 11:1995b5e6303c | 16 | |
Nathanj94 | 11:1995b5e6303c | 17 | //INITILISATION FUNCTION// |
Nathanj94 | 11:1995b5e6303c | 18 | void init(int speed); |
Nathanj94 | 11:1995b5e6303c | 19 | |
Nathanj94 | 11:1995b5e6303c | 20 | //UPDATE FUNCTIONS// |
Nathanj94 | 11:1995b5e6303c | 21 | void move(int speed); |
Nathanj94 | 11:1995b5e6303c | 22 | int get_score_var(); |
Nathanj94 | 11:1995b5e6303c | 23 | |
Nathanj94 | 11:1995b5e6303c | 24 | //DISPLAY FUNCTIONS// |
Nathanj94 | 3:0c79211fdfe0 | 25 | void draw(N5110 &lcd); |
Nathanj94 | 3:0c79211fdfe0 | 26 | void undraw(N5110 &lcd); |
Nathanj94 | 7:e567cd172d2a | 27 | int get_undraw_var(); |
Nathanj94 | 3:0c79211fdfe0 | 28 | int get_x(); |
Nathanj94 | 3:0c79211fdfe0 | 29 | int get_y(); |
Nathanj94 | 1:a05d10d3d33f | 30 | |
Nathanj94 | 1:a05d10d3d33f | 31 | private: |
Nathanj94 | 1:a05d10d3d33f | 32 | |
Nathanj94 | 9:252abbc93565 | 33 | Basket basket; |
Nathanj94 | 4:56ca80919a98 | 34 | Fruit fruit; |
Nathanj94 | 4:56ca80919a98 | 35 | |
Nathanj94 | 5:217e18adcba7 | 36 | int score_var; |
Nathanj94 | 4:56ca80919a98 | 37 | int undraw_var; |
Nathanj94 | 3:0c79211fdfe0 | 38 | int x_ref; |
Nathanj94 | 3:0c79211fdfe0 | 39 | int y_ref; |
Nathanj94 | 2:3f42da6a4c89 | 40 | int objects_ep; |
Nathanj94 | 4:56ca80919a98 | 41 | int objects_shape; |
Nathanj94 | 11:1995b5e6303c | 42 | int objects_speed; |
Nathanj94 | 4:56ca80919a98 | 43 | |
Nathanj94 | 1:a05d10d3d33f | 44 | }; |
Nathanj94 | 1:a05d10d3d33f | 45 | #endif |