Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Frogger/Frogger.h
- Revision:
- 50:9ffeb4a10c0a
- Parent:
- 48:8ccfc74b60a5
- Child:
- 51:4c1f49729d88
--- a/Frogger/Frogger.h Sun May 24 02:30:49 2020 +0000 +++ b/Frogger/Frogger.h Mon May 25 02:18:57 2020 +0000 @@ -11,6 +11,7 @@ #include "WaterSprites.h" #include "Vehicle.h" #include "Background.h" +#include "IntroScreen.h" #include <vector> #include <stdio.h> @@ -25,7 +26,8 @@ Frog *frog; // one frog object int grid; // size of one game unit - + IntroScreen intro; + Frogger(); Frogger(Frog *frog, int grid, int w, int h); // constructor @@ -33,6 +35,20 @@ int current_level; int state_frog; bool frogDie; + int goal_post_xpos; + bool play_game; + bool introScreen; + bool tutorial; + bool settings; + void gotoNextTutorialSlide(); + void displayTutorial(); + void goalReached(); + void checkProgression(); + + bool end_post; + bool nextLevel; + bool next_goal; + float water_level; bool frogOnLog; // attached @@ -68,14 +84,26 @@ Object level_row_one[2]; Object level_row_two[2]; Object level_row_three[3]; - + public: + void run(); + void actOnFrogPos(); + void home(); + void determineSelection(); + void gotoPage(); + void selectOption(); + void checkLevelProgression(); + int randEndPost(); void checkFrogOnWater(); void drownedFrog(); void checkFrogAction(Object log); void setupLevelTwoRows(); void moveFrogWithLog(Object log); - + + void drawBackGround(); + void generateLevelOneGoalPost(); + void setUpGoalPost(); + void levelOneCollision(); void levelTwoCollision(); void checkCollison(Object object); @@ -154,7 +182,7 @@ void moveVehicle(Object *row, char c, int array_size); void moveIndividualObject(Object *vehicle, char c); void checkOutOfBounds(Object *vehicle); - + void displayLevelIntro(); void runCurrentLevel(); void initializeParams(int w, int h, int grid); void initializeEmbeddedSystem(); @@ -189,3 +217,4 @@ +